From 19f0f86b30340eaf6e63c398640d688c78000943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Di=CC=81az=20Marco?= Date: Thu, 21 Apr 2022 17:59:42 +0200 Subject: [PATCH 1/5] Upgrade to Netbox 3.2. --- ...ts_circuit_terminations_list_parameters.go | 341 +- ...its_circuit_terminations_list_responses.go | 4 + .../circuits_circuit_types_list_parameters.go | 434 +- .../circuits_circuit_types_list_responses.go | 4 + .../circuits_circuits_list_parameters.go | 465 +- .../circuits_circuits_list_responses.go | 4 + netbox/client/circuits/circuits_client.go | 92 +- ...cuits_provider_networks_list_parameters.go | 651 +- ...rcuits_provider_networks_list_responses.go | 4 + ...roviders_bulk_partial_update_parameters.go | 6 +- ...rcuits_providers_bulk_update_parameters.go | 6 +- .../circuits_providers_create_parameters.go | 6 +- .../circuits_providers_list_parameters.go | 279 +- .../circuits_providers_list_responses.go | 4 + ...its_providers_partial_update_parameters.go | 6 +- .../circuits_providers_update_parameters.go | 6 +- .../dcim/dcim_cables_list_parameters.go | 713 +- .../client/dcim/dcim_cables_list_responses.go | 4 + netbox/client/dcim/dcim_client.go | 3260 +- ..._console_port_templates_list_parameters.go | 122 +- ...m_console_port_templates_list_responses.go | 4 + .../dcim_console_ports_list_parameters.go | 277 +- .../dcim/dcim_console_ports_list_responses.go | 4 + ...e_server_port_templates_list_parameters.go | 122 +- ...le_server_port_templates_list_responses.go | 4 + ...im_console_server_ports_list_parameters.go | 277 +- ...cim_console_server_ports_list_responses.go | 4 + ...im_device_bay_templates_list_parameters.go | 62 +- ...cim_device_bay_templates_list_responses.go | 4 + .../dcim/dcim_device_bays_list_parameters.go | 217 +- .../dcim/dcim_device_bays_list_responses.go | 4 + .../dcim/dcim_device_roles_list_parameters.go | 465 +- .../dcim/dcim_device_roles_list_responses.go | 4 + .../dcim/dcim_device_types_list_parameters.go | 186 +- .../dcim/dcim_device_types_list_responses.go | 4 + .../dcim/dcim_devices_list_parameters.go | 337 +- .../dcim/dcim_devices_list_responses.go | 4 + ...im_front_port_templates_list_parameters.go | 153 +- ...cim_front_port_templates_list_responses.go | 4 + .../dcim/dcim_front_ports_list_parameters.go | 308 +- .../dcim/dcim_front_ports_list_responses.go | 4 + ...cim_interface_templates_list_parameters.go | 122 +- ...dcim_interface_templates_list_responses.go | 4 + .../dcim/dcim_interfaces_list_parameters.go | 1879 +- .../dcim/dcim_interfaces_list_responses.go | 4 + ...ntory_item_roles_bulk_delete_parameters.go | 141 + ...entory_item_roles_bulk_delete_responses.go | 68 + ...em_roles_bulk_partial_update_parameters.go | 163 + ...tem_roles_bulk_partial_update_responses.go | 82 + ...ntory_item_roles_bulk_update_parameters.go | 163 + ...entory_item_roles_bulk_update_responses.go | 82 + ..._inventory_item_roles_create_parameters.go | 163 + ...m_inventory_item_roles_create_responses.go | 82 + ..._inventory_item_roles_delete_parameters.go | 165 + ...m_inventory_item_roles_delete_responses.go | 68 + ...im_inventory_item_roles_list_parameters.go | 1606 + ...cim_inventory_item_roles_list_responses.go | 247 + ...ry_item_roles_partial_update_parameters.go | 186 + ...ory_item_roles_partial_update_responses.go | 82 + ...im_inventory_item_roles_read_parameters.go | 165 + ...cim_inventory_item_roles_read_responses.go | 82 + ..._inventory_item_roles_update_parameters.go | 186 + ...m_inventory_item_roles_update_responses.go | 82 + ...y_item_templates_bulk_delete_parameters.go | 141 + ...ry_item_templates_bulk_delete_responses.go | 68 + ...emplates_bulk_partial_update_parameters.go | 163 + ...templates_bulk_partial_update_responses.go | 82 + ...y_item_templates_bulk_update_parameters.go | 163 + ...ry_item_templates_bulk_update_responses.go | 82 + ...entory_item_templates_create_parameters.go | 163 + ...ventory_item_templates_create_responses.go | 82 + ...entory_item_templates_delete_parameters.go | 165 + ...ventory_item_templates_delete_responses.go | 68 + ...nventory_item_templates_list_parameters.go | 2164 + ...inventory_item_templates_list_responses.go | 247 + ...tem_templates_partial_update_parameters.go | 186 + ...item_templates_partial_update_responses.go | 82 + ...nventory_item_templates_read_parameters.go | 165 + ...inventory_item_templates_read_responses.go | 82 + ...entory_item_templates_update_parameters.go | 186 + ...ventory_item_templates_update_responses.go | 82 + .../dcim_inventory_items_list_parameters.go | 620 +- .../dcim_inventory_items_list_responses.go | 4 + .../dcim/dcim_locations_list_parameters.go | 527 +- .../dcim/dcim_locations_list_responses.go | 4 + .../dcim_manufacturers_list_parameters.go | 279 +- .../dcim/dcim_manufacturers_list_responses.go | 4 + ...le_bay_templates_bulk_delete_parameters.go | 141 + ...ule_bay_templates_bulk_delete_responses.go | 68 + ...emplates_bulk_partial_update_parameters.go | 163 + ...templates_bulk_partial_update_responses.go | 82 + ...le_bay_templates_bulk_update_parameters.go | 163 + ...ule_bay_templates_bulk_update_responses.go | 82 + ..._module_bay_templates_create_parameters.go | 163 + ...m_module_bay_templates_create_responses.go | 82 + ..._module_bay_templates_delete_parameters.go | 165 + ...m_module_bay_templates_delete_responses.go | 68 + ...im_module_bay_templates_list_parameters.go | 986 + ...cim_module_bay_templates_list_responses.go | 247 + ...bay_templates_partial_update_parameters.go | 186 + ..._bay_templates_partial_update_responses.go | 82 + ...im_module_bay_templates_read_parameters.go | 165 + ...cim_module_bay_templates_read_responses.go | 82 + ..._module_bay_templates_update_parameters.go | 186 + ...m_module_bay_templates_update_responses.go | 82 + ...dcim_module_bays_bulk_delete_parameters.go | 141 + .../dcim_module_bays_bulk_delete_responses.go | 68 + ...ule_bays_bulk_partial_update_parameters.go | 163 + ...dule_bays_bulk_partial_update_responses.go | 82 + ...dcim_module_bays_bulk_update_parameters.go | 163 + .../dcim_module_bays_bulk_update_responses.go | 82 + .../dcim_module_bays_create_parameters.go | 163 + .../dcim/dcim_module_bays_create_responses.go | 82 + .../dcim_module_bays_delete_parameters.go | 165 + .../dcim/dcim_module_bays_delete_responses.go | 68 + .../dcim/dcim_module_bays_list_parameters.go | 2350 + .../dcim/dcim_module_bays_list_responses.go | 247 + ...m_module_bays_partial_update_parameters.go | 186 + ...im_module_bays_partial_update_responses.go | 82 + .../dcim/dcim_module_bays_read_parameters.go | 165 + .../dcim/dcim_module_bays_read_responses.go | 82 + .../dcim_module_bays_update_parameters.go | 186 + .../dcim/dcim_module_bays_update_responses.go | 82 + ...cim_module_types_bulk_delete_parameters.go | 141 + ...dcim_module_types_bulk_delete_responses.go | 68 + ...le_types_bulk_partial_update_parameters.go | 163 + ...ule_types_bulk_partial_update_responses.go | 82 + ...cim_module_types_bulk_update_parameters.go | 163 + ...dcim_module_types_bulk_update_responses.go | 82 + .../dcim_module_types_create_parameters.go | 163 + .../dcim_module_types_create_responses.go | 82 + .../dcim_module_types_delete_parameters.go | 165 + .../dcim_module_types_delete_responses.go | 68 + .../dcim/dcim_module_types_list_parameters.go | 1606 + .../dcim/dcim_module_types_list_responses.go | 247 + ..._module_types_partial_update_parameters.go | 186 + ...m_module_types_partial_update_responses.go | 82 + .../dcim/dcim_module_types_read_parameters.go | 165 + .../dcim/dcim_module_types_read_responses.go | 82 + .../dcim_module_types_update_parameters.go | 186 + .../dcim_module_types_update_responses.go | 82 + .../dcim_modules_bulk_delete_parameters.go | 141 + .../dcim_modules_bulk_delete_responses.go | 68 + ..._modules_bulk_partial_update_parameters.go | 163 + ...m_modules_bulk_partial_update_responses.go | 82 + .../dcim_modules_bulk_update_parameters.go | 163 + .../dcim_modules_bulk_update_responses.go | 82 + .../dcim/dcim_modules_create_parameters.go | 163 + .../dcim/dcim_modules_create_responses.go | 82 + .../dcim/dcim_modules_delete_parameters.go | 165 + .../dcim/dcim_modules_delete_responses.go | 68 + .../dcim/dcim_modules_list_parameters.go | 1606 + .../dcim/dcim_modules_list_responses.go | 247 + .../dcim_modules_partial_update_parameters.go | 186 + .../dcim_modules_partial_update_responses.go | 82 + .../dcim/dcim_modules_read_parameters.go | 165 + .../dcim/dcim_modules_read_responses.go | 82 + .../dcim/dcim_modules_update_parameters.go | 186 + .../dcim/dcim_modules_update_responses.go | 82 + .../dcim/dcim_platforms_list_parameters.go | 186 +- .../dcim/dcim_platforms_list_responses.go | 4 + .../dcim/dcim_power_feeds_list_parameters.go | 31 - .../dcim/dcim_power_feeds_list_responses.go | 4 + ..._power_outlet_templates_list_parameters.go | 122 +- ...m_power_outlet_templates_list_responses.go | 4 + .../dcim_power_outlets_list_parameters.go | 277 +- .../dcim/dcim_power_outlets_list_responses.go | 4 + .../dcim/dcim_power_panels_list_parameters.go | 155 +- .../dcim/dcim_power_panels_list_responses.go | 4 + ...im_power_port_templates_list_parameters.go | 122 +- ...cim_power_port_templates_list_responses.go | 4 + .../dcim/dcim_power_ports_list_parameters.go | 277 +- .../dcim/dcim_power_ports_list_responses.go | 4 + .../dcim_rack_reservations_list_parameters.go | 310 + .../dcim_rack_reservations_list_responses.go | 4 + .../dcim/dcim_rack_roles_list_parameters.go | 465 +- .../dcim/dcim_rack_roles_list_responses.go | 4 + .../client/dcim/dcim_racks_list_parameters.go | 217 +- .../client/dcim/dcim_racks_list_responses.go | 4 + ...cim_rear_port_templates_list_parameters.go | 153 +- ...dcim_rear_port_templates_list_responses.go | 4 + .../dcim/dcim_rear_ports_list_parameters.go | 308 +- .../dcim/dcim_rear_ports_list_responses.go | 4 + .../dcim/dcim_regions_list_parameters.go | 279 +- .../dcim/dcim_regions_list_responses.go | 4 + .../dcim/dcim_site_groups_list_parameters.go | 279 +- .../dcim/dcim_site_groups_list_responses.go | 4 + .../client/dcim/dcim_sites_list_parameters.go | 1352 +- .../client/dcim/dcim_sites_list_responses.go | 4 + .../dcim_virtual_chassis_list_parameters.go | 62 - .../dcim_virtual_chassis_list_responses.go | 4 + netbox/client/extras/extras_client.go | 166 +- .../extras_config_contexts_list_parameters.go | 217 +- .../extras_config_contexts_list_responses.go | 4 + .../extras_content_types_list_responses.go | 4 + .../extras_custom_fields_list_parameters.go | 1292 +- .../extras_custom_fields_list_responses.go | 4 + .../extras_custom_links_list_parameters.go | 184 +- .../extras_custom_links_list_responses.go | 4 + ...extras_export_templates_list_parameters.go | 372 +- .../extras_export_templates_list_responses.go | 4 + ...xtras_image_attachments_list_parameters.go | 62 +- ...extras_image_attachments_list_responses.go | 4 + .../extras_job_results_list_parameters.go | 31 - .../extras_job_results_list_responses.go | 4 + .../extras_journal_entries_list_parameters.go | 62 + .../extras_journal_entries_list_responses.go | 4 + .../extras_object_changes_list_parameters.go | 62 - .../extras_object_changes_list_responses.go | 4 + .../extras/extras_tags_list_parameters.go | 403 +- .../extras/extras_tags_list_responses.go | 4 + .../extras/extras_webhooks_list_parameters.go | 184 +- .../extras/extras_webhooks_list_responses.go | 4 + .../ipam/ipam_aggregates_list_parameters.go | 310 + .../ipam/ipam_aggregates_list_responses.go | 4 + .../ipam/ipam_asns_bulk_delete_parameters.go | 141 + .../ipam/ipam_asns_bulk_delete_responses.go | 68 + ...pam_asns_bulk_partial_update_parameters.go | 163 + ...ipam_asns_bulk_partial_update_responses.go | 82 + .../ipam/ipam_asns_bulk_update_parameters.go | 163 + .../ipam/ipam_asns_bulk_update_responses.go | 82 + .../ipam/ipam_asns_create_parameters.go | 163 + .../client/ipam/ipam_asns_create_responses.go | 82 + .../ipam/ipam_asns_delete_parameters.go | 165 + .../client/ipam/ipam_asns_delete_responses.go | 68 + .../client/ipam/ipam_asns_list_parameters.go | 1668 + .../client/ipam/ipam_asns_list_responses.go | 247 + .../ipam_asns_partial_update_parameters.go | 186 + .../ipam_asns_partial_update_responses.go | 82 + .../client/ipam/ipam_asns_read_parameters.go | 165 + .../client/ipam/ipam_asns_read_responses.go | 82 + .../ipam/ipam_asns_update_parameters.go | 186 + .../client/ipam/ipam_asns_update_responses.go | 82 + netbox/client/ipam/ipam_client.go | 2788 +- ...roup_assignments_bulk_delete_parameters.go | 141 + ...group_assignments_bulk_delete_responses.go | 68 + ...ignments_bulk_partial_update_parameters.go | 163 + ...signments_bulk_partial_update_responses.go | 82 + ...roup_assignments_bulk_update_parameters.go | 163 + ...group_assignments_bulk_update_responses.go | 82 + ...hrp_group_assignments_create_parameters.go | 163 + ...fhrp_group_assignments_create_responses.go | 82 + ...hrp_group_assignments_delete_parameters.go | 165 + ...fhrp_group_assignments_delete_responses.go | 68 + ..._fhrp_group_assignments_list_parameters.go | 1079 + ...m_fhrp_group_assignments_list_responses.go | 247 + ...p_assignments_partial_update_parameters.go | 186 + ...up_assignments_partial_update_responses.go | 82 + ..._fhrp_group_assignments_read_parameters.go | 165 + ...m_fhrp_group_assignments_read_responses.go | 82 + ...hrp_group_assignments_update_parameters.go | 186 + ...fhrp_group_assignments_update_responses.go | 82 + ...ipam_fhrp_groups_bulk_delete_parameters.go | 141 + .../ipam_fhrp_groups_bulk_delete_responses.go | 68 + ...p_groups_bulk_partial_update_parameters.go | 163 + ...rp_groups_bulk_partial_update_responses.go | 82 + ...ipam_fhrp_groups_bulk_update_parameters.go | 163 + .../ipam_fhrp_groups_bulk_update_responses.go | 82 + .../ipam_fhrp_groups_create_parameters.go | 163 + .../ipam/ipam_fhrp_groups_create_responses.go | 82 + .../ipam_fhrp_groups_delete_parameters.go | 165 + .../ipam/ipam_fhrp_groups_delete_responses.go | 68 + .../ipam/ipam_fhrp_groups_list_parameters.go | 1327 + .../ipam/ipam_fhrp_groups_list_responses.go | 247 + ...m_fhrp_groups_partial_update_parameters.go | 186 + ...am_fhrp_groups_partial_update_responses.go | 82 + .../ipam/ipam_fhrp_groups_read_parameters.go | 165 + .../ipam/ipam_fhrp_groups_read_responses.go | 82 + .../ipam_fhrp_groups_update_parameters.go | 186 + .../ipam/ipam_fhrp_groups_update_responses.go | 82 + .../ipam/ipam_ip_addresses_list_parameters.go | 124 +- .../ipam/ipam_ip_addresses_list_responses.go | 4 + ..._ranges_available_ips_create_parameters.go | 8 +- ...p_ranges_available_ips_create_responses.go | 4 +- ...p_ranges_available_ips_list_parameters.go} | 74 +- ...ip_ranges_available_ips_list_responses.go} | 28 +- .../ipam/ipam_ip_ranges_list_parameters.go | 310 + .../ipam/ipam_ip_ranges_list_responses.go | 4 + ...refixes_available_ips_create_parameters.go | 8 +- ...prefixes_available_ips_create_responses.go | 4 +- ...prefixes_available_ips_list_parameters.go} | 74 +- ..._prefixes_available_ips_list_responses.go} | 28 +- ...xes_available_prefixes_create_responses.go | 8 +- ...xes_available_prefixes_list_parameters.go} | 72 +- ...ixes_available_prefixes_list_responses.go} | 28 +- .../ipam/ipam_prefixes_list_parameters.go | 465 + .../ipam/ipam_prefixes_list_responses.go | 4 + .../client/ipam/ipam_rirs_list_parameters.go | 155 +- .../client/ipam/ipam_rirs_list_responses.go | 4 + .../client/ipam/ipam_roles_list_parameters.go | 434 +- .../client/ipam/ipam_roles_list_responses.go | 4 + .../ipam_route_targets_list_parameters.go | 341 +- .../ipam/ipam_route_targets_list_responses.go | 4 + ...ervice_templates_bulk_delete_parameters.go | 141 + ...service_templates_bulk_delete_responses.go | 68 + ...emplates_bulk_partial_update_parameters.go | 163 + ...emplates_bulk_partial_update_responses.go} | 34 +- ...ervice_templates_bulk_update_parameters.go | 163 + ...service_templates_bulk_update_responses.go | 82 + ...pam_service_templates_create_parameters.go | 163 + ...ipam_service_templates_create_responses.go | 82 + ...pam_service_templates_delete_parameters.go | 165 + ...ipam_service_templates_delete_responses.go | 68 + .../ipam_service_templates_list_parameters.go | 1079 + .../ipam_service_templates_list_responses.go | 247 + ...ice_templates_partial_update_parameters.go | 186 + ...vice_templates_partial_update_responses.go | 82 + .../ipam_service_templates_read_parameters.go | 165 + .../ipam_service_templates_read_responses.go | 82 + ...pam_service_templates_update_parameters.go | 186 + ...ipam_service_templates_update_responses.go | 82 + .../ipam/ipam_services_list_parameters.go | 341 +- .../ipam/ipam_services_list_responses.go | 4 + ...roups_available_vlans_create_parameters.go | 186 + ...groups_available_vlans_create_responses.go | 80 + ..._groups_available_vlans_list_parameters.go | 165 + ...n_groups_available_vlans_list_responses.go | 80 + .../ipam/ipam_vlan_groups_list_parameters.go | 525 +- .../ipam/ipam_vlan_groups_list_responses.go | 4 + .../client/ipam/ipam_vlans_list_parameters.go | 341 +- .../client/ipam/ipam_vlans_list_responses.go | 4 + .../client/ipam/ipam_vrfs_list_parameters.go | 372 +- .../client/ipam/ipam_vrfs_list_responses.go | 4 + netbox/client/net_box_api_client.go | 9 +- netbox/client/plugins/plugins_client.go | 300 - ...ox_ui_savedtopologies_create_parameters.go | 163 - ...ox_ui_savedtopologies_delete_parameters.go | 165 - ...tbox_ui_savedtopologies_list_parameters.go | 211 - ...xtbox_ui_savedtopologies_list_responses.go | 243 - ...vedtopologies_partial_update_parameters.go | 186 - ...avedtopologies_partial_update_responses.go | 82 - ...tbox_ui_savedtopologies_read_parameters.go | 165 - ...ox_ui_savedtopologies_update_parameters.go | 186 - netbox/client/status/status_client.go | 2 +- netbox/client/tenancy/tenancy_client.go | 1512 +- ...tact_assignments_bulk_delete_parameters.go | 141 + ...ntact_assignments_bulk_delete_responses.go | 68 + ...ignments_bulk_partial_update_parameters.go | 163 + ...ignments_bulk_partial_update_responses.go} | 36 +- ...tact_assignments_bulk_update_parameters.go | 163 + ...tact_assignments_bulk_update_responses.go} | 34 +- ...y_contact_assignments_create_parameters.go | 163 + ...cy_contact_assignments_create_responses.go | 82 + ...y_contact_assignments_delete_parameters.go | 165 + ...cy_contact_assignments_delete_responses.go | 68 + ...ncy_contact_assignments_list_parameters.go | 1141 + ...ancy_contact_assignments_list_responses.go | 247 + ...t_assignments_partial_update_parameters.go | 186 + ...ct_assignments_partial_update_responses.go | 82 + ...ncy_contact_assignments_read_parameters.go | 165 + ...ancy_contact_assignments_read_responses.go | 82 + ...y_contact_assignments_update_parameters.go | 186 + ...cy_contact_assignments_update_responses.go | 82 + ...y_contact_groups_bulk_delete_parameters.go | 141 + ...cy_contact_groups_bulk_delete_responses.go | 68 + ...t_groups_bulk_partial_update_parameters.go | 163 + ...ct_groups_bulk_partial_update_responses.go | 82 + ...y_contact_groups_bulk_update_parameters.go | 163 + ...cy_contact_groups_bulk_update_responses.go | 82 + ...enancy_contact_groups_create_parameters.go | 163 + ...tenancy_contact_groups_create_responses.go | 82 + ...enancy_contact_groups_delete_parameters.go | 165 + ...tenancy_contact_groups_delete_responses.go | 68 + .../tenancy_contact_groups_list_parameters.go | 1730 + .../tenancy_contact_groups_list_responses.go | 247 + ...ontact_groups_partial_update_parameters.go | 186 + ...contact_groups_partial_update_responses.go | 82 + .../tenancy_contact_groups_read_parameters.go | 165 + .../tenancy_contact_groups_read_responses.go | 82 + ...enancy_contact_groups_update_parameters.go | 186 + ...tenancy_contact_groups_update_responses.go | 82 + ...cy_contact_roles_bulk_delete_parameters.go | 141 + ...ncy_contact_roles_bulk_delete_responses.go | 68 + ...ct_roles_bulk_partial_update_parameters.go | 163 + ...act_roles_bulk_partial_update_responses.go | 82 + ...cy_contact_roles_bulk_update_parameters.go | 163 + ...ncy_contact_roles_bulk_update_responses.go | 82 + ...tenancy_contact_roles_create_parameters.go | 163 + .../tenancy_contact_roles_create_responses.go | 82 + ...tenancy_contact_roles_delete_parameters.go | 165 + .../tenancy_contact_roles_delete_responses.go | 68 + .../tenancy_contact_roles_list_parameters.go | 1606 + .../tenancy_contact_roles_list_responses.go | 247 + ...contact_roles_partial_update_parameters.go | 186 + ..._contact_roles_partial_update_responses.go | 82 + .../tenancy_contact_roles_read_parameters.go | 165 + .../tenancy_contact_roles_read_responses.go | 82 + ...tenancy_contact_roles_update_parameters.go | 186 + .../tenancy_contact_roles_update_responses.go | 82 + ...tenancy_contacts_bulk_delete_parameters.go | 141 + .../tenancy_contacts_bulk_delete_responses.go | 68 + ...contacts_bulk_partial_update_parameters.go | 163 + ..._contacts_bulk_partial_update_responses.go | 82 + ...tenancy_contacts_bulk_update_parameters.go | 163 + .../tenancy_contacts_bulk_update_responses.go | 82 + .../tenancy_contacts_create_parameters.go | 163 + .../tenancy_contacts_create_responses.go | 82 + .../tenancy_contacts_delete_parameters.go | 165 + .../tenancy_contacts_delete_responses.go | 68 + .../tenancy_contacts_list_parameters.go | 2660 + .../tenancy_contacts_list_responses.go | 247 + ...ancy_contacts_partial_update_parameters.go | 186 + ...nancy_contacts_partial_update_responses.go | 82 + .../tenancy_contacts_read_parameters.go | 165 + .../tenancy_contacts_read_responses.go | 82 + .../tenancy_contacts_update_parameters.go | 186 + .../tenancy_contacts_update_responses.go | 82 + .../tenancy_tenant_groups_list_parameters.go | 155 +- .../tenancy_tenant_groups_list_responses.go | 4 + .../tenancy_tenants_list_parameters.go | 496 +- .../tenancy/tenancy_tenants_list_responses.go | 4 + netbox/client/users/users_client.go | 76 +- .../users/users_groups_list_responses.go | 4 + .../users_permissions_list_parameters.go | 372 + .../users/users_permissions_list_responses.go | 4 + .../users/users_tokens_list_parameters.go | 341 + .../users/users_tokens_list_responses.go | 4 + .../users/users_users_list_responses.go | 4 + .../virtualization/virtualization_client.go | 90 +- ...lization_cluster_groups_list_parameters.go | 279 +- ...alization_cluster_groups_list_responses.go | 4 + ...alization_cluster_types_list_parameters.go | 155 +- ...ualization_cluster_types_list_responses.go | 4 + ...virtualization_clusters_list_parameters.go | 155 +- .../virtualization_clusters_list_responses.go | 4 + ...rtualization_interfaces_list_parameters.go | 527 +- ...irtualization_interfaces_list_responses.go | 4 + ...zation_virtual_machines_list_parameters.go | 155 +- ...ization_virtual_machines_list_responses.go | 4 + netbox/client/wireless/wireless_client.go | 1161 + ...eless_lan_groups_bulk_delete_parameters.go | 141 + ...reless_lan_groups_bulk_delete_responses.go | 68 + ...n_groups_bulk_partial_update_parameters.go | 163 + ...an_groups_bulk_partial_update_responses.go | 82 + ...eless_lan_groups_bulk_update_parameters.go | 163 + ...reless_lan_groups_bulk_update_responses.go | 82 + ...s_wireless_lan_groups_create_parameters.go | 163 + ...ss_wireless_lan_groups_create_responses.go | 82 + ...s_wireless_lan_groups_delete_parameters.go | 165 + ...ss_wireless_lan_groups_delete_responses.go | 68 + ...ess_wireless_lan_groups_list_parameters.go | 1823 + ...less_wireless_lan_groups_list_responses.go | 247 + ...ss_lan_groups_partial_update_parameters.go | 186 + ...ess_lan_groups_partial_update_responses.go | 82 + ...ess_wireless_lan_groups_read_parameters.go | 165 + ...less_wireless_lan_groups_read_responses.go | 82 + ...s_wireless_lan_groups_update_parameters.go | 186 + ...ss_wireless_lan_groups_update_responses.go | 82 + ...ss_wireless_lans_bulk_delete_parameters.go | 141 + ...ess_wireless_lans_bulk_delete_responses.go | 68 + ...ess_lans_bulk_partial_update_parameters.go | 163 + ...less_lans_bulk_partial_update_responses.go | 82 + ...ss_wireless_lans_bulk_update_parameters.go | 163 + ...ess_wireless_lans_bulk_update_responses.go | 82 + ...ireless_wireless_lans_create_parameters.go | 163 + ...wireless_wireless_lans_create_responses.go | 82 + ...ireless_wireless_lans_delete_parameters.go | 165 + ...ireless_wireless_lans_delete_responses.go} | 28 +- .../wireless_wireless_lans_list_parameters.go | 2009 + .../wireless_wireless_lans_list_responses.go | 247 + ...wireless_lans_partial_update_parameters.go | 186 + ..._wireless_lans_partial_update_responses.go | 82 + .../wireless_wireless_lans_read_parameters.go | 165 + .../wireless_wireless_lans_read_responses.go | 82 + ...ireless_wireless_lans_update_parameters.go | 186 + ...wireless_wireless_lans_update_responses.go | 82 + ...s_wireless_links_bulk_delete_parameters.go | 141 + ...ss_wireless_links_bulk_delete_responses.go | 68 + ...ss_links_bulk_partial_update_parameters.go | 163 + ...ess_links_bulk_partial_update_responses.go | 82 + ...s_wireless_links_bulk_update_parameters.go | 163 + ...ss_wireless_links_bulk_update_responses.go | 82 + ...reless_wireless_links_create_parameters.go | 163 + ...ireless_wireless_links_create_responses.go | 82 + ...reless_wireless_links_delete_parameters.go | 165 + ...ireless_wireless_links_delete_responses.go | 68 + ...wireless_wireless_links_list_parameters.go | 2257 + .../wireless_wireless_links_list_responses.go | 247 + ...ireless_links_partial_update_parameters.go | 186 + ...wireless_links_partial_update_responses.go | 82 + ...wireless_wireless_links_read_parameters.go | 165 + .../wireless_wireless_links_read_responses.go | 82 + ...reless_wireless_links_update_parameters.go | 186 + ...ireless_wireless_links_update_responses.go | 82 + netbox/models/a_s_n.go | 417 + netbox/models/aggregate.go | 26 +- netbox/models/available_ip.go | 4 + netbox/models/available_prefix.go | 4 + netbox/models/available_v_l_a_n.go | 137 + netbox/models/cable.go | 158 +- netbox/models/circuit.go | 38 +- netbox/models/circuit_circuit_termination.go | 10 +- netbox/models/circuit_termination.go | 141 +- netbox/models/circuit_type.go | 68 +- netbox/models/cluster.go | 30 +- netbox/models/cluster_group.go | 68 +- netbox/models/cluster_type.go | 68 +- netbox/models/component_nested_module.go | 205 + netbox/models/config_context.go | 112 +- netbox/models/console_port.go | 152 +- netbox/models/console_port_template.go | 38 +- netbox/models/console_server_port.go | 152 +- netbox/models/console_server_port_template.go | 38 +- netbox/models/contact.go | 457 + netbox/models/contact_assignment.go | 563 + netbox/models/contact_group.go | 430 + netbox/models/contact_role.go | 350 + netbox/models/custom_field.go | 143 +- netbox/models/custom_link.go | 93 +- netbox/models/device.go | 302 +- netbox/models/device_bay.go | 22 +- netbox/models/device_bay_template.go | 14 +- netbox/models/device_n_a_p_a_l_m.go | 7 +- netbox/models/device_role.go | 68 +- netbox/models/device_type.go | 235 +- netbox/models/device_with_config_context.go | 313 +- netbox/models/export_template.go | 70 +- netbox/models/f_h_r_p_group.go | 518 + netbox/models/f_h_r_p_group_assignment.go | 342 + netbox/models/front_port.go | 209 +- netbox/models/front_port_rear_port.go | 2 +- netbox/models/front_port_template.go | 96 +- netbox/models/image_attachment.go | 51 +- netbox/models/interface.go | 2679 +- netbox/models/interface_template.go | 72 +- netbox/models/inventory_item.go | 109 +- netbox/models/inventory_item_role.go | 397 + netbox/models/inventory_item_template.go | 502 + netbox/models/ip_address.go | 75 +- netbox/models/ip_range.go | 34 +- netbox/models/job_result.go | 10 +- netbox/models/journal_entry.go | 82 +- netbox/models/location.go | 122 +- netbox/models/manufacturer.go | 68 +- netbox/models/module.go | 460 + netbox/models/module_bay.go | 410 + netbox/models/module_bay_template.go | 349 + netbox/models/module_nested_module_bay.go | 169 + netbox/models/module_type.go | 371 + netbox/models/nested_a_s_n.go | 171 + netbox/models/nested_cable.go | 2 +- netbox/models/nested_circuit.go | 2 +- netbox/models/nested_circuit_type.go | 2 +- netbox/models/nested_cluster.go | 2 +- netbox/models/nested_cluster_group.go | 2 +- netbox/models/nested_cluster_type.go | 2 +- netbox/models/nested_contact.go | 169 + netbox/models/nested_contact_group.go | 235 + netbox/models/nested_contact_role.go | 201 + netbox/models/nested_device.go | 2 +- netbox/models/nested_device_role.go | 2 +- netbox/models/nested_device_type.go | 6 +- netbox/models/nested_f_h_r_p_group.go | 237 + netbox/models/nested_interface.go | 6 +- netbox/models/nested_inventory_item_role.go | 218 + netbox/models/nested_ip_address.go | 2 +- netbox/models/nested_location.go | 2 +- netbox/models/nested_manufacturer.go | 2 +- netbox/models/nested_module.go | 280 + netbox/models/nested_module_bay.go | 215 + netbox/models/nested_module_type.go | 215 + netbox/models/nested_platform.go | 2 +- netbox/models/nested_power_panel.go | 2 +- netbox/models/nested_power_port.go | 6 +- netbox/models/nested_power_port_template.go | 2 +- netbox/models/nested_provider.go | 2 +- netbox/models/nested_provider_network.go | 2 +- netbox/models/nested_r_i_r.go | 2 +- netbox/models/nested_rack.go | 2 +- netbox/models/nested_rack_role.go | 2 +- netbox/models/nested_rear_port_template.go | 2 +- netbox/models/nested_region.go | 2 +- netbox/models/nested_role.go | 2 +- netbox/models/nested_route_target.go | 2 +- netbox/models/nested_site.go | 2 +- netbox/models/nested_site_group.go | 2 +- netbox/models/nested_tenant.go | 2 +- netbox/models/nested_tenant_group.go | 2 +- netbox/models/nested_v_l_a_n.go | 2 +- netbox/models/nested_v_l_a_n_group.go | 2 +- netbox/models/nested_v_r_f.go | 2 +- netbox/models/nested_virtual_chassis.go | 23 +- netbox/models/nested_virtual_machine.go | 2 +- netbox/models/nested_vm_interface.go | 6 +- netbox/models/nested_wireless_l_a_n.go | 169 + netbox/models/nested_wireless_l_a_n_group.go | 235 + netbox/models/nested_wireless_link.go | 162 + netbox/models/object_change.go | 25 +- netbox/models/object_permission.go | 10 +- netbox/models/platform.go | 72 +- netbox/models/power_feed.go | 98 +- netbox/models/power_outlet.go | 188 +- netbox/models/power_outlet_template.go | 78 +- netbox/models/power_panel.go | 82 +- netbox/models/power_port.go | 182 +- netbox/models/power_port_template.go | 72 +- netbox/models/prefix.go | 42 +- netbox/models/provider.go | 76 +- netbox/models/provider_network.go | 38 +- netbox/models/r_i_r.go | 68 +- netbox/models/rack.go | 48 +- netbox/models/rack_reservation.go | 60 +- netbox/models/rack_role.go | 68 +- netbox/models/rack_unit.go | 8 + netbox/models/rear_port.go | 205 +- netbox/models/rear_port_template.go | 92 +- netbox/models/region.go | 72 +- netbox/models/role.go | 68 +- netbox/models/route_target.go | 18 +- netbox/models/saved_topology.go | 199 - netbox/models/service.go | 44 +- netbox/models/service_template.go | 543 + netbox/models/site.go | 150 +- netbox/models/site_group.go | 72 +- netbox/models/tag.go | 68 + netbox/models/tenant.go | 18 +- netbox/models/tenant_group.go | 72 +- netbox/models/token.go | 6 +- netbox/models/user.go | 4 + netbox/models/v_l_a_n.go | 34 +- netbox/models/v_l_a_n_group.go | 126 +- netbox/models/v_r_f.go | 26 +- netbox/models/virtual_chassis.go | 78 +- .../virtual_machine_with_config_context.go | 61 +- netbox/models/vm_interface.go | 143 +- netbox/models/webhook.go | 77 +- netbox/models/wireless_l_a_n.go | 827 + netbox/models/wireless_l_a_n_group.go | 430 + netbox/models/wireless_link.go | 1019 + netbox/models/writable_a_s_n.go | 374 + netbox/models/writable_aggregate.go | 14 +- netbox/models/writable_available_ip.go | 125 + netbox/models/writable_cable.go | 107 +- netbox/models/writable_circuit.go | 14 +- netbox/models/writable_circuit_termination.go | 113 +- netbox/models/writable_cluster.go | 46 +- netbox/models/writable_config_context.go | 30 +- netbox/models/writable_console_port.go | 87 +- .../models/writable_console_port_template.go | 20 +- netbox/models/writable_console_server_port.go | 87 +- .../writable_console_server_port_template.go | 20 +- netbox/models/writable_contact.go | 428 + netbox/models/writable_contact_assignment.go | 360 + netbox/models/writable_contact_group.go | 401 + .../writable_create_available_v_l_a_n.go | 245 + netbox/models/writable_custom_field.go | 121 +- netbox/models/writable_device_bay.go | 14 +- netbox/models/writable_device_bay_template.go | 10 +- netbox/models/writable_device_type.go | 76 +- .../writable_device_with_config_context.go | 158 +- .../writable_f_h_r_p_group_assignment.go | 311 + netbox/models/writable_front_port.go | 117 +- netbox/models/writable_front_port_template.go | 47 +- netbox/models/writable_interface.go | 951 +- netbox/models/writable_interface_template.go | 39 +- netbox/models/writable_inventory_item.go | 58 +- .../writable_inventory_item_template.go | 385 + netbox/models/writable_ip_address.go | 40 +- netbox/models/writable_ip_range.go | 14 +- netbox/models/writable_journal_entry.go | 78 +- netbox/models/writable_location.go | 71 +- netbox/models/writable_module.go | 367 + netbox/models/writable_module_bay.go | 379 + netbox/models/writable_module_bay_template.go | 318 + netbox/models/writable_module_type.go | 340 + netbox/models/writable_object_permission.go | 2 +- netbox/models/writable_platform.go | 68 +- netbox/models/writable_power_feed.go | 74 +- netbox/models/writable_power_outlet.go | 99 +- .../models/writable_power_outlet_template.go | 32 +- netbox/models/writable_power_panel.go | 74 +- netbox/models/writable_power_port.go | 102 +- netbox/models/writable_power_port_template.go | 35 +- netbox/models/writable_prefix.go | 14 +- netbox/models/writable_provider.go | 448 + netbox/models/writable_provider_network.go | 34 +- netbox/models/writable_rack.go | 32 +- netbox/models/writable_rack_reservation.go | 48 +- netbox/models/writable_rear_port.go | 117 +- netbox/models/writable_rear_port_template.go | 47 +- netbox/models/writable_region.go | 68 +- netbox/models/writable_route_target.go | 14 +- netbox/models/writable_service.go | 21 +- netbox/models/writable_service_template.go | 403 + netbox/models/writable_site.go | 100 +- netbox/models/writable_site_group.go | 68 +- netbox/models/writable_tenant.go | 14 +- netbox/models/writable_tenant_group.go | 68 +- netbox/models/writable_token.go | 2 +- netbox/models/writable_v_l_a_n.go | 30 +- netbox/models/writable_v_r_f.go | 14 +- netbox/models/writable_virtual_chassis.go | 74 +- ...ble_virtual_machine_with_config_context.go | 25 +- netbox/models/writable_vm_interface.go | 37 +- netbox/models/writable_wireless_l_a_n.go | 454 + .../models/writable_wireless_l_a_n_group.go | 401 + netbox/models/writable_wireless_link.go | 528 + swagger.json | 51387 +++++++++++----- 698 files changed, 155307 insertions(+), 27040 deletions(-) create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_bulk_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_bulk_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_create_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_create_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_delete_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_list_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_read_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_read_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_roles_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_bulk_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_bulk_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_create_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_create_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_delete_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_list_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_read_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_read_responses.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_update_parameters.go create mode 100644 netbox/client/dcim/dcim_inventory_item_templates_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_bulk_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_bulk_delete_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_bulk_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_bulk_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_create_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_create_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_delete_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_list_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_list_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_read_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_read_responses.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bay_templates_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_bulk_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_bulk_delete_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_bulk_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_bulk_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_bulk_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_bulk_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_create_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_create_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_delete_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_list_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_list_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_read_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_read_responses.go create mode 100644 netbox/client/dcim/dcim_module_bays_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_bays_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_bulk_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_bulk_delete_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_bulk_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_bulk_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_bulk_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_bulk_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_create_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_create_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_delete_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_list_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_list_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_read_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_read_responses.go create mode 100644 netbox/client/dcim/dcim_module_types_update_parameters.go create mode 100644 netbox/client/dcim/dcim_module_types_update_responses.go create mode 100644 netbox/client/dcim/dcim_modules_bulk_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_bulk_delete_responses.go create mode 100644 netbox/client/dcim/dcim_modules_bulk_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_bulk_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_modules_bulk_update_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_bulk_update_responses.go create mode 100644 netbox/client/dcim/dcim_modules_create_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_create_responses.go create mode 100644 netbox/client/dcim/dcim_modules_delete_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_delete_responses.go create mode 100644 netbox/client/dcim/dcim_modules_list_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_list_responses.go create mode 100644 netbox/client/dcim/dcim_modules_partial_update_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_partial_update_responses.go create mode 100644 netbox/client/dcim/dcim_modules_read_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_read_responses.go create mode 100644 netbox/client/dcim/dcim_modules_update_parameters.go create mode 100644 netbox/client/dcim/dcim_modules_update_responses.go create mode 100644 netbox/client/ipam/ipam_asns_bulk_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_bulk_delete_responses.go create mode 100644 netbox/client/ipam/ipam_asns_bulk_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_bulk_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_asns_bulk_update_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_bulk_update_responses.go create mode 100644 netbox/client/ipam/ipam_asns_create_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_create_responses.go create mode 100644 netbox/client/ipam/ipam_asns_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_delete_responses.go create mode 100644 netbox/client/ipam/ipam_asns_list_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_list_responses.go create mode 100644 netbox/client/ipam/ipam_asns_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_asns_read_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_read_responses.go create mode 100644 netbox/client/ipam/ipam_asns_update_parameters.go create mode 100644 netbox/client/ipam/ipam_asns_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_create_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_create_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_delete_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_list_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_read_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_read_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_group_assignments_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_bulk_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_bulk_delete_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_bulk_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_bulk_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_create_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_create_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_delete_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_list_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_list_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_read_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_read_responses.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_update_parameters.go create mode 100644 netbox/client/ipam/ipam_fhrp_groups_update_responses.go rename netbox/client/ipam/{ipam_ip_ranges_available_ips_read_parameters.go => ipam_ip_ranges_available_ips_list_parameters.go} (55%) rename netbox/client/ipam/{ipam_ip_ranges_available_ips_read_responses.go => ipam_ip_ranges_available_ips_list_responses.go} (67%) rename netbox/client/ipam/{ipam_prefixes_available_ips_read_parameters.go => ipam_prefixes_available_ips_list_parameters.go} (55%) rename netbox/client/ipam/{ipam_prefixes_available_ips_read_responses.go => ipam_prefixes_available_ips_list_responses.go} (67%) rename netbox/client/ipam/{ipam_prefixes_available_prefixes_read_parameters.go => ipam_prefixes_available_prefixes_list_parameters.go} (54%) rename netbox/client/ipam/{ipam_prefixes_available_prefixes_read_responses.go => ipam_prefixes_available_prefixes_list_responses.go} (65%) create mode 100644 netbox/client/ipam/ipam_service_templates_bulk_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_bulk_delete_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_bulk_partial_update_parameters.go rename netbox/client/{plugins/plugins_nextbox_ui_savedtopologies_update_responses.go => ipam/ipam_service_templates_bulk_partial_update_responses.go} (59%) create mode 100644 netbox/client/ipam/ipam_service_templates_bulk_update_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_bulk_update_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_create_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_create_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_delete_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_delete_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_list_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_list_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_partial_update_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_partial_update_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_read_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_read_responses.go create mode 100644 netbox/client/ipam/ipam_service_templates_update_parameters.go create mode 100644 netbox/client/ipam/ipam_service_templates_update_responses.go create mode 100644 netbox/client/ipam/ipam_vlan_groups_available_vlans_create_parameters.go create mode 100644 netbox/client/ipam/ipam_vlan_groups_available_vlans_create_responses.go create mode 100644 netbox/client/ipam/ipam_vlan_groups_available_vlans_list_parameters.go create mode 100644 netbox/client/ipam/ipam_vlan_groups_available_vlans_list_responses.go delete mode 100644 netbox/client/plugins/plugins_client.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go delete mode 100644 netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_parameters.go rename netbox/client/{plugins/plugins_nextbox_ui_savedtopologies_create_responses.go => tenancy/tenancy_contact_assignments_bulk_partial_update_responses.go} (53%) create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_bulk_update_parameters.go rename netbox/client/{plugins/plugins_nextbox_ui_savedtopologies_read_responses.go => tenancy/tenancy_contact_assignments_bulk_update_responses.go} (59%) create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_create_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_create_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_list_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_read_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_read_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_assignments_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_bulk_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_bulk_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_bulk_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_bulk_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_create_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_create_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_list_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_list_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_read_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_read_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_groups_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_bulk_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_bulk_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_bulk_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_bulk_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_create_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_create_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_list_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_list_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_read_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_read_responses.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contact_roles_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_bulk_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_bulk_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_bulk_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_bulk_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_bulk_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_bulk_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_create_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_create_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_delete_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_delete_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_list_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_list_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_partial_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_partial_update_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_read_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_read_responses.go create mode 100644 netbox/client/tenancy/tenancy_contacts_update_parameters.go create mode 100644 netbox/client/tenancy/tenancy_contacts_update_responses.go create mode 100644 netbox/client/wireless/wireless_client.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_create_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_create_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_delete_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_delete_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_list_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_partial_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_partial_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_read_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_read_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lan_groups_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_bulk_delete_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_bulk_delete_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_bulk_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_bulk_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_create_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_create_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_delete_parameters.go rename netbox/client/{plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go => wireless/wireless_wireless_lans_delete_responses.go} (51%) create mode 100644 netbox/client/wireless/wireless_wireless_lans_list_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_list_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_partial_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_partial_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_read_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_read_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_lans_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_bulk_delete_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_bulk_delete_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_bulk_partial_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_bulk_partial_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_bulk_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_bulk_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_create_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_create_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_delete_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_delete_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_list_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_list_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_partial_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_partial_update_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_read_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_read_responses.go create mode 100644 netbox/client/wireless/wireless_wireless_links_update_parameters.go create mode 100644 netbox/client/wireless/wireless_wireless_links_update_responses.go create mode 100644 netbox/models/a_s_n.go create mode 100644 netbox/models/available_v_l_a_n.go create mode 100644 netbox/models/component_nested_module.go create mode 100644 netbox/models/contact.go create mode 100644 netbox/models/contact_assignment.go create mode 100644 netbox/models/contact_group.go create mode 100644 netbox/models/contact_role.go create mode 100644 netbox/models/f_h_r_p_group.go create mode 100644 netbox/models/f_h_r_p_group_assignment.go create mode 100644 netbox/models/inventory_item_role.go create mode 100644 netbox/models/inventory_item_template.go create mode 100644 netbox/models/module.go create mode 100644 netbox/models/module_bay.go create mode 100644 netbox/models/module_bay_template.go create mode 100644 netbox/models/module_nested_module_bay.go create mode 100644 netbox/models/module_type.go create mode 100644 netbox/models/nested_a_s_n.go create mode 100644 netbox/models/nested_contact.go create mode 100644 netbox/models/nested_contact_group.go create mode 100644 netbox/models/nested_contact_role.go create mode 100644 netbox/models/nested_f_h_r_p_group.go create mode 100644 netbox/models/nested_inventory_item_role.go create mode 100644 netbox/models/nested_module.go create mode 100644 netbox/models/nested_module_bay.go create mode 100644 netbox/models/nested_module_type.go create mode 100644 netbox/models/nested_wireless_l_a_n.go create mode 100644 netbox/models/nested_wireless_l_a_n_group.go create mode 100644 netbox/models/nested_wireless_link.go delete mode 100644 netbox/models/saved_topology.go create mode 100644 netbox/models/service_template.go create mode 100644 netbox/models/wireless_l_a_n.go create mode 100644 netbox/models/wireless_l_a_n_group.go create mode 100644 netbox/models/wireless_link.go create mode 100644 netbox/models/writable_a_s_n.go create mode 100644 netbox/models/writable_available_ip.go create mode 100644 netbox/models/writable_contact.go create mode 100644 netbox/models/writable_contact_assignment.go create mode 100644 netbox/models/writable_contact_group.go create mode 100644 netbox/models/writable_create_available_v_l_a_n.go create mode 100644 netbox/models/writable_f_h_r_p_group_assignment.go create mode 100644 netbox/models/writable_inventory_item_template.go create mode 100644 netbox/models/writable_module.go create mode 100644 netbox/models/writable_module_bay.go create mode 100644 netbox/models/writable_module_bay_template.go create mode 100644 netbox/models/writable_module_type.go create mode 100644 netbox/models/writable_provider.go create mode 100644 netbox/models/writable_service_template.go create mode 100644 netbox/models/writable_wireless_l_a_n.go create mode 100644 netbox/models/writable_wireless_l_a_n_group.go create mode 100644 netbox/models/writable_wireless_link.go diff --git a/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go b/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go index 9053e249b..00df0564c 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go +++ b/netbox/client/circuits/circuits_circuit_terminations_list_parameters.go @@ -93,6 +93,36 @@ type CircuitsCircuitTerminationsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -198,9 +228,6 @@ type CircuitsCircuitTerminationsListParams struct { // XconnectID. XconnectID *string - // XconnectIDEmpty. - XconnectIDEmpty *string - // XconnectIDIc. XconnectIDIc *string @@ -347,6 +374,116 @@ func (o *CircuitsCircuitTerminationsListParams) SetCreatedLte(createdLte *string o.CreatedLte = createdLte } +// WithDescription adds the description to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescription(description *string) *CircuitsCircuitTerminationsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionIc(descriptionIc *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionIe(descriptionIe *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionIew(descriptionIew *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionIsw(descriptionIsw *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionn(descriptionn *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionNic(descriptionNic *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionNie(descriptionNie *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionNiew(descriptionNiew *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) WithDescriptionNisw(descriptionNisw *string) *CircuitsCircuitTerminationsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the circuits circuit terminations list params +func (o *CircuitsCircuitTerminationsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithID(id *string) *CircuitsCircuitTerminationsListParams { o.SetID(id) @@ -710,17 +847,6 @@ func (o *CircuitsCircuitTerminationsListParams) SetXconnectID(xconnectID *string o.XconnectID = xconnectID } -// WithXconnectIDEmpty adds the xconnectIDEmpty to the circuits circuit terminations list params -func (o *CircuitsCircuitTerminationsListParams) WithXconnectIDEmpty(xconnectIDEmpty *string) *CircuitsCircuitTerminationsListParams { - o.SetXconnectIDEmpty(xconnectIDEmpty) - return o -} - -// SetXconnectIDEmpty adds the xconnectIdEmpty to the circuits circuit terminations list params -func (o *CircuitsCircuitTerminationsListParams) SetXconnectIDEmpty(xconnectIDEmpty *string) { - o.XconnectIDEmpty = xconnectIDEmpty -} - // WithXconnectIDIc adds the xconnectIDIc to the circuits circuit terminations list params func (o *CircuitsCircuitTerminationsListParams) WithXconnectIDIc(xconnectIDIc *string) *CircuitsCircuitTerminationsListParams { o.SetXconnectIDIc(xconnectIDIc) @@ -930,6 +1056,176 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1491,23 +1787,6 @@ func (o *CircuitsCircuitTerminationsListParams) WriteToRequest(r runtime.ClientR } } - if o.XconnectIDEmpty != nil { - - // query param xconnect_id__empty - var qrXconnectIDEmpty string - - if o.XconnectIDEmpty != nil { - qrXconnectIDEmpty = *o.XconnectIDEmpty - } - qXconnectIDEmpty := qrXconnectIDEmpty - if qXconnectIDEmpty != "" { - - if err := r.SetQueryParam("xconnect_id__empty", qXconnectIDEmpty); err != nil { - return err - } - } - } - if o.XconnectIDIc != nil { // query param xconnect_id__ic diff --git a/netbox/client/circuits/circuits_circuit_terminations_list_responses.go b/netbox/client/circuits/circuits_circuit_terminations_list_responses.go index c74a6c30e..cb0e1f8eb 100644 --- a/netbox/client/circuits/circuits_circuit_terminations_list_responses.go +++ b/netbox/client/circuits/circuits_circuit_terminations_list_responses.go @@ -182,6 +182,8 @@ func (o *CircuitsCircuitTerminationsListOKBody) validateResults(formats strfmt.R if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsCircuitTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsCircuitTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *CircuitsCircuitTerminationsListOKBody) contextValidateResults(ctx conte if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsCircuitTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsCircuitTerminationsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/circuits/circuits_circuit_types_list_parameters.go b/netbox/client/circuits/circuits_circuit_types_list_parameters.go index 2cf6767f5..ced2e188b 100644 --- a/netbox/client/circuits/circuits_circuit_types_list_parameters.go +++ b/netbox/client/circuits/circuits_circuit_types_list_parameters.go @@ -84,6 +84,36 @@ type CircuitsCircuitTypesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -120,9 +150,6 @@ type CircuitsCircuitTypesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -162,9 +189,6 @@ type CircuitsCircuitTypesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -192,6 +216,12 @@ type CircuitsCircuitTypesListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -278,6 +308,116 @@ func (o *CircuitsCircuitTypesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescription(description *string) *CircuitsCircuitTypesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionIc(descriptionIc *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionIe(descriptionIe *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionIew(descriptionIew *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionIsw(descriptionIsw *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionn(descriptionn *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionNic(descriptionNic *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionNie(descriptionNie *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionNiew(descriptionNiew *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithDescriptionNisw(descriptionNisw *string) *CircuitsCircuitTypesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithID(id *string) *CircuitsCircuitTypesListParams { o.SetID(id) @@ -399,17 +539,6 @@ func (o *CircuitsCircuitTypesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the circuits circuit types list params -func (o *CircuitsCircuitTypesListParams) WithNameEmpty(nameEmpty *string) *CircuitsCircuitTypesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the circuits circuit types list params -func (o *CircuitsCircuitTypesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithNameIc(nameIc *string) *CircuitsCircuitTypesListParams { o.SetNameIc(nameIc) @@ -542,17 +671,6 @@ func (o *CircuitsCircuitTypesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the circuits circuit types list params -func (o *CircuitsCircuitTypesListParams) WithSlugEmpty(slugEmpty *string) *CircuitsCircuitTypesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the circuits circuit types list params -func (o *CircuitsCircuitTypesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the circuits circuit types list params func (o *CircuitsCircuitTypesListParams) WithSlugIc(slugIc *string) *CircuitsCircuitTypesListParams { o.SetSlugIc(slugIc) @@ -652,6 +770,28 @@ func (o *CircuitsCircuitTypesListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithTag(tag *string) *CircuitsCircuitTypesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) WithTagn(tagn *string) *CircuitsCircuitTypesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the circuits circuit types list params +func (o *CircuitsCircuitTypesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -711,6 +851,176 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -898,23 +1208,6 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1119,23 +1412,6 @@ func (o *CircuitsCircuitTypesListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1289,6 +1565,40 @@ func (o *CircuitsCircuitTypesListParams) 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 len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/circuits/circuits_circuit_types_list_responses.go b/netbox/client/circuits/circuits_circuit_types_list_responses.go index 74863acf8..2d57cbc7d 100644 --- a/netbox/client/circuits/circuits_circuit_types_list_responses.go +++ b/netbox/client/circuits/circuits_circuit_types_list_responses.go @@ -182,6 +182,8 @@ func (o *CircuitsCircuitTypesListOKBody) validateResults(formats strfmt.Registry if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsCircuitTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsCircuitTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *CircuitsCircuitTypesListOKBody) contextValidateResults(ctx context.Cont if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsCircuitTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsCircuitTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/circuits/circuits_circuits_list_parameters.go b/netbox/client/circuits/circuits_circuits_list_parameters.go index 610284707..c15a04597 100644 --- a/netbox/client/circuits/circuits_circuits_list_parameters.go +++ b/netbox/client/circuits/circuits_circuits_list_parameters.go @@ -78,9 +78,6 @@ type CircuitsCircuitsListParams struct { // Cid. Cid *string - // CidEmpty. - CidEmpty *string - // CidIc. CidIc *string @@ -126,6 +123,18 @@ type CircuitsCircuitsListParams struct { // CommitRaten. CommitRaten *string + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -135,6 +144,36 @@ type CircuitsCircuitsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -361,17 +400,6 @@ func (o *CircuitsCircuitsListParams) SetCid(cid *string) { o.Cid = cid } -// WithCidEmpty adds the cidEmpty to the circuits circuits list params -func (o *CircuitsCircuitsListParams) WithCidEmpty(cidEmpty *string) *CircuitsCircuitsListParams { - o.SetCidEmpty(cidEmpty) - return o -} - -// SetCidEmpty adds the cidEmpty to the circuits circuits list params -func (o *CircuitsCircuitsListParams) SetCidEmpty(cidEmpty *string) { - o.CidEmpty = cidEmpty -} - // WithCidIc adds the cidIc to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithCidIc(cidIc *string) *CircuitsCircuitsListParams { o.SetCidIc(cidIc) @@ -537,6 +565,50 @@ func (o *CircuitsCircuitsListParams) SetCommitRaten(commitRaten *string) { o.CommitRaten = commitRaten } +// WithContact adds the contact to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithContact(contact *string) *CircuitsCircuitsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithContactn(contactn *string) *CircuitsCircuitsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithContactRole(contactRole *string) *CircuitsCircuitsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithContactRolen(contactRolen *string) *CircuitsCircuitsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithCreated(created *string) *CircuitsCircuitsListParams { o.SetCreated(created) @@ -570,6 +642,116 @@ func (o *CircuitsCircuitsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescription(description *string) *CircuitsCircuitsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionIc(descriptionIc *string) *CircuitsCircuitsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionIe(descriptionIe *string) *CircuitsCircuitsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionIew(descriptionIew *string) *CircuitsCircuitsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionIsw(descriptionIsw *string) *CircuitsCircuitsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionn(descriptionn *string) *CircuitsCircuitsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionNic(descriptionNic *string) *CircuitsCircuitsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionNie(descriptionNie *string) *CircuitsCircuitsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionNiew(descriptionNiew *string) *CircuitsCircuitsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the circuits circuits list params +func (o *CircuitsCircuitsListParams) WithDescriptionNisw(descriptionNisw *string) *CircuitsCircuitsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the circuits circuits list params +func (o *CircuitsCircuitsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the circuits circuits list params func (o *CircuitsCircuitsListParams) WithID(id *string) *CircuitsCircuitsListParams { o.SetID(id) @@ -1167,23 +1349,6 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.CidEmpty != nil { - - // query param cid__empty - var qrCidEmpty string - - if o.CidEmpty != nil { - qrCidEmpty = *o.CidEmpty - } - qCidEmpty := qrCidEmpty - if qCidEmpty != "" { - - if err := r.SetQueryParam("cid__empty", qCidEmpty); err != nil { - return err - } - } - } - if o.CidIc != nil { // query param cid__ic @@ -1439,6 +1604,74 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1490,6 +1723,176 @@ func (o *CircuitsCircuitsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id diff --git a/netbox/client/circuits/circuits_circuits_list_responses.go b/netbox/client/circuits/circuits_circuits_list_responses.go index d434804be..8caeb5e8a 100644 --- a/netbox/client/circuits/circuits_circuits_list_responses.go +++ b/netbox/client/circuits/circuits_circuits_list_responses.go @@ -182,6 +182,8 @@ func (o *CircuitsCircuitsListOKBody) validateResults(formats strfmt.Registry) er if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsCircuitsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsCircuitsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *CircuitsCircuitsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsCircuitsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsCircuitsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/circuits/circuits_client.go b/netbox/client/circuits/circuits_client.go index c8aafc80e..e6febd612 100644 --- a/netbox/client/circuits/circuits_client.go +++ b/netbox/client/circuits/circuits_client.go @@ -154,7 +154,7 @@ func (a *Client) CircuitsCircuitTerminationsBulkDelete(params *CircuitsCircuitTe PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -193,7 +193,7 @@ func (a *Client) CircuitsCircuitTerminationsBulkPartialUpdate(params *CircuitsCi PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -232,7 +232,7 @@ func (a *Client) CircuitsCircuitTerminationsBulkUpdate(params *CircuitsCircuitTe PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -271,7 +271,7 @@ func (a *Client) CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTermin PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -310,7 +310,7 @@ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTermin PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -349,7 +349,7 @@ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminat PathPattern: "/circuits/circuit-terminations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -388,7 +388,7 @@ func (a *Client) CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircui PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -427,7 +427,7 @@ func (a *Client) CircuitsCircuitTerminationsPaths(params *CircuitsCircuitTermina PathPattern: "/circuits/circuit-terminations/{id}/paths/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsPathsReader{formats: a.formats}, AuthInfo: authInfo, @@ -466,7 +466,7 @@ func (a *Client) CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminat PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -505,7 +505,7 @@ func (a *Client) CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTermin PathPattern: "/circuits/circuit-terminations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTerminationsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -544,7 +544,7 @@ func (a *Client) CircuitsCircuitTypesBulkDelete(params *CircuitsCircuitTypesBulk PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -583,7 +583,7 @@ func (a *Client) CircuitsCircuitTypesBulkPartialUpdate(params *CircuitsCircuitTy PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -622,7 +622,7 @@ func (a *Client) CircuitsCircuitTypesBulkUpdate(params *CircuitsCircuitTypesBulk PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -661,7 +661,7 @@ func (a *Client) CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreatePa PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -700,7 +700,7 @@ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeletePa PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -739,7 +739,7 @@ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams PathPattern: "/circuits/circuit-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -778,7 +778,7 @@ func (a *Client) CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesP PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -817,7 +817,7 @@ func (a *Client) CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -856,7 +856,7 @@ func (a *Client) CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdatePa PathPattern: "/circuits/circuit-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitTypesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -895,7 +895,7 @@ func (a *Client) CircuitsCircuitsBulkDelete(params *CircuitsCircuitsBulkDeletePa PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -934,7 +934,7 @@ func (a *Client) CircuitsCircuitsBulkPartialUpdate(params *CircuitsCircuitsBulkP PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -973,7 +973,7 @@ func (a *Client) CircuitsCircuitsBulkUpdate(params *CircuitsCircuitsBulkUpdatePa PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1012,7 +1012,7 @@ func (a *Client) CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, au PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1051,7 +1051,7 @@ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, au PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1090,7 +1090,7 @@ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authIn PathPattern: "/circuits/circuits/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1129,7 +1129,7 @@ func (a *Client) CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUp PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1168,7 +1168,7 @@ func (a *Client) CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authIn PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1207,7 +1207,7 @@ func (a *Client) CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, au PathPattern: "/circuits/circuits/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsCircuitsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1246,7 +1246,7 @@ func (a *Client) CircuitsProviderNetworksBulkDelete(params *CircuitsProviderNetw PathPattern: "/circuits/provider-networks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1285,7 +1285,7 @@ func (a *Client) CircuitsProviderNetworksBulkPartialUpdate(params *CircuitsProvi PathPattern: "/circuits/provider-networks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1324,7 +1324,7 @@ func (a *Client) CircuitsProviderNetworksBulkUpdate(params *CircuitsProviderNetw PathPattern: "/circuits/provider-networks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1363,7 +1363,7 @@ func (a *Client) CircuitsProviderNetworksCreate(params *CircuitsProviderNetworks PathPattern: "/circuits/provider-networks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1402,7 +1402,7 @@ func (a *Client) CircuitsProviderNetworksDelete(params *CircuitsProviderNetworks PathPattern: "/circuits/provider-networks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1441,7 +1441,7 @@ func (a *Client) CircuitsProviderNetworksList(params *CircuitsProviderNetworksLi PathPattern: "/circuits/provider-networks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1480,7 +1480,7 @@ func (a *Client) CircuitsProviderNetworksPartialUpdate(params *CircuitsProviderN PathPattern: "/circuits/provider-networks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1519,7 +1519,7 @@ func (a *Client) CircuitsProviderNetworksRead(params *CircuitsProviderNetworksRe PathPattern: "/circuits/provider-networks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1558,7 +1558,7 @@ func (a *Client) CircuitsProviderNetworksUpdate(params *CircuitsProviderNetworks PathPattern: "/circuits/provider-networks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProviderNetworksUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1597,7 +1597,7 @@ func (a *Client) CircuitsProvidersBulkDelete(params *CircuitsProvidersBulkDelete PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1636,7 +1636,7 @@ func (a *Client) CircuitsProvidersBulkPartialUpdate(params *CircuitsProvidersBul PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1675,7 +1675,7 @@ func (a *Client) CircuitsProvidersBulkUpdate(params *CircuitsProvidersBulkUpdate PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1714,7 +1714,7 @@ func (a *Client) CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1753,7 +1753,7 @@ func (a *Client) CircuitsProvidersDelete(params *CircuitsProvidersDeleteParams, PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1792,7 +1792,7 @@ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, auth PathPattern: "/circuits/providers/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1831,7 +1831,7 @@ func (a *Client) CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartial PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1870,7 +1870,7 @@ func (a *Client) CircuitsProvidersRead(params *CircuitsProvidersReadParams, auth PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1909,7 +1909,7 @@ func (a *Client) CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, PathPattern: "/circuits/providers/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &CircuitsProvidersUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/circuits/circuits_provider_networks_list_parameters.go b/netbox/client/circuits/circuits_provider_networks_list_parameters.go index 49ba140ca..a8045c2a2 100644 --- a/netbox/client/circuits/circuits_provider_networks_list_parameters.go +++ b/netbox/client/circuits/circuits_provider_networks_list_parameters.go @@ -84,6 +84,36 @@ type CircuitsProviderNetworksListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -120,9 +150,6 @@ type CircuitsProviderNetworksListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -171,6 +198,36 @@ type CircuitsProviderNetworksListParams struct { // Q. Q *string + // ServiceID. + ServiceID *string + + // ServiceIDIc. + ServiceIDIc *string + + // ServiceIDIe. + ServiceIDIe *string + + // ServiceIDIew. + ServiceIDIew *string + + // ServiceIDIsw. + ServiceIDIsw *string + + // ServiceIDn. + ServiceIDn *string + + // ServiceIDNic. + ServiceIDNic *string + + // ServiceIDNie. + ServiceIDNie *string + + // ServiceIDNiew. + ServiceIDNiew *string + + // ServiceIDNisw. + ServiceIDNisw *string + // Tag. Tag *string @@ -263,6 +320,116 @@ func (o *CircuitsProviderNetworksListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescription(description *string) *CircuitsProviderNetworksListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionIc(descriptionIc *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionIe(descriptionIe *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionIew(descriptionIew *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionIsw(descriptionIsw *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionn(descriptionn *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionNic(descriptionNic *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionNie(descriptionNie *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionNiew(descriptionNiew *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithDescriptionNisw(descriptionNisw *string) *CircuitsProviderNetworksListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithID(id *string) *CircuitsProviderNetworksListParams { o.SetID(id) @@ -384,17 +551,6 @@ func (o *CircuitsProviderNetworksListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the circuits provider networks list params -func (o *CircuitsProviderNetworksListParams) WithNameEmpty(nameEmpty *string) *CircuitsProviderNetworksListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the circuits provider networks list params -func (o *CircuitsProviderNetworksListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithNameIc(nameIc *string) *CircuitsProviderNetworksListParams { o.SetNameIc(nameIc) @@ -560,6 +716,116 @@ func (o *CircuitsProviderNetworksListParams) SetQ(q *string) { o.Q = q } +// WithServiceID adds the serviceID to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceID(serviceID *string) *CircuitsProviderNetworksListParams { + o.SetServiceID(serviceID) + return o +} + +// SetServiceID adds the serviceId to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceID(serviceID *string) { + o.ServiceID = serviceID +} + +// WithServiceIDIc adds the serviceIDIc to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDIc(serviceIDIc *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDIc(serviceIDIc) + return o +} + +// SetServiceIDIc adds the serviceIdIc to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDIc(serviceIDIc *string) { + o.ServiceIDIc = serviceIDIc +} + +// WithServiceIDIe adds the serviceIDIe to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDIe(serviceIDIe *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDIe(serviceIDIe) + return o +} + +// SetServiceIDIe adds the serviceIdIe to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDIe(serviceIDIe *string) { + o.ServiceIDIe = serviceIDIe +} + +// WithServiceIDIew adds the serviceIDIew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDIew(serviceIDIew *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDIew(serviceIDIew) + return o +} + +// SetServiceIDIew adds the serviceIdIew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDIew(serviceIDIew *string) { + o.ServiceIDIew = serviceIDIew +} + +// WithServiceIDIsw adds the serviceIDIsw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDIsw(serviceIDIsw *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDIsw(serviceIDIsw) + return o +} + +// SetServiceIDIsw adds the serviceIdIsw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDIsw(serviceIDIsw *string) { + o.ServiceIDIsw = serviceIDIsw +} + +// WithServiceIDn adds the serviceIDn to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDn(serviceIDn *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDn(serviceIDn) + return o +} + +// SetServiceIDn adds the serviceIdN to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDn(serviceIDn *string) { + o.ServiceIDn = serviceIDn +} + +// WithServiceIDNic adds the serviceIDNic to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDNic(serviceIDNic *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDNic(serviceIDNic) + return o +} + +// SetServiceIDNic adds the serviceIdNic to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDNic(serviceIDNic *string) { + o.ServiceIDNic = serviceIDNic +} + +// WithServiceIDNie adds the serviceIDNie to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDNie(serviceIDNie *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDNie(serviceIDNie) + return o +} + +// SetServiceIDNie adds the serviceIdNie to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDNie(serviceIDNie *string) { + o.ServiceIDNie = serviceIDNie +} + +// WithServiceIDNiew adds the serviceIDNiew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDNiew(serviceIDNiew *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDNiew(serviceIDNiew) + return o +} + +// SetServiceIDNiew adds the serviceIdNiew to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDNiew(serviceIDNiew *string) { + o.ServiceIDNiew = serviceIDNiew +} + +// WithServiceIDNisw adds the serviceIDNisw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) WithServiceIDNisw(serviceIDNisw *string) *CircuitsProviderNetworksListParams { + o.SetServiceIDNisw(serviceIDNisw) + return o +} + +// SetServiceIDNisw adds the serviceIdNisw to the circuits provider networks list params +func (o *CircuitsProviderNetworksListParams) SetServiceIDNisw(serviceIDNisw *string) { + o.ServiceIDNisw = serviceIDNisw +} + // WithTag adds the tag to the circuits provider networks list params func (o *CircuitsProviderNetworksListParams) WithTag(tag *string) *CircuitsProviderNetworksListParams { o.SetTag(tag) @@ -641,6 +907,176 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -828,23 +1264,6 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1100,6 +1519,176 @@ func (o *CircuitsProviderNetworksListParams) WriteToRequest(r runtime.ClientRequ } } + if o.ServiceID != nil { + + // query param service_id + var qrServiceID string + + if o.ServiceID != nil { + qrServiceID = *o.ServiceID + } + qServiceID := qrServiceID + if qServiceID != "" { + + if err := r.SetQueryParam("service_id", qServiceID); err != nil { + return err + } + } + } + + if o.ServiceIDIc != nil { + + // query param service_id__ic + var qrServiceIDIc string + + if o.ServiceIDIc != nil { + qrServiceIDIc = *o.ServiceIDIc + } + qServiceIDIc := qrServiceIDIc + if qServiceIDIc != "" { + + if err := r.SetQueryParam("service_id__ic", qServiceIDIc); err != nil { + return err + } + } + } + + if o.ServiceIDIe != nil { + + // query param service_id__ie + var qrServiceIDIe string + + if o.ServiceIDIe != nil { + qrServiceIDIe = *o.ServiceIDIe + } + qServiceIDIe := qrServiceIDIe + if qServiceIDIe != "" { + + if err := r.SetQueryParam("service_id__ie", qServiceIDIe); err != nil { + return err + } + } + } + + if o.ServiceIDIew != nil { + + // query param service_id__iew + var qrServiceIDIew string + + if o.ServiceIDIew != nil { + qrServiceIDIew = *o.ServiceIDIew + } + qServiceIDIew := qrServiceIDIew + if qServiceIDIew != "" { + + if err := r.SetQueryParam("service_id__iew", qServiceIDIew); err != nil { + return err + } + } + } + + if o.ServiceIDIsw != nil { + + // query param service_id__isw + var qrServiceIDIsw string + + if o.ServiceIDIsw != nil { + qrServiceIDIsw = *o.ServiceIDIsw + } + qServiceIDIsw := qrServiceIDIsw + if qServiceIDIsw != "" { + + if err := r.SetQueryParam("service_id__isw", qServiceIDIsw); err != nil { + return err + } + } + } + + if o.ServiceIDn != nil { + + // query param service_id__n + var qrServiceIDn string + + if o.ServiceIDn != nil { + qrServiceIDn = *o.ServiceIDn + } + qServiceIDn := qrServiceIDn + if qServiceIDn != "" { + + if err := r.SetQueryParam("service_id__n", qServiceIDn); err != nil { + return err + } + } + } + + if o.ServiceIDNic != nil { + + // query param service_id__nic + var qrServiceIDNic string + + if o.ServiceIDNic != nil { + qrServiceIDNic = *o.ServiceIDNic + } + qServiceIDNic := qrServiceIDNic + if qServiceIDNic != "" { + + if err := r.SetQueryParam("service_id__nic", qServiceIDNic); err != nil { + return err + } + } + } + + if o.ServiceIDNie != nil { + + // query param service_id__nie + var qrServiceIDNie string + + if o.ServiceIDNie != nil { + qrServiceIDNie = *o.ServiceIDNie + } + qServiceIDNie := qrServiceIDNie + if qServiceIDNie != "" { + + if err := r.SetQueryParam("service_id__nie", qServiceIDNie); err != nil { + return err + } + } + } + + if o.ServiceIDNiew != nil { + + // query param service_id__niew + var qrServiceIDNiew string + + if o.ServiceIDNiew != nil { + qrServiceIDNiew = *o.ServiceIDNiew + } + qServiceIDNiew := qrServiceIDNiew + if qServiceIDNiew != "" { + + if err := r.SetQueryParam("service_id__niew", qServiceIDNiew); err != nil { + return err + } + } + } + + if o.ServiceIDNisw != nil { + + // query param service_id__nisw + var qrServiceIDNisw string + + if o.ServiceIDNisw != nil { + qrServiceIDNisw = *o.ServiceIDNisw + } + qServiceIDNisw := qrServiceIDNisw + if qServiceIDNisw != "" { + + if err := r.SetQueryParam("service_id__nisw", qServiceIDNisw); err != nil { + return err + } + } + } + if o.Tag != nil { // query param tag diff --git a/netbox/client/circuits/circuits_provider_networks_list_responses.go b/netbox/client/circuits/circuits_provider_networks_list_responses.go index a7f125eb2..7515a8be9 100644 --- a/netbox/client/circuits/circuits_provider_networks_list_responses.go +++ b/netbox/client/circuits/circuits_provider_networks_list_responses.go @@ -182,6 +182,8 @@ func (o *CircuitsProviderNetworksListOKBody) validateResults(formats strfmt.Regi if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsProviderNetworksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsProviderNetworksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *CircuitsProviderNetworksListOKBody) contextValidateResults(ctx context. if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsProviderNetworksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsProviderNetworksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/circuits/circuits_providers_bulk_partial_update_parameters.go b/netbox/client/circuits/circuits_providers_bulk_partial_update_parameters.go index 0ee00145b..744fba90e 100644 --- a/netbox/client/circuits/circuits_providers_bulk_partial_update_parameters.go +++ b/netbox/client/circuits/circuits_providers_bulk_partial_update_parameters.go @@ -77,7 +77,7 @@ func NewCircuitsProvidersBulkPartialUpdateParamsWithHTTPClient(client *http.Clie type CircuitsProvidersBulkPartialUpdateParams struct { // Data. - Data *models.Provider + Data *models.WritableProvider timeout time.Duration Context context.Context @@ -133,13 +133,13 @@ func (o *CircuitsProvidersBulkPartialUpdateParams) SetHTTPClient(client *http.Cl } // WithData adds the data to the circuits providers bulk partial update params -func (o *CircuitsProvidersBulkPartialUpdateParams) WithData(data *models.Provider) *CircuitsProvidersBulkPartialUpdateParams { +func (o *CircuitsProvidersBulkPartialUpdateParams) WithData(data *models.WritableProvider) *CircuitsProvidersBulkPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the circuits providers bulk partial update params -func (o *CircuitsProvidersBulkPartialUpdateParams) SetData(data *models.Provider) { +func (o *CircuitsProvidersBulkPartialUpdateParams) SetData(data *models.WritableProvider) { o.Data = data } diff --git a/netbox/client/circuits/circuits_providers_bulk_update_parameters.go b/netbox/client/circuits/circuits_providers_bulk_update_parameters.go index 1316001fb..a9f056d38 100644 --- a/netbox/client/circuits/circuits_providers_bulk_update_parameters.go +++ b/netbox/client/circuits/circuits_providers_bulk_update_parameters.go @@ -77,7 +77,7 @@ func NewCircuitsProvidersBulkUpdateParamsWithHTTPClient(client *http.Client) *Ci type CircuitsProvidersBulkUpdateParams struct { // Data. - Data *models.Provider + Data *models.WritableProvider timeout time.Duration Context context.Context @@ -133,13 +133,13 @@ func (o *CircuitsProvidersBulkUpdateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the circuits providers bulk update params -func (o *CircuitsProvidersBulkUpdateParams) WithData(data *models.Provider) *CircuitsProvidersBulkUpdateParams { +func (o *CircuitsProvidersBulkUpdateParams) WithData(data *models.WritableProvider) *CircuitsProvidersBulkUpdateParams { o.SetData(data) return o } // SetData adds the data to the circuits providers bulk update params -func (o *CircuitsProvidersBulkUpdateParams) SetData(data *models.Provider) { +func (o *CircuitsProvidersBulkUpdateParams) SetData(data *models.WritableProvider) { o.Data = data } diff --git a/netbox/client/circuits/circuits_providers_create_parameters.go b/netbox/client/circuits/circuits_providers_create_parameters.go index 6843dafa8..64dd24261 100644 --- a/netbox/client/circuits/circuits_providers_create_parameters.go +++ b/netbox/client/circuits/circuits_providers_create_parameters.go @@ -77,7 +77,7 @@ func NewCircuitsProvidersCreateParamsWithHTTPClient(client *http.Client) *Circui type CircuitsProvidersCreateParams struct { // Data. - Data *models.Provider + Data *models.WritableProvider timeout time.Duration Context context.Context @@ -133,13 +133,13 @@ func (o *CircuitsProvidersCreateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the circuits providers create params -func (o *CircuitsProvidersCreateParams) WithData(data *models.Provider) *CircuitsProvidersCreateParams { +func (o *CircuitsProvidersCreateParams) WithData(data *models.WritableProvider) *CircuitsProvidersCreateParams { o.SetData(data) return o } // SetData adds the data to the circuits providers create params -func (o *CircuitsProvidersCreateParams) SetData(data *models.Provider) { +func (o *CircuitsProvidersCreateParams) SetData(data *models.WritableProvider) { o.Data = data } diff --git a/netbox/client/circuits/circuits_providers_list_parameters.go b/netbox/client/circuits/circuits_providers_list_parameters.go index 356682c0b..49489be56 100644 --- a/netbox/client/circuits/circuits_providers_list_parameters.go +++ b/netbox/client/circuits/circuits_providers_list_parameters.go @@ -78,9 +78,6 @@ type CircuitsProvidersListParams struct { // Account. Account *string - // AccountEmpty. - AccountEmpty *string - // AccountIc. AccountIc *string @@ -126,6 +123,24 @@ type CircuitsProvidersListParams struct { // Asnn. Asnn *string + // AsnID. + AsnID *string + + // AsnIDn. + AsnIDn *string + + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -171,9 +186,6 @@ type CircuitsProvidersListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -249,9 +261,6 @@ type CircuitsProvidersListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -349,17 +358,6 @@ func (o *CircuitsProvidersListParams) SetAccount(account *string) { o.Account = account } -// WithAccountEmpty adds the accountEmpty to the circuits providers list params -func (o *CircuitsProvidersListParams) WithAccountEmpty(accountEmpty *string) *CircuitsProvidersListParams { - o.SetAccountEmpty(accountEmpty) - return o -} - -// SetAccountEmpty adds the accountEmpty to the circuits providers list params -func (o *CircuitsProvidersListParams) SetAccountEmpty(accountEmpty *string) { - o.AccountEmpty = accountEmpty -} - // WithAccountIc adds the accountIc to the circuits providers list params func (o *CircuitsProvidersListParams) WithAccountIc(accountIc *string) *CircuitsProvidersListParams { o.SetAccountIc(accountIc) @@ -525,6 +523,72 @@ func (o *CircuitsProvidersListParams) SetAsnn(asnn *string) { o.Asnn = asnn } +// WithAsnID adds the asnID to the circuits providers list params +func (o *CircuitsProvidersListParams) WithAsnID(asnID *string) *CircuitsProvidersListParams { + o.SetAsnID(asnID) + return o +} + +// SetAsnID adds the asnId to the circuits providers list params +func (o *CircuitsProvidersListParams) SetAsnID(asnID *string) { + o.AsnID = asnID +} + +// WithAsnIDn adds the asnIDn to the circuits providers list params +func (o *CircuitsProvidersListParams) WithAsnIDn(asnIDn *string) *CircuitsProvidersListParams { + o.SetAsnIDn(asnIDn) + return o +} + +// SetAsnIDn adds the asnIdN to the circuits providers list params +func (o *CircuitsProvidersListParams) SetAsnIDn(asnIDn *string) { + o.AsnIDn = asnIDn +} + +// WithContact adds the contact to the circuits providers list params +func (o *CircuitsProvidersListParams) WithContact(contact *string) *CircuitsProvidersListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the circuits providers list params +func (o *CircuitsProvidersListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the circuits providers list params +func (o *CircuitsProvidersListParams) WithContactn(contactn *string) *CircuitsProvidersListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the circuits providers list params +func (o *CircuitsProvidersListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the circuits providers list params +func (o *CircuitsProvidersListParams) WithContactRole(contactRole *string) *CircuitsProvidersListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the circuits providers list params +func (o *CircuitsProvidersListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the circuits providers list params +func (o *CircuitsProvidersListParams) WithContactRolen(contactRolen *string) *CircuitsProvidersListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the circuits providers list params +func (o *CircuitsProvidersListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the circuits providers list params func (o *CircuitsProvidersListParams) WithCreated(created *string) *CircuitsProvidersListParams { o.SetCreated(created) @@ -679,17 +743,6 @@ func (o *CircuitsProvidersListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the circuits providers list params -func (o *CircuitsProvidersListParams) WithNameEmpty(nameEmpty *string) *CircuitsProvidersListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the circuits providers list params -func (o *CircuitsProvidersListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the circuits providers list params func (o *CircuitsProvidersListParams) WithNameIc(nameIc *string) *CircuitsProvidersListParams { o.SetNameIc(nameIc) @@ -954,17 +1007,6 @@ func (o *CircuitsProvidersListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the circuits providers list params -func (o *CircuitsProvidersListParams) WithSlugEmpty(slugEmpty *string) *CircuitsProvidersListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the circuits providers list params -func (o *CircuitsProvidersListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the circuits providers list params func (o *CircuitsProvidersListParams) WithSlugIc(slugIc *string) *CircuitsProvidersListParams { o.SetSlugIc(slugIc) @@ -1111,23 +1153,6 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.AccountEmpty != nil { - - // query param account__empty - var qrAccountEmpty string - - if o.AccountEmpty != nil { - qrAccountEmpty = *o.AccountEmpty - } - qAccountEmpty := qrAccountEmpty - if qAccountEmpty != "" { - - if err := r.SetQueryParam("account__empty", qAccountEmpty); err != nil { - return err - } - } - } - if o.AccountIc != nil { // query param account__ic @@ -1383,6 +1408,108 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.AsnID != nil { + + // query param asn_id + var qrAsnID string + + if o.AsnID != nil { + qrAsnID = *o.AsnID + } + qAsnID := qrAsnID + if qAsnID != "" { + + if err := r.SetQueryParam("asn_id", qAsnID); err != nil { + return err + } + } + } + + if o.AsnIDn != nil { + + // query param asn_id__n + var qrAsnIDn string + + if o.AsnIDn != nil { + qrAsnIDn = *o.AsnIDn + } + qAsnIDn := qrAsnIDn + if qAsnIDn != "" { + + if err := r.SetQueryParam("asn_id__n", qAsnIDn); err != nil { + return err + } + } + } + + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1621,23 +1748,6 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -2046,23 +2156,6 @@ func (o *CircuitsProvidersListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic diff --git a/netbox/client/circuits/circuits_providers_list_responses.go b/netbox/client/circuits/circuits_providers_list_responses.go index 9c738fc33..7d7ea2701 100644 --- a/netbox/client/circuits/circuits_providers_list_responses.go +++ b/netbox/client/circuits/circuits_providers_list_responses.go @@ -182,6 +182,8 @@ func (o *CircuitsProvidersListOKBody) validateResults(formats strfmt.Registry) e if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsProvidersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsProvidersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *CircuitsProvidersListOKBody) contextValidateResults(ctx context.Context if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuitsProvidersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuitsProvidersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/circuits/circuits_providers_partial_update_parameters.go b/netbox/client/circuits/circuits_providers_partial_update_parameters.go index 70bedd1d3..ad73455cf 100644 --- a/netbox/client/circuits/circuits_providers_partial_update_parameters.go +++ b/netbox/client/circuits/circuits_providers_partial_update_parameters.go @@ -78,7 +78,7 @@ func NewCircuitsProvidersPartialUpdateParamsWithHTTPClient(client *http.Client) type CircuitsProvidersPartialUpdateParams struct { // Data. - Data *models.Provider + Data *models.WritableProvider /* ID. @@ -140,13 +140,13 @@ func (o *CircuitsProvidersPartialUpdateParams) SetHTTPClient(client *http.Client } // WithData adds the data to the circuits providers partial update params -func (o *CircuitsProvidersPartialUpdateParams) WithData(data *models.Provider) *CircuitsProvidersPartialUpdateParams { +func (o *CircuitsProvidersPartialUpdateParams) WithData(data *models.WritableProvider) *CircuitsProvidersPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the circuits providers partial update params -func (o *CircuitsProvidersPartialUpdateParams) SetData(data *models.Provider) { +func (o *CircuitsProvidersPartialUpdateParams) SetData(data *models.WritableProvider) { o.Data = data } diff --git a/netbox/client/circuits/circuits_providers_update_parameters.go b/netbox/client/circuits/circuits_providers_update_parameters.go index 49728650e..ed4e99fb3 100644 --- a/netbox/client/circuits/circuits_providers_update_parameters.go +++ b/netbox/client/circuits/circuits_providers_update_parameters.go @@ -78,7 +78,7 @@ func NewCircuitsProvidersUpdateParamsWithHTTPClient(client *http.Client) *Circui type CircuitsProvidersUpdateParams struct { // Data. - Data *models.Provider + Data *models.WritableProvider /* ID. @@ -140,13 +140,13 @@ func (o *CircuitsProvidersUpdateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the circuits providers update params -func (o *CircuitsProvidersUpdateParams) WithData(data *models.Provider) *CircuitsProvidersUpdateParams { +func (o *CircuitsProvidersUpdateParams) WithData(data *models.WritableProvider) *CircuitsProvidersUpdateParams { o.SetData(data) return o } // SetData adds the data to the circuits providers update params -func (o *CircuitsProvidersUpdateParams) SetData(data *models.Provider) { +func (o *CircuitsProvidersUpdateParams) SetData(data *models.WritableProvider) { o.Data = data } diff --git a/netbox/client/dcim/dcim_cables_list_parameters.go b/netbox/client/dcim/dcim_cables_list_parameters.go index fc5741dce..3ca90deb1 100644 --- a/netbox/client/dcim/dcim_cables_list_parameters.go +++ b/netbox/client/dcim/dcim_cables_list_parameters.go @@ -117,9 +117,6 @@ type DcimCablesListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -222,9 +219,75 @@ type DcimCablesListParams struct { // Tenant. Tenant *string + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + // TenantID. TenantID *string + // TenantIDn. + TenantIDn *string + + // TerminationaID. + TerminationaID *string + + // TerminationaIDGt. + TerminationaIDGt *string + + // TerminationaIDGte. + TerminationaIDGte *string + + // TerminationaIDLt. + TerminationaIDLt *string + + // TerminationaIDLte. + TerminationaIDLte *string + + // TerminationaIDn. + TerminationaIDn *string + + // TerminationaType. + TerminationaType *string + + // TerminationaTypen. + TerminationaTypen *string + + // TerminationbID. + TerminationbID *string + + // TerminationbIDGt. + TerminationbIDGt *string + + // TerminationbIDGte. + TerminationbIDGte *string + + // TerminationbIDLt. + TerminationbIDLt *string + + // TerminationbIDLte. + TerminationbIDLte *string + + // TerminationbIDn. + TerminationbIDn *string + + // TerminationbType. + TerminationbType *string + + // TerminationbTypen. + TerminationbTypen *string + // Type. Type *string @@ -438,17 +501,6 @@ func (o *DcimCablesListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim cables list params -func (o *DcimCablesListParams) WithLabelEmpty(labelEmpty *string) *DcimCablesListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim cables list params -func (o *DcimCablesListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim cables list params func (o *DcimCablesListParams) WithLabelIc(labelIc *string) *DcimCablesListParams { o.SetLabelIc(labelIc) @@ -801,6 +853,61 @@ func (o *DcimCablesListParams) SetTenant(tenant *string) { o.Tenant = tenant } +// WithTenantn adds the tenantn to the dcim cables list params +func (o *DcimCablesListParams) WithTenantn(tenantn *string) *DcimCablesListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the dcim cables list params +func (o *DcimCablesListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the dcim cables list params +func (o *DcimCablesListParams) WithTenantGroup(tenantGroup *string) *DcimCablesListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the dcim cables list params +func (o *DcimCablesListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the dcim cables list params +func (o *DcimCablesListParams) WithTenantGroupn(tenantGroupn *string) *DcimCablesListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the dcim cables list params +func (o *DcimCablesListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the dcim cables list params +func (o *DcimCablesListParams) WithTenantGroupID(tenantGroupID *string) *DcimCablesListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the dcim cables list params +func (o *DcimCablesListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the dcim cables list params +func (o *DcimCablesListParams) WithTenantGroupIDn(tenantGroupIDn *string) *DcimCablesListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the dcim cables list params +func (o *DcimCablesListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + // WithTenantID adds the tenantID to the dcim cables list params func (o *DcimCablesListParams) WithTenantID(tenantID *string) *DcimCablesListParams { o.SetTenantID(tenantID) @@ -812,6 +919,193 @@ func (o *DcimCablesListParams) SetTenantID(tenantID *string) { o.TenantID = tenantID } +// WithTenantIDn adds the tenantIDn to the dcim cables list params +func (o *DcimCablesListParams) WithTenantIDn(tenantIDn *string) *DcimCablesListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the dcim cables list params +func (o *DcimCablesListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + +// WithTerminationaID adds the terminationaID to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaID(terminationaID *string) *DcimCablesListParams { + o.SetTerminationaID(terminationaID) + return o +} + +// SetTerminationaID adds the terminationAId to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaID(terminationaID *string) { + o.TerminationaID = terminationaID +} + +// WithTerminationaIDGt adds the terminationaIDGt to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaIDGt(terminationaIDGt *string) *DcimCablesListParams { + o.SetTerminationaIDGt(terminationaIDGt) + return o +} + +// SetTerminationaIDGt adds the terminationAIdGt to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaIDGt(terminationaIDGt *string) { + o.TerminationaIDGt = terminationaIDGt +} + +// WithTerminationaIDGte adds the terminationaIDGte to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaIDGte(terminationaIDGte *string) *DcimCablesListParams { + o.SetTerminationaIDGte(terminationaIDGte) + return o +} + +// SetTerminationaIDGte adds the terminationAIdGte to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaIDGte(terminationaIDGte *string) { + o.TerminationaIDGte = terminationaIDGte +} + +// WithTerminationaIDLt adds the terminationaIDLt to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaIDLt(terminationaIDLt *string) *DcimCablesListParams { + o.SetTerminationaIDLt(terminationaIDLt) + return o +} + +// SetTerminationaIDLt adds the terminationAIdLt to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaIDLt(terminationaIDLt *string) { + o.TerminationaIDLt = terminationaIDLt +} + +// WithTerminationaIDLte adds the terminationaIDLte to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaIDLte(terminationaIDLte *string) *DcimCablesListParams { + o.SetTerminationaIDLte(terminationaIDLte) + return o +} + +// SetTerminationaIDLte adds the terminationAIdLte to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaIDLte(terminationaIDLte *string) { + o.TerminationaIDLte = terminationaIDLte +} + +// WithTerminationaIDn adds the terminationaIDn to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaIDn(terminationaIDn *string) *DcimCablesListParams { + o.SetTerminationaIDn(terminationaIDn) + return o +} + +// SetTerminationaIDn adds the terminationAIdN to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaIDn(terminationaIDn *string) { + o.TerminationaIDn = terminationaIDn +} + +// WithTerminationaType adds the terminationaType to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaType(terminationaType *string) *DcimCablesListParams { + o.SetTerminationaType(terminationaType) + return o +} + +// SetTerminationaType adds the terminationAType to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaType(terminationaType *string) { + o.TerminationaType = terminationaType +} + +// WithTerminationaTypen adds the terminationaTypen to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationaTypen(terminationaTypen *string) *DcimCablesListParams { + o.SetTerminationaTypen(terminationaTypen) + return o +} + +// SetTerminationaTypen adds the terminationATypeN to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationaTypen(terminationaTypen *string) { + o.TerminationaTypen = terminationaTypen +} + +// WithTerminationbID adds the terminationbID to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbID(terminationbID *string) *DcimCablesListParams { + o.SetTerminationbID(terminationbID) + return o +} + +// SetTerminationbID adds the terminationBId to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbID(terminationbID *string) { + o.TerminationbID = terminationbID +} + +// WithTerminationbIDGt adds the terminationbIDGt to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbIDGt(terminationbIDGt *string) *DcimCablesListParams { + o.SetTerminationbIDGt(terminationbIDGt) + return o +} + +// SetTerminationbIDGt adds the terminationBIdGt to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbIDGt(terminationbIDGt *string) { + o.TerminationbIDGt = terminationbIDGt +} + +// WithTerminationbIDGte adds the terminationbIDGte to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbIDGte(terminationbIDGte *string) *DcimCablesListParams { + o.SetTerminationbIDGte(terminationbIDGte) + return o +} + +// SetTerminationbIDGte adds the terminationBIdGte to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbIDGte(terminationbIDGte *string) { + o.TerminationbIDGte = terminationbIDGte +} + +// WithTerminationbIDLt adds the terminationbIDLt to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbIDLt(terminationbIDLt *string) *DcimCablesListParams { + o.SetTerminationbIDLt(terminationbIDLt) + return o +} + +// SetTerminationbIDLt adds the terminationBIdLt to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbIDLt(terminationbIDLt *string) { + o.TerminationbIDLt = terminationbIDLt +} + +// WithTerminationbIDLte adds the terminationbIDLte to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbIDLte(terminationbIDLte *string) *DcimCablesListParams { + o.SetTerminationbIDLte(terminationbIDLte) + return o +} + +// SetTerminationbIDLte adds the terminationBIdLte to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbIDLte(terminationbIDLte *string) { + o.TerminationbIDLte = terminationbIDLte +} + +// WithTerminationbIDn adds the terminationbIDn to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbIDn(terminationbIDn *string) *DcimCablesListParams { + o.SetTerminationbIDn(terminationbIDn) + return o +} + +// SetTerminationbIDn adds the terminationBIdN to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbIDn(terminationbIDn *string) { + o.TerminationbIDn = terminationbIDn +} + +// WithTerminationbType adds the terminationbType to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbType(terminationbType *string) *DcimCablesListParams { + o.SetTerminationbType(terminationbType) + return o +} + +// SetTerminationbType adds the terminationBType to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbType(terminationbType *string) { + o.TerminationbType = terminationbType +} + +// WithTerminationbTypen adds the terminationbTypen to the dcim cables list params +func (o *DcimCablesListParams) WithTerminationbTypen(terminationbTypen *string) *DcimCablesListParams { + o.SetTerminationbTypen(terminationbTypen) + return o +} + +// SetTerminationbTypen adds the terminationBTypeN to the dcim cables list params +func (o *DcimCablesListParams) SetTerminationbTypen(terminationbTypen *string) { + o.TerminationbTypen = terminationbTypen +} + // WithType adds the typeVar to the dcim cables list params func (o *DcimCablesListParams) WithType(typeVar *string) *DcimCablesListParams { o.SetType(typeVar) @@ -1080,23 +1374,6 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -1641,6 +1918,91 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + if o.TenantID != nil { // query param tenant_id @@ -1658,6 +2020,295 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + + if o.TerminationaID != nil { + + // query param termination_a_id + var qrTerminationaID string + + if o.TerminationaID != nil { + qrTerminationaID = *o.TerminationaID + } + qTerminationaID := qrTerminationaID + if qTerminationaID != "" { + + if err := r.SetQueryParam("termination_a_id", qTerminationaID); err != nil { + return err + } + } + } + + if o.TerminationaIDGt != nil { + + // query param termination_a_id__gt + var qrTerminationaIDGt string + + if o.TerminationaIDGt != nil { + qrTerminationaIDGt = *o.TerminationaIDGt + } + qTerminationaIDGt := qrTerminationaIDGt + if qTerminationaIDGt != "" { + + if err := r.SetQueryParam("termination_a_id__gt", qTerminationaIDGt); err != nil { + return err + } + } + } + + if o.TerminationaIDGte != nil { + + // query param termination_a_id__gte + var qrTerminationaIDGte string + + if o.TerminationaIDGte != nil { + qrTerminationaIDGte = *o.TerminationaIDGte + } + qTerminationaIDGte := qrTerminationaIDGte + if qTerminationaIDGte != "" { + + if err := r.SetQueryParam("termination_a_id__gte", qTerminationaIDGte); err != nil { + return err + } + } + } + + if o.TerminationaIDLt != nil { + + // query param termination_a_id__lt + var qrTerminationaIDLt string + + if o.TerminationaIDLt != nil { + qrTerminationaIDLt = *o.TerminationaIDLt + } + qTerminationaIDLt := qrTerminationaIDLt + if qTerminationaIDLt != "" { + + if err := r.SetQueryParam("termination_a_id__lt", qTerminationaIDLt); err != nil { + return err + } + } + } + + if o.TerminationaIDLte != nil { + + // query param termination_a_id__lte + var qrTerminationaIDLte string + + if o.TerminationaIDLte != nil { + qrTerminationaIDLte = *o.TerminationaIDLte + } + qTerminationaIDLte := qrTerminationaIDLte + if qTerminationaIDLte != "" { + + if err := r.SetQueryParam("termination_a_id__lte", qTerminationaIDLte); err != nil { + return err + } + } + } + + if o.TerminationaIDn != nil { + + // query param termination_a_id__n + var qrTerminationaIDn string + + if o.TerminationaIDn != nil { + qrTerminationaIDn = *o.TerminationaIDn + } + qTerminationaIDn := qrTerminationaIDn + if qTerminationaIDn != "" { + + if err := r.SetQueryParam("termination_a_id__n", qTerminationaIDn); err != nil { + return err + } + } + } + + if o.TerminationaType != nil { + + // query param termination_a_type + var qrTerminationaType string + + if o.TerminationaType != nil { + qrTerminationaType = *o.TerminationaType + } + qTerminationaType := qrTerminationaType + if qTerminationaType != "" { + + if err := r.SetQueryParam("termination_a_type", qTerminationaType); err != nil { + return err + } + } + } + + if o.TerminationaTypen != nil { + + // query param termination_a_type__n + var qrTerminationaTypen string + + if o.TerminationaTypen != nil { + qrTerminationaTypen = *o.TerminationaTypen + } + qTerminationaTypen := qrTerminationaTypen + if qTerminationaTypen != "" { + + if err := r.SetQueryParam("termination_a_type__n", qTerminationaTypen); err != nil { + return err + } + } + } + + if o.TerminationbID != nil { + + // query param termination_b_id + var qrTerminationbID string + + if o.TerminationbID != nil { + qrTerminationbID = *o.TerminationbID + } + qTerminationbID := qrTerminationbID + if qTerminationbID != "" { + + if err := r.SetQueryParam("termination_b_id", qTerminationbID); err != nil { + return err + } + } + } + + if o.TerminationbIDGt != nil { + + // query param termination_b_id__gt + var qrTerminationbIDGt string + + if o.TerminationbIDGt != nil { + qrTerminationbIDGt = *o.TerminationbIDGt + } + qTerminationbIDGt := qrTerminationbIDGt + if qTerminationbIDGt != "" { + + if err := r.SetQueryParam("termination_b_id__gt", qTerminationbIDGt); err != nil { + return err + } + } + } + + if o.TerminationbIDGte != nil { + + // query param termination_b_id__gte + var qrTerminationbIDGte string + + if o.TerminationbIDGte != nil { + qrTerminationbIDGte = *o.TerminationbIDGte + } + qTerminationbIDGte := qrTerminationbIDGte + if qTerminationbIDGte != "" { + + if err := r.SetQueryParam("termination_b_id__gte", qTerminationbIDGte); err != nil { + return err + } + } + } + + if o.TerminationbIDLt != nil { + + // query param termination_b_id__lt + var qrTerminationbIDLt string + + if o.TerminationbIDLt != nil { + qrTerminationbIDLt = *o.TerminationbIDLt + } + qTerminationbIDLt := qrTerminationbIDLt + if qTerminationbIDLt != "" { + + if err := r.SetQueryParam("termination_b_id__lt", qTerminationbIDLt); err != nil { + return err + } + } + } + + if o.TerminationbIDLte != nil { + + // query param termination_b_id__lte + var qrTerminationbIDLte string + + if o.TerminationbIDLte != nil { + qrTerminationbIDLte = *o.TerminationbIDLte + } + qTerminationbIDLte := qrTerminationbIDLte + if qTerminationbIDLte != "" { + + if err := r.SetQueryParam("termination_b_id__lte", qTerminationbIDLte); err != nil { + return err + } + } + } + + if o.TerminationbIDn != nil { + + // query param termination_b_id__n + var qrTerminationbIDn string + + if o.TerminationbIDn != nil { + qrTerminationbIDn = *o.TerminationbIDn + } + qTerminationbIDn := qrTerminationbIDn + if qTerminationbIDn != "" { + + if err := r.SetQueryParam("termination_b_id__n", qTerminationbIDn); err != nil { + return err + } + } + } + + if o.TerminationbType != nil { + + // query param termination_b_type + var qrTerminationbType string + + if o.TerminationbType != nil { + qrTerminationbType = *o.TerminationbType + } + qTerminationbType := qrTerminationbType + if qTerminationbType != "" { + + if err := r.SetQueryParam("termination_b_type", qTerminationbType); err != nil { + return err + } + } + } + + if o.TerminationbTypen != nil { + + // query param termination_b_type__n + var qrTerminationbTypen string + + if o.TerminationbTypen != nil { + qrTerminationbTypen = *o.TerminationbTypen + } + qTerminationbTypen := qrTerminationbTypen + if qTerminationbTypen != "" { + + if err := r.SetQueryParam("termination_b_type__n", qTerminationbTypen); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_cables_list_responses.go b/netbox/client/dcim/dcim_cables_list_responses.go index 5226bfd28..a5a95fd7c 100644 --- a/netbox/client/dcim/dcim_cables_list_responses.go +++ b/netbox/client/dcim/dcim_cables_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimCablesListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimCablesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimCablesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimCablesListOKBody) contextValidateResults(ctx context.Context, forma if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimCablesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimCablesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_client.go b/netbox/client/dcim/dcim_client.go index 90b493574..b7dd00365 100644 --- a/netbox/client/dcim/dcim_client.go +++ b/netbox/client/dcim/dcim_client.go @@ -309,6 +309,42 @@ type ClientService interface { DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInterfacesUpdateOK, error) + DcimInventoryItemRolesBulkDelete(params *DcimInventoryItemRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesBulkDeleteNoContent, error) + + DcimInventoryItemRolesBulkPartialUpdate(params *DcimInventoryItemRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesBulkPartialUpdateOK, error) + + DcimInventoryItemRolesBulkUpdate(params *DcimInventoryItemRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesBulkUpdateOK, error) + + DcimInventoryItemRolesCreate(params *DcimInventoryItemRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesCreateCreated, error) + + DcimInventoryItemRolesDelete(params *DcimInventoryItemRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesDeleteNoContent, error) + + DcimInventoryItemRolesList(params *DcimInventoryItemRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesListOK, error) + + DcimInventoryItemRolesPartialUpdate(params *DcimInventoryItemRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesPartialUpdateOK, error) + + DcimInventoryItemRolesRead(params *DcimInventoryItemRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesReadOK, error) + + DcimInventoryItemRolesUpdate(params *DcimInventoryItemRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesUpdateOK, error) + + DcimInventoryItemTemplatesBulkDelete(params *DcimInventoryItemTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesBulkDeleteNoContent, error) + + DcimInventoryItemTemplatesBulkPartialUpdate(params *DcimInventoryItemTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesBulkPartialUpdateOK, error) + + DcimInventoryItemTemplatesBulkUpdate(params *DcimInventoryItemTemplatesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesBulkUpdateOK, error) + + DcimInventoryItemTemplatesCreate(params *DcimInventoryItemTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesCreateCreated, error) + + DcimInventoryItemTemplatesDelete(params *DcimInventoryItemTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesDeleteNoContent, error) + + DcimInventoryItemTemplatesList(params *DcimInventoryItemTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesListOK, error) + + DcimInventoryItemTemplatesPartialUpdate(params *DcimInventoryItemTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesPartialUpdateOK, error) + + DcimInventoryItemTemplatesRead(params *DcimInventoryItemTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesReadOK, error) + + DcimInventoryItemTemplatesUpdate(params *DcimInventoryItemTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesUpdateOK, error) + DcimInventoryItemsBulkDelete(params *DcimInventoryItemsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkDeleteNoContent, error) DcimInventoryItemsBulkPartialUpdate(params *DcimInventoryItemsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkPartialUpdateOK, error) @@ -363,6 +399,78 @@ type ClientService interface { DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersUpdateOK, error) + DcimModuleBayTemplatesBulkDelete(params *DcimModuleBayTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesBulkDeleteNoContent, error) + + DcimModuleBayTemplatesBulkPartialUpdate(params *DcimModuleBayTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesBulkPartialUpdateOK, error) + + DcimModuleBayTemplatesBulkUpdate(params *DcimModuleBayTemplatesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesBulkUpdateOK, error) + + DcimModuleBayTemplatesCreate(params *DcimModuleBayTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesCreateCreated, error) + + DcimModuleBayTemplatesDelete(params *DcimModuleBayTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesDeleteNoContent, error) + + DcimModuleBayTemplatesList(params *DcimModuleBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesListOK, error) + + DcimModuleBayTemplatesPartialUpdate(params *DcimModuleBayTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesPartialUpdateOK, error) + + DcimModuleBayTemplatesRead(params *DcimModuleBayTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesReadOK, error) + + DcimModuleBayTemplatesUpdate(params *DcimModuleBayTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesUpdateOK, error) + + DcimModuleBaysBulkDelete(params *DcimModuleBaysBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysBulkDeleteNoContent, error) + + DcimModuleBaysBulkPartialUpdate(params *DcimModuleBaysBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysBulkPartialUpdateOK, error) + + DcimModuleBaysBulkUpdate(params *DcimModuleBaysBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysBulkUpdateOK, error) + + DcimModuleBaysCreate(params *DcimModuleBaysCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysCreateCreated, error) + + DcimModuleBaysDelete(params *DcimModuleBaysDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysDeleteNoContent, error) + + DcimModuleBaysList(params *DcimModuleBaysListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysListOK, error) + + DcimModuleBaysPartialUpdate(params *DcimModuleBaysPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysPartialUpdateOK, error) + + DcimModuleBaysRead(params *DcimModuleBaysReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysReadOK, error) + + DcimModuleBaysUpdate(params *DcimModuleBaysUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysUpdateOK, error) + + DcimModuleTypesBulkDelete(params *DcimModuleTypesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesBulkDeleteNoContent, error) + + DcimModuleTypesBulkPartialUpdate(params *DcimModuleTypesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesBulkPartialUpdateOK, error) + + DcimModuleTypesBulkUpdate(params *DcimModuleTypesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesBulkUpdateOK, error) + + DcimModuleTypesCreate(params *DcimModuleTypesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesCreateCreated, error) + + DcimModuleTypesDelete(params *DcimModuleTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesDeleteNoContent, error) + + DcimModuleTypesList(params *DcimModuleTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesListOK, error) + + DcimModuleTypesPartialUpdate(params *DcimModuleTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesPartialUpdateOK, error) + + DcimModuleTypesRead(params *DcimModuleTypesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesReadOK, error) + + DcimModuleTypesUpdate(params *DcimModuleTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesUpdateOK, error) + + DcimModulesBulkDelete(params *DcimModulesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesBulkDeleteNoContent, error) + + DcimModulesBulkPartialUpdate(params *DcimModulesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesBulkPartialUpdateOK, error) + + DcimModulesBulkUpdate(params *DcimModulesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesBulkUpdateOK, error) + + DcimModulesCreate(params *DcimModulesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesCreateCreated, error) + + DcimModulesDelete(params *DcimModulesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesDeleteNoContent, error) + + DcimModulesList(params *DcimModulesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesListOK, error) + + DcimModulesPartialUpdate(params *DcimModulesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesPartialUpdateOK, error) + + DcimModulesRead(params *DcimModulesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesReadOK, error) + + DcimModulesUpdate(params *DcimModulesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesUpdateOK, error) + DcimPlatformsBulkDelete(params *DcimPlatformsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPlatformsBulkDeleteNoContent, error) DcimPlatformsBulkPartialUpdate(params *DcimPlatformsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimPlatformsBulkPartialUpdateOK, error) @@ -678,7 +786,7 @@ func (a *Client) DcimCablesBulkDelete(params *DcimCablesBulkDeleteParams, authIn PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -717,7 +825,7 @@ func (a *Client) DcimCablesBulkPartialUpdate(params *DcimCablesBulkPartialUpdate PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -756,7 +864,7 @@ func (a *Client) DcimCablesBulkUpdate(params *DcimCablesBulkUpdateParams, authIn PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -795,7 +903,7 @@ func (a *Client) DcimCablesCreate(params *DcimCablesCreateParams, authInfo runti PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -834,7 +942,7 @@ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runti PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -873,7 +981,7 @@ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.C PathPattern: "/dcim/cables/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -912,7 +1020,7 @@ func (a *Client) DcimCablesPartialUpdate(params *DcimCablesPartialUpdateParams, PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -951,7 +1059,7 @@ func (a *Client) DcimCablesRead(params *DcimCablesReadParams, authInfo runtime.C PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -990,7 +1098,7 @@ func (a *Client) DcimCablesUpdate(params *DcimCablesUpdateParams, authInfo runti PathPattern: "/dcim/cables/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimCablesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1034,7 +1142,7 @@ func (a *Client) DcimConnectedDeviceList(params *DcimConnectedDeviceListParams, PathPattern: "/dcim/connected-device/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConnectedDeviceListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1073,7 +1181,7 @@ func (a *Client) DcimConsolePortTemplatesBulkDelete(params *DcimConsolePortTempl PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1112,7 +1220,7 @@ func (a *Client) DcimConsolePortTemplatesBulkPartialUpdate(params *DcimConsolePo PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1151,7 +1259,7 @@ func (a *Client) DcimConsolePortTemplatesBulkUpdate(params *DcimConsolePortTempl PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1190,7 +1298,7 @@ func (a *Client) DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplates PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1229,7 +1337,7 @@ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplates PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1268,7 +1376,7 @@ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesLi PathPattern: "/dcim/console-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1307,7 +1415,7 @@ func (a *Client) DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTe PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1346,7 +1454,7 @@ func (a *Client) DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesRe PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1385,7 +1493,7 @@ func (a *Client) DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplates PathPattern: "/dcim/console-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1424,7 +1532,7 @@ func (a *Client) DcimConsolePortsBulkDelete(params *DcimConsolePortsBulkDeletePa PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1463,7 +1571,7 @@ func (a *Client) DcimConsolePortsBulkPartialUpdate(params *DcimConsolePortsBulkP PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1502,7 +1610,7 @@ func (a *Client) DcimConsolePortsBulkUpdate(params *DcimConsolePortsBulkUpdatePa PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1541,7 +1649,7 @@ func (a *Client) DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, au PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1580,7 +1688,7 @@ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, au PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1619,7 +1727,7 @@ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authIn PathPattern: "/dcim/console-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1658,7 +1766,7 @@ func (a *Client) DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUp PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1697,7 +1805,7 @@ func (a *Client) DcimConsolePortsRead(params *DcimConsolePortsReadParams, authIn PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1736,7 +1844,7 @@ func (a *Client) DcimConsolePortsTrace(params *DcimConsolePortsTraceParams, auth PathPattern: "/dcim/console-ports/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -1775,7 +1883,7 @@ func (a *Client) DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, au PathPattern: "/dcim/console-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsolePortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1814,7 +1922,7 @@ func (a *Client) DcimConsoleServerPortTemplatesBulkDelete(params *DcimConsoleSer PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1853,7 +1961,7 @@ func (a *Client) DcimConsoleServerPortTemplatesBulkPartialUpdate(params *DcimCon PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1892,7 +2000,7 @@ func (a *Client) DcimConsoleServerPortTemplatesBulkUpdate(params *DcimConsoleSer PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1931,7 +2039,7 @@ func (a *Client) DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerP PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1970,7 +2078,7 @@ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerP PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2009,7 +2117,7 @@ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPor PathPattern: "/dcim/console-server-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2048,7 +2156,7 @@ func (a *Client) DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsole PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2087,7 +2195,7 @@ func (a *Client) DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPor PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2126,7 +2234,7 @@ func (a *Client) DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerP PathPattern: "/dcim/console-server-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2165,7 +2273,7 @@ func (a *Client) DcimConsoleServerPortsBulkDelete(params *DcimConsoleServerPorts PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2204,7 +2312,7 @@ func (a *Client) DcimConsoleServerPortsBulkPartialUpdate(params *DcimConsoleServ PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2243,7 +2351,7 @@ func (a *Client) DcimConsoleServerPortsBulkUpdate(params *DcimConsoleServerPorts PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2282,7 +2390,7 @@ func (a *Client) DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCrea PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2321,7 +2429,7 @@ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDele PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2360,7 +2468,7 @@ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListPa PathPattern: "/dcim/console-server-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2399,7 +2507,7 @@ func (a *Client) DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPo PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2438,7 +2546,7 @@ func (a *Client) DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadPa PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2477,7 +2585,7 @@ func (a *Client) DcimConsoleServerPortsTrace(params *DcimConsoleServerPortsTrace PathPattern: "/dcim/console-server-ports/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -2516,7 +2624,7 @@ func (a *Client) DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpda PathPattern: "/dcim/console-server-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimConsoleServerPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2555,7 +2663,7 @@ func (a *Client) DcimDeviceBayTemplatesBulkDelete(params *DcimDeviceBayTemplates PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2594,7 +2702,7 @@ func (a *Client) DcimDeviceBayTemplatesBulkPartialUpdate(params *DcimDeviceBayTe PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2633,7 +2741,7 @@ func (a *Client) DcimDeviceBayTemplatesBulkUpdate(params *DcimDeviceBayTemplates PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2672,7 +2780,7 @@ func (a *Client) DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCrea PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2711,7 +2819,7 @@ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDele PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2750,7 +2858,7 @@ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListPa PathPattern: "/dcim/device-bay-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2789,7 +2897,7 @@ func (a *Client) DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTempla PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2828,7 +2936,7 @@ func (a *Client) DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadPa PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2867,7 +2975,7 @@ func (a *Client) DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpda PathPattern: "/dcim/device-bay-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBayTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2906,7 +3014,7 @@ func (a *Client) DcimDeviceBaysBulkDelete(params *DcimDeviceBaysBulkDeleteParams PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2945,7 +3053,7 @@ func (a *Client) DcimDeviceBaysBulkPartialUpdate(params *DcimDeviceBaysBulkParti PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2984,7 +3092,7 @@ func (a *Client) DcimDeviceBaysBulkUpdate(params *DcimDeviceBaysBulkUpdateParams PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3023,7 +3131,7 @@ func (a *Client) DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authIn PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3062,7 +3170,7 @@ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authIn PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3101,7 +3209,7 @@ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo r PathPattern: "/dcim/device-bays/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3140,7 +3248,7 @@ func (a *Client) DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdate PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3179,7 +3287,7 @@ func (a *Client) DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo r PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3218,7 +3326,7 @@ func (a *Client) DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authIn PathPattern: "/dcim/device-bays/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceBaysUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3257,7 +3365,7 @@ func (a *Client) DcimDeviceRolesBulkDelete(params *DcimDeviceRolesBulkDeletePara PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3296,7 +3404,7 @@ func (a *Client) DcimDeviceRolesBulkPartialUpdate(params *DcimDeviceRolesBulkPar PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3335,7 +3443,7 @@ func (a *Client) DcimDeviceRolesBulkUpdate(params *DcimDeviceRolesBulkUpdatePara PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3374,7 +3482,7 @@ func (a *Client) DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, auth PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3413,7 +3521,7 @@ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, auth PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3452,7 +3560,7 @@ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo PathPattern: "/dcim/device-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3491,7 +3599,7 @@ func (a *Client) DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpda PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3530,7 +3638,7 @@ func (a *Client) DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3569,7 +3677,7 @@ func (a *Client) DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, auth PathPattern: "/dcim/device-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3608,7 +3716,7 @@ func (a *Client) DcimDeviceTypesBulkDelete(params *DcimDeviceTypesBulkDeletePara PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3647,7 +3755,7 @@ func (a *Client) DcimDeviceTypesBulkPartialUpdate(params *DcimDeviceTypesBulkPar PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3686,7 +3794,7 @@ func (a *Client) DcimDeviceTypesBulkUpdate(params *DcimDeviceTypesBulkUpdatePara PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3725,7 +3833,7 @@ func (a *Client) DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, auth PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3764,7 +3872,7 @@ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, auth PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3803,7 +3911,7 @@ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo PathPattern: "/dcim/device-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3842,7 +3950,7 @@ func (a *Client) DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpda PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3881,7 +3989,7 @@ func (a *Client) DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3920,7 +4028,7 @@ func (a *Client) DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, auth PathPattern: "/dcim/device-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDeviceTypesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3959,7 +4067,7 @@ func (a *Client) DcimDevicesBulkDelete(params *DcimDevicesBulkDeleteParams, auth PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3998,7 +4106,7 @@ func (a *Client) DcimDevicesBulkPartialUpdate(params *DcimDevicesBulkPartialUpda PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4037,7 +4145,7 @@ func (a *Client) DcimDevicesBulkUpdate(params *DcimDevicesBulkUpdateParams, auth PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4076,7 +4184,7 @@ func (a *Client) DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo run PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4115,7 +4223,7 @@ func (a *Client) DcimDevicesDelete(params *DcimDevicesDeleteParams, authInfo run PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4154,7 +4262,7 @@ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime PathPattern: "/dcim/devices/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4193,7 +4301,7 @@ func (a *Client) DcimDevicesNapalm(params *DcimDevicesNapalmParams, authInfo run PathPattern: "/dcim/devices/{id}/napalm/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesNapalmReader{formats: a.formats}, AuthInfo: authInfo, @@ -4232,7 +4340,7 @@ func (a *Client) DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4271,7 +4379,7 @@ func (a *Client) DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4310,7 +4418,7 @@ func (a *Client) DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo run PathPattern: "/dcim/devices/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimDevicesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4349,7 +4457,7 @@ func (a *Client) DcimFrontPortTemplatesBulkDelete(params *DcimFrontPortTemplates PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4388,7 +4496,7 @@ func (a *Client) DcimFrontPortTemplatesBulkPartialUpdate(params *DcimFrontPortTe PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4427,7 +4535,7 @@ func (a *Client) DcimFrontPortTemplatesBulkUpdate(params *DcimFrontPortTemplates PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4466,7 +4574,7 @@ func (a *Client) DcimFrontPortTemplatesCreate(params *DcimFrontPortTemplatesCrea PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4505,7 +4613,7 @@ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDele PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4544,7 +4652,7 @@ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListPa PathPattern: "/dcim/front-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4583,7 +4691,7 @@ func (a *Client) DcimFrontPortTemplatesPartialUpdate(params *DcimFrontPortTempla PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4622,7 +4730,7 @@ func (a *Client) DcimFrontPortTemplatesRead(params *DcimFrontPortTemplatesReadPa PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4661,7 +4769,7 @@ func (a *Client) DcimFrontPortTemplatesUpdate(params *DcimFrontPortTemplatesUpda PathPattern: "/dcim/front-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4700,7 +4808,7 @@ func (a *Client) DcimFrontPortsBulkDelete(params *DcimFrontPortsBulkDeleteParams PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4739,7 +4847,7 @@ func (a *Client) DcimFrontPortsBulkPartialUpdate(params *DcimFrontPortsBulkParti PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4778,7 +4886,7 @@ func (a *Client) DcimFrontPortsBulkUpdate(params *DcimFrontPortsBulkUpdateParams PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4817,7 +4925,7 @@ func (a *Client) DcimFrontPortsCreate(params *DcimFrontPortsCreateParams, authIn PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4856,7 +4964,7 @@ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authIn PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4895,7 +5003,7 @@ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo r PathPattern: "/dcim/front-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4934,7 +5042,7 @@ func (a *Client) DcimFrontPortsPartialUpdate(params *DcimFrontPortsPartialUpdate PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4973,7 +5081,7 @@ func (a *Client) DcimFrontPortsPaths(params *DcimFrontPortsPathsParams, authInfo PathPattern: "/dcim/front-ports/{id}/paths/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsPathsReader{formats: a.formats}, AuthInfo: authInfo, @@ -5012,7 +5120,7 @@ func (a *Client) DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo r PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5051,7 +5159,7 @@ func (a *Client) DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authIn PathPattern: "/dcim/front-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimFrontPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5090,7 +5198,7 @@ func (a *Client) DcimInterfaceTemplatesBulkDelete(params *DcimInterfaceTemplates PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5129,7 +5237,7 @@ func (a *Client) DcimInterfaceTemplatesBulkPartialUpdate(params *DcimInterfaceTe PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5168,7 +5276,7 @@ func (a *Client) DcimInterfaceTemplatesBulkUpdate(params *DcimInterfaceTemplates PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5207,7 +5315,7 @@ func (a *Client) DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCrea PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5246,7 +5354,7 @@ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDele PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5285,7 +5393,7 @@ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListPa PathPattern: "/dcim/interface-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5324,7 +5432,7 @@ func (a *Client) DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTempla PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5363,7 +5471,7 @@ func (a *Client) DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadPa PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5402,7 +5510,7 @@ func (a *Client) DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpda PathPattern: "/dcim/interface-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfaceTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5441,7 +5549,7 @@ func (a *Client) DcimInterfacesBulkDelete(params *DcimInterfacesBulkDeleteParams PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5480,7 +5588,7 @@ func (a *Client) DcimInterfacesBulkPartialUpdate(params *DcimInterfacesBulkParti PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5519,7 +5627,7 @@ func (a *Client) DcimInterfacesBulkUpdate(params *DcimInterfacesBulkUpdateParams PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5558,7 +5666,7 @@ func (a *Client) DcimInterfacesCreate(params *DcimInterfacesCreateParams, authIn PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5597,7 +5705,7 @@ func (a *Client) DcimInterfacesDelete(params *DcimInterfacesDeleteParams, authIn PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -5636,7 +5744,7 @@ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo r PathPattern: "/dcim/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -5675,7 +5783,7 @@ func (a *Client) DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdate PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5714,7 +5822,7 @@ func (a *Client) DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo r PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -5753,7 +5861,7 @@ func (a *Client) DcimInterfacesTrace(params *DcimInterfacesTraceParams, authInfo PathPattern: "/dcim/interfaces/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -5792,7 +5900,7 @@ func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authIn PathPattern: "/dcim/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimInterfacesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -5818,22 +5926,22 @@ func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authIn } /* - DcimInventoryItemsBulkDelete dcim inventory items bulk delete API + DcimInventoryItemRolesBulkDelete dcim inventory item roles bulk delete API */ -func (a *Client) DcimInventoryItemsBulkDelete(params *DcimInventoryItemsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkDeleteNoContent, error) { +func (a *Client) DcimInventoryItemRolesBulkDelete(params *DcimInventoryItemRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsBulkDeleteParams() + params = NewDcimInventoryItemRolesBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_bulk_delete", + ID: "dcim_inventory-item-roles_bulk_delete", Method: "DELETE", - PathPattern: "/dcim/inventory-items/", + PathPattern: "/dcim/inventory-item-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsBulkDeleteReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -5846,33 +5954,33 @@ func (a *Client) DcimInventoryItemsBulkDelete(params *DcimInventoryItemsBulkDele if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsBulkDeleteNoContent) + success, ok := result.(*DcimInventoryItemRolesBulkDeleteNoContent) 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_inventory-items_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsBulkPartialUpdate dcim inventory items bulk partial update API + DcimInventoryItemRolesBulkPartialUpdate dcim inventory item roles bulk partial update API */ -func (a *Client) DcimInventoryItemsBulkPartialUpdate(params *DcimInventoryItemsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkPartialUpdateOK, error) { +func (a *Client) DcimInventoryItemRolesBulkPartialUpdate(params *DcimInventoryItemRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsBulkPartialUpdateParams() + params = NewDcimInventoryItemRolesBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_bulk_partial_update", + ID: "dcim_inventory-item-roles_bulk_partial_update", Method: "PATCH", - PathPattern: "/dcim/inventory-items/", + PathPattern: "/dcim/inventory-item-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsBulkPartialUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -5885,33 +5993,33 @@ func (a *Client) DcimInventoryItemsBulkPartialUpdate(params *DcimInventoryItemsB if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsBulkPartialUpdateOK) + success, ok := result.(*DcimInventoryItemRolesBulkPartialUpdateOK) 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_inventory-items_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsBulkUpdate dcim inventory items bulk update API + DcimInventoryItemRolesBulkUpdate dcim inventory item roles bulk update API */ -func (a *Client) DcimInventoryItemsBulkUpdate(params *DcimInventoryItemsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkUpdateOK, error) { +func (a *Client) DcimInventoryItemRolesBulkUpdate(params *DcimInventoryItemRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsBulkUpdateParams() + params = NewDcimInventoryItemRolesBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_bulk_update", + ID: "dcim_inventory-item-roles_bulk_update", Method: "PUT", - PathPattern: "/dcim/inventory-items/", + PathPattern: "/dcim/inventory-item-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsBulkUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -5924,33 +6032,33 @@ func (a *Client) DcimInventoryItemsBulkUpdate(params *DcimInventoryItemsBulkUpda if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsBulkUpdateOK) + success, ok := result.(*DcimInventoryItemRolesBulkUpdateOK) 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_inventory-items_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsCreate dcim inventory items create API + DcimInventoryItemRolesCreate dcim inventory item roles create API */ -func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsCreateCreated, error) { +func (a *Client) DcimInventoryItemRolesCreate(params *DcimInventoryItemRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsCreateParams() + params = NewDcimInventoryItemRolesCreateParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_create", + ID: "dcim_inventory-item-roles_create", Method: "POST", - PathPattern: "/dcim/inventory-items/", + PathPattern: "/dcim/inventory-item-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsCreateReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -5963,33 +6071,33 @@ func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsCreateCreated) + success, ok := result.(*DcimInventoryItemRolesCreateCreated) 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_inventory-items_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsDelete dcim inventory items delete API + DcimInventoryItemRolesDelete dcim inventory item roles delete API */ -func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsDeleteNoContent, error) { +func (a *Client) DcimInventoryItemRolesDelete(params *DcimInventoryItemRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsDeleteParams() + params = NewDcimInventoryItemRolesDeleteParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_delete", + ID: "dcim_inventory-item-roles_delete", Method: "DELETE", - PathPattern: "/dcim/inventory-items/{id}/", + PathPattern: "/dcim/inventory-item-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsDeleteReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6002,33 +6110,33 @@ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsDeleteNoContent) + success, ok := result.(*DcimInventoryItemRolesDeleteNoContent) 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_inventory-items_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsList Overrides ListModelMixin to allow processing ExportTemplates. + DcimInventoryItemRolesList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsListOK, error) { +func (a *Client) DcimInventoryItemRolesList(params *DcimInventoryItemRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsListParams() + params = NewDcimInventoryItemRolesListParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_list", + ID: "dcim_inventory-item-roles_list", Method: "GET", - PathPattern: "/dcim/inventory-items/", + PathPattern: "/dcim/inventory-item-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsListReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6041,33 +6149,33 @@ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, au if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsListOK) + success, ok := result.(*DcimInventoryItemRolesListOK) 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_inventory-items_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsPartialUpdate dcim inventory items partial update API + DcimInventoryItemRolesPartialUpdate dcim inventory item roles partial update API */ -func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsPartialUpdateOK, error) { +func (a *Client) DcimInventoryItemRolesPartialUpdate(params *DcimInventoryItemRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsPartialUpdateParams() + params = NewDcimInventoryItemRolesPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_partial_update", + ID: "dcim_inventory-item-roles_partial_update", Method: "PATCH", - PathPattern: "/dcim/inventory-items/{id}/", + PathPattern: "/dcim/inventory-item-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsPartialUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6080,33 +6188,33 @@ func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsParti if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsPartialUpdateOK) + success, ok := result.(*DcimInventoryItemRolesPartialUpdateOK) 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_inventory-items_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsRead dcim inventory items read API + DcimInventoryItemRolesRead dcim inventory item roles read API */ -func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsReadOK, error) { +func (a *Client) DcimInventoryItemRolesRead(params *DcimInventoryItemRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsReadParams() + params = NewDcimInventoryItemRolesReadParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_read", + ID: "dcim_inventory-item-roles_read", Method: "GET", - PathPattern: "/dcim/inventory-items/{id}/", + PathPattern: "/dcim/inventory-item-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsReadReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6119,33 +6227,33 @@ func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, au if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsReadOK) + success, ok := result.(*DcimInventoryItemRolesReadOK) 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_inventory-items_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimInventoryItemsUpdate dcim inventory items update API + DcimInventoryItemRolesUpdate dcim inventory item roles update API */ -func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsUpdateOK, error) { +func (a *Client) DcimInventoryItemRolesUpdate(params *DcimInventoryItemRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemRolesUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimInventoryItemsUpdateParams() + params = NewDcimInventoryItemRolesUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_inventory-items_update", + ID: "dcim_inventory-item-roles_update", Method: "PUT", - PathPattern: "/dcim/inventory-items/{id}/", + PathPattern: "/dcim/inventory-item-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimInventoryItemsUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6158,33 +6266,33 @@ func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams if err != nil { return nil, err } - success, ok := result.(*DcimInventoryItemsUpdateOK) + success, ok := result.(*DcimInventoryItemRolesUpdateOK) 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_inventory-items_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsBulkDelete dcim locations bulk delete API + DcimInventoryItemTemplatesBulkDelete dcim inventory item templates bulk delete API */ -func (a *Client) DcimLocationsBulkDelete(params *DcimLocationsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsBulkDeleteNoContent, error) { +func (a *Client) DcimInventoryItemTemplatesBulkDelete(params *DcimInventoryItemTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsBulkDeleteParams() + params = NewDcimInventoryItemTemplatesBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_bulk_delete", + ID: "dcim_inventory-item-templates_bulk_delete", Method: "DELETE", - PathPattern: "/dcim/locations/", + PathPattern: "/dcim/inventory-item-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsBulkDeleteReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6197,33 +6305,33 @@ func (a *Client) DcimLocationsBulkDelete(params *DcimLocationsBulkDeleteParams, if err != nil { return nil, err } - success, ok := result.(*DcimLocationsBulkDeleteNoContent) + success, ok := result.(*DcimInventoryItemTemplatesBulkDeleteNoContent) 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_locations_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsBulkPartialUpdate dcim locations bulk partial update API + DcimInventoryItemTemplatesBulkPartialUpdate dcim inventory item templates bulk partial update API */ -func (a *Client) DcimLocationsBulkPartialUpdate(params *DcimLocationsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsBulkPartialUpdateOK, error) { +func (a *Client) DcimInventoryItemTemplatesBulkPartialUpdate(params *DcimInventoryItemTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsBulkPartialUpdateParams() + params = NewDcimInventoryItemTemplatesBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_bulk_partial_update", + ID: "dcim_inventory-item-templates_bulk_partial_update", Method: "PATCH", - PathPattern: "/dcim/locations/", + PathPattern: "/dcim/inventory-item-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsBulkPartialUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6236,33 +6344,33 @@ func (a *Client) DcimLocationsBulkPartialUpdate(params *DcimLocationsBulkPartial if err != nil { return nil, err } - success, ok := result.(*DcimLocationsBulkPartialUpdateOK) + success, ok := result.(*DcimInventoryItemTemplatesBulkPartialUpdateOK) 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_locations_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsBulkUpdate dcim locations bulk update API + DcimInventoryItemTemplatesBulkUpdate dcim inventory item templates bulk update API */ -func (a *Client) DcimLocationsBulkUpdate(params *DcimLocationsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsBulkUpdateOK, error) { +func (a *Client) DcimInventoryItemTemplatesBulkUpdate(params *DcimInventoryItemTemplatesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsBulkUpdateParams() + params = NewDcimInventoryItemTemplatesBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_bulk_update", + ID: "dcim_inventory-item-templates_bulk_update", Method: "PUT", - PathPattern: "/dcim/locations/", + PathPattern: "/dcim/inventory-item-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsBulkUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6275,33 +6383,33 @@ func (a *Client) DcimLocationsBulkUpdate(params *DcimLocationsBulkUpdateParams, if err != nil { return nil, err } - success, ok := result.(*DcimLocationsBulkUpdateOK) + success, ok := result.(*DcimInventoryItemTemplatesBulkUpdateOK) 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_locations_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsCreate dcim locations create API + DcimInventoryItemTemplatesCreate dcim inventory item templates create API */ -func (a *Client) DcimLocationsCreate(params *DcimLocationsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsCreateCreated, error) { +func (a *Client) DcimInventoryItemTemplatesCreate(params *DcimInventoryItemTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsCreateParams() + params = NewDcimInventoryItemTemplatesCreateParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_create", + ID: "dcim_inventory-item-templates_create", Method: "POST", - PathPattern: "/dcim/locations/", + PathPattern: "/dcim/inventory-item-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsCreateReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6314,33 +6422,33 @@ func (a *Client) DcimLocationsCreate(params *DcimLocationsCreateParams, authInfo if err != nil { return nil, err } - success, ok := result.(*DcimLocationsCreateCreated) + success, ok := result.(*DcimInventoryItemTemplatesCreateCreated) 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_locations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsDelete dcim locations delete API + DcimInventoryItemTemplatesDelete dcim inventory item templates delete API */ -func (a *Client) DcimLocationsDelete(params *DcimLocationsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsDeleteNoContent, error) { +func (a *Client) DcimInventoryItemTemplatesDelete(params *DcimInventoryItemTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsDeleteParams() + params = NewDcimInventoryItemTemplatesDeleteParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_delete", + ID: "dcim_inventory-item-templates_delete", Method: "DELETE", - PathPattern: "/dcim/locations/{id}/", + PathPattern: "/dcim/inventory-item-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsDeleteReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6353,33 +6461,33 @@ func (a *Client) DcimLocationsDelete(params *DcimLocationsDeleteParams, authInfo if err != nil { return nil, err } - success, ok := result.(*DcimLocationsDeleteNoContent) + success, ok := result.(*DcimInventoryItemTemplatesDeleteNoContent) 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_locations_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsList Overrides ListModelMixin to allow processing ExportTemplates. + DcimInventoryItemTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) DcimLocationsList(params *DcimLocationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsListOK, error) { +func (a *Client) DcimInventoryItemTemplatesList(params *DcimInventoryItemTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsListParams() + params = NewDcimInventoryItemTemplatesListParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_list", + ID: "dcim_inventory-item-templates_list", Method: "GET", - PathPattern: "/dcim/locations/", + PathPattern: "/dcim/inventory-item-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsListReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6392,33 +6500,33 @@ func (a *Client) DcimLocationsList(params *DcimLocationsListParams, authInfo run if err != nil { return nil, err } - success, ok := result.(*DcimLocationsListOK) + success, ok := result.(*DcimInventoryItemTemplatesListOK) 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_locations_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsPartialUpdate dcim locations partial update API + DcimInventoryItemTemplatesPartialUpdate dcim inventory item templates partial update API */ -func (a *Client) DcimLocationsPartialUpdate(params *DcimLocationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsPartialUpdateOK, error) { +func (a *Client) DcimInventoryItemTemplatesPartialUpdate(params *DcimInventoryItemTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsPartialUpdateParams() + params = NewDcimInventoryItemTemplatesPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_partial_update", + ID: "dcim_inventory-item-templates_partial_update", Method: "PATCH", - PathPattern: "/dcim/locations/{id}/", + PathPattern: "/dcim/inventory-item-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsPartialUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6431,33 +6539,33 @@ func (a *Client) DcimLocationsPartialUpdate(params *DcimLocationsPartialUpdatePa if err != nil { return nil, err } - success, ok := result.(*DcimLocationsPartialUpdateOK) + success, ok := result.(*DcimInventoryItemTemplatesPartialUpdateOK) 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_locations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsRead dcim locations read API + DcimInventoryItemTemplatesRead dcim inventory item templates read API */ -func (a *Client) DcimLocationsRead(params *DcimLocationsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsReadOK, error) { +func (a *Client) DcimInventoryItemTemplatesRead(params *DcimInventoryItemTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsReadParams() + params = NewDcimInventoryItemTemplatesReadParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_read", + ID: "dcim_inventory-item-templates_read", Method: "GET", - PathPattern: "/dcim/locations/{id}/", + PathPattern: "/dcim/inventory-item-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsReadReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6470,33 +6578,33 @@ func (a *Client) DcimLocationsRead(params *DcimLocationsReadParams, authInfo run if err != nil { return nil, err } - success, ok := result.(*DcimLocationsReadOK) + success, ok := result.(*DcimInventoryItemTemplatesReadOK) 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_locations_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimLocationsUpdate dcim locations update API + DcimInventoryItemTemplatesUpdate dcim inventory item templates update API */ -func (a *Client) DcimLocationsUpdate(params *DcimLocationsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsUpdateOK, error) { +func (a *Client) DcimInventoryItemTemplatesUpdate(params *DcimInventoryItemTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemTemplatesUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimLocationsUpdateParams() + params = NewDcimInventoryItemTemplatesUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_locations_update", + ID: "dcim_inventory-item-templates_update", Method: "PUT", - PathPattern: "/dcim/locations/{id}/", + PathPattern: "/dcim/inventory-item-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimLocationsUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6509,33 +6617,33 @@ func (a *Client) DcimLocationsUpdate(params *DcimLocationsUpdateParams, authInfo if err != nil { return nil, err } - success, ok := result.(*DcimLocationsUpdateOK) + success, ok := result.(*DcimInventoryItemTemplatesUpdateOK) 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_locations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-item-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersBulkDelete dcim manufacturers bulk delete API + DcimInventoryItemsBulkDelete dcim inventory items bulk delete API */ -func (a *Client) DcimManufacturersBulkDelete(params *DcimManufacturersBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersBulkDeleteNoContent, error) { +func (a *Client) DcimInventoryItemsBulkDelete(params *DcimInventoryItemsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersBulkDeleteParams() + params = NewDcimInventoryItemsBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_bulk_delete", + ID: "dcim_inventory-items_bulk_delete", Method: "DELETE", - PathPattern: "/dcim/manufacturers/", + PathPattern: "/dcim/inventory-items/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersBulkDeleteReader{formats: a.formats}, + Reader: &DcimInventoryItemsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6548,33 +6656,33 @@ func (a *Client) DcimManufacturersBulkDelete(params *DcimManufacturersBulkDelete if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersBulkDeleteNoContent) + success, ok := result.(*DcimInventoryItemsBulkDeleteNoContent) 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_manufacturers_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-items_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersBulkPartialUpdate dcim manufacturers bulk partial update API + DcimInventoryItemsBulkPartialUpdate dcim inventory items bulk partial update API */ -func (a *Client) DcimManufacturersBulkPartialUpdate(params *DcimManufacturersBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersBulkPartialUpdateOK, error) { +func (a *Client) DcimInventoryItemsBulkPartialUpdate(params *DcimInventoryItemsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersBulkPartialUpdateParams() + params = NewDcimInventoryItemsBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_bulk_partial_update", + ID: "dcim_inventory-items_bulk_partial_update", Method: "PATCH", - PathPattern: "/dcim/manufacturers/", + PathPattern: "/dcim/inventory-items/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersBulkPartialUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6587,33 +6695,33 @@ func (a *Client) DcimManufacturersBulkPartialUpdate(params *DcimManufacturersBul if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersBulkPartialUpdateOK) + success, ok := result.(*DcimInventoryItemsBulkPartialUpdateOK) 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_manufacturers_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-items_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersBulkUpdate dcim manufacturers bulk update API + DcimInventoryItemsBulkUpdate dcim inventory items bulk update API */ -func (a *Client) DcimManufacturersBulkUpdate(params *DcimManufacturersBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersBulkUpdateOK, error) { +func (a *Client) DcimInventoryItemsBulkUpdate(params *DcimInventoryItemsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersBulkUpdateParams() + params = NewDcimInventoryItemsBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_bulk_update", + ID: "dcim_inventory-items_bulk_update", Method: "PUT", - PathPattern: "/dcim/manufacturers/", + PathPattern: "/dcim/inventory-items/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersBulkUpdateReader{formats: a.formats}, + Reader: &DcimInventoryItemsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6626,31 +6734,733 @@ func (a *Client) DcimManufacturersBulkUpdate(params *DcimManufacturersBulkUpdate if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersBulkUpdateOK) + success, ok := result.(*DcimInventoryItemsBulkUpdateOK) 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_manufacturers_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_inventory-items_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersCreate dcim manufacturers create API + DcimInventoryItemsCreate dcim inventory items create API */ -func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersCreateCreated, error) { +func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersCreateParams() + params = NewDcimInventoryItemsCreateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_create", + ID: "dcim_inventory-items_create", Method: "POST", - PathPattern: "/dcim/manufacturers/", + PathPattern: "/dcim/inventory-items/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimInventoryItemsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimInventoryItemsCreateCreated) + 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_inventory-items_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimInventoryItemsDelete dcim inventory items delete API +*/ +func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimInventoryItemsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_inventory-items_delete", + Method: "DELETE", + PathPattern: "/dcim/inventory-items/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimInventoryItemsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimInventoryItemsDeleteNoContent) + 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_inventory-items_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimInventoryItemsList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimInventoryItemsListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_inventory-items_list", + Method: "GET", + PathPattern: "/dcim/inventory-items/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimInventoryItemsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimInventoryItemsListOK) + 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_inventory-items_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimInventoryItemsPartialUpdate dcim inventory items partial update API +*/ +func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimInventoryItemsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_inventory-items_partial_update", + Method: "PATCH", + PathPattern: "/dcim/inventory-items/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimInventoryItemsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimInventoryItemsPartialUpdateOK) + 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_inventory-items_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimInventoryItemsRead dcim inventory items read API +*/ +func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimInventoryItemsReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_inventory-items_read", + Method: "GET", + PathPattern: "/dcim/inventory-items/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimInventoryItemsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimInventoryItemsReadOK) + 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_inventory-items_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimInventoryItemsUpdate dcim inventory items update API +*/ +func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimInventoryItemsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimInventoryItemsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_inventory-items_update", + Method: "PUT", + PathPattern: "/dcim/inventory-items/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimInventoryItemsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimInventoryItemsUpdateOK) + 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_inventory-items_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsBulkDelete dcim locations bulk delete API +*/ +func (a *Client) DcimLocationsBulkDelete(params *DcimLocationsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_bulk_delete", + Method: "DELETE", + PathPattern: "/dcim/locations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsBulkDeleteNoContent) + 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_locations_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsBulkPartialUpdate dcim locations bulk partial update API +*/ +func (a *Client) DcimLocationsBulkPartialUpdate(params *DcimLocationsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/locations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsBulkPartialUpdateOK) + 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_locations_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsBulkUpdate dcim locations bulk update API +*/ +func (a *Client) DcimLocationsBulkUpdate(params *DcimLocationsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_bulk_update", + Method: "PUT", + PathPattern: "/dcim/locations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsBulkUpdateOK) + 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_locations_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsCreate dcim locations create API +*/ +func (a *Client) DcimLocationsCreate(params *DcimLocationsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_create", + Method: "POST", + PathPattern: "/dcim/locations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsCreateCreated) + 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_locations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsDelete dcim locations delete API +*/ +func (a *Client) DcimLocationsDelete(params *DcimLocationsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_delete", + Method: "DELETE", + PathPattern: "/dcim/locations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsDeleteNoContent) + 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_locations_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimLocationsList(params *DcimLocationsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_list", + Method: "GET", + PathPattern: "/dcim/locations/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsListOK) + 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_locations_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsPartialUpdate dcim locations partial update API +*/ +func (a *Client) DcimLocationsPartialUpdate(params *DcimLocationsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_partial_update", + Method: "PATCH", + PathPattern: "/dcim/locations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsPartialUpdateOK) + 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_locations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsRead dcim locations read API +*/ +func (a *Client) DcimLocationsRead(params *DcimLocationsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_read", + Method: "GET", + PathPattern: "/dcim/locations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsReadOK) + 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_locations_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimLocationsUpdate dcim locations update API +*/ +func (a *Client) DcimLocationsUpdate(params *DcimLocationsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimLocationsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimLocationsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_locations_update", + Method: "PUT", + PathPattern: "/dcim/locations/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimLocationsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimLocationsUpdateOK) + 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_locations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersBulkDelete dcim manufacturers bulk delete API +*/ +func (a *Client) DcimManufacturersBulkDelete(params *DcimManufacturersBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_bulk_delete", + Method: "DELETE", + PathPattern: "/dcim/manufacturers/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersBulkDeleteNoContent) + 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_manufacturers_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersBulkPartialUpdate dcim manufacturers bulk partial update API +*/ +func (a *Client) DcimManufacturersBulkPartialUpdate(params *DcimManufacturersBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/manufacturers/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersBulkPartialUpdateOK) + 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_manufacturers_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersBulkUpdate dcim manufacturers bulk update API +*/ +func (a *Client) DcimManufacturersBulkUpdate(params *DcimManufacturersBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_bulk_update", + Method: "PUT", + PathPattern: "/dcim/manufacturers/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersBulkUpdateOK) + 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_manufacturers_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersCreate dcim manufacturers create API +*/ +func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_create", + Method: "POST", + PathPattern: "/dcim/manufacturers/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimManufacturersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -6665,33 +7475,1281 @@ func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersCreateCreated) + success, ok := result.(*DcimManufacturersCreateCreated) + 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_manufacturers_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersDelete dcim manufacturers delete API +*/ +func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_delete", + Method: "DELETE", + PathPattern: "/dcim/manufacturers/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersDeleteNoContent) + 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_manufacturers_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_list", + Method: "GET", + PathPattern: "/dcim/manufacturers/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersListOK) + 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_manufacturers_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersPartialUpdate dcim manufacturers partial update API +*/ +func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_partial_update", + Method: "PATCH", + PathPattern: "/dcim/manufacturers/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersPartialUpdateOK) + 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_manufacturers_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersRead dcim manufacturers read API +*/ +func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_read", + Method: "GET", + PathPattern: "/dcim/manufacturers/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersReadOK) + 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_manufacturers_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimManufacturersUpdate dcim manufacturers update API +*/ +func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimManufacturersUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_manufacturers_update", + Method: "PUT", + PathPattern: "/dcim/manufacturers/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimManufacturersUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimManufacturersUpdateOK) + 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_manufacturers_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesBulkDelete dcim module bay templates bulk delete API +*/ +func (a *Client) DcimModuleBayTemplatesBulkDelete(params *DcimModuleBayTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_bulk_delete", + Method: "DELETE", + PathPattern: "/dcim/module-bay-templates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesBulkDeleteNoContent) + 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_module-bay-templates_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesBulkPartialUpdate dcim module bay templates bulk partial update API +*/ +func (a *Client) DcimModuleBayTemplatesBulkPartialUpdate(params *DcimModuleBayTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/module-bay-templates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesBulkPartialUpdateOK) + 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_module-bay-templates_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesBulkUpdate dcim module bay templates bulk update API +*/ +func (a *Client) DcimModuleBayTemplatesBulkUpdate(params *DcimModuleBayTemplatesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_bulk_update", + Method: "PUT", + PathPattern: "/dcim/module-bay-templates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesBulkUpdateOK) + 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_module-bay-templates_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesCreate dcim module bay templates create API +*/ +func (a *Client) DcimModuleBayTemplatesCreate(params *DcimModuleBayTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_create", + Method: "POST", + PathPattern: "/dcim/module-bay-templates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesCreateCreated) + 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_module-bay-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesDelete dcim module bay templates delete API +*/ +func (a *Client) DcimModuleBayTemplatesDelete(params *DcimModuleBayTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_delete", + Method: "DELETE", + PathPattern: "/dcim/module-bay-templates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesDeleteNoContent) + 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_module-bay-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimModuleBayTemplatesList(params *DcimModuleBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_list", + Method: "GET", + PathPattern: "/dcim/module-bay-templates/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesListOK) + 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_module-bay-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesPartialUpdate dcim module bay templates partial update API +*/ +func (a *Client) DcimModuleBayTemplatesPartialUpdate(params *DcimModuleBayTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_partial_update", + Method: "PATCH", + PathPattern: "/dcim/module-bay-templates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesPartialUpdateOK) + 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_module-bay-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesRead dcim module bay templates read API +*/ +func (a *Client) DcimModuleBayTemplatesRead(params *DcimModuleBayTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_read", + Method: "GET", + PathPattern: "/dcim/module-bay-templates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesReadOK) + 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_module-bay-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBayTemplatesUpdate dcim module bay templates update API +*/ +func (a *Client) DcimModuleBayTemplatesUpdate(params *DcimModuleBayTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBayTemplatesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBayTemplatesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bay-templates_update", + Method: "PUT", + PathPattern: "/dcim/module-bay-templates/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBayTemplatesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBayTemplatesUpdateOK) + 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_module-bay-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysBulkDelete dcim module bays bulk delete API +*/ +func (a *Client) DcimModuleBaysBulkDelete(params *DcimModuleBaysBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_bulk_delete", + Method: "DELETE", + PathPattern: "/dcim/module-bays/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysBulkDeleteNoContent) + 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_module-bays_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysBulkPartialUpdate dcim module bays bulk partial update API +*/ +func (a *Client) DcimModuleBaysBulkPartialUpdate(params *DcimModuleBaysBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/module-bays/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysBulkPartialUpdateOK) + 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_module-bays_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysBulkUpdate dcim module bays bulk update API +*/ +func (a *Client) DcimModuleBaysBulkUpdate(params *DcimModuleBaysBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_bulk_update", + Method: "PUT", + PathPattern: "/dcim/module-bays/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysBulkUpdateOK) + 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_module-bays_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysCreate dcim module bays create API +*/ +func (a *Client) DcimModuleBaysCreate(params *DcimModuleBaysCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_create", + Method: "POST", + PathPattern: "/dcim/module-bays/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysCreateCreated) + 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_module-bays_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysDelete dcim module bays delete API +*/ +func (a *Client) DcimModuleBaysDelete(params *DcimModuleBaysDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_delete", + Method: "DELETE", + PathPattern: "/dcim/module-bays/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysDeleteNoContent) + 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_module-bays_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimModuleBaysList(params *DcimModuleBaysListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_list", + Method: "GET", + PathPattern: "/dcim/module-bays/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysListOK) + 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_module-bays_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysPartialUpdate dcim module bays partial update API +*/ +func (a *Client) DcimModuleBaysPartialUpdate(params *DcimModuleBaysPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_partial_update", + Method: "PATCH", + PathPattern: "/dcim/module-bays/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysPartialUpdateOK) + 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_module-bays_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysRead dcim module bays read API +*/ +func (a *Client) DcimModuleBaysRead(params *DcimModuleBaysReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_read", + Method: "GET", + PathPattern: "/dcim/module-bays/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysReadOK) + 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_module-bays_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleBaysUpdate dcim module bays update API +*/ +func (a *Client) DcimModuleBaysUpdate(params *DcimModuleBaysUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleBaysUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleBaysUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-bays_update", + Method: "PUT", + PathPattern: "/dcim/module-bays/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleBaysUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleBaysUpdateOK) + 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_module-bays_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesBulkDelete dcim module types bulk delete API +*/ +func (a *Client) DcimModuleTypesBulkDelete(params *DcimModuleTypesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_bulk_delete", + Method: "DELETE", + PathPattern: "/dcim/module-types/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesBulkDeleteNoContent) + 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_module-types_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesBulkPartialUpdate dcim module types bulk partial update API +*/ +func (a *Client) DcimModuleTypesBulkPartialUpdate(params *DcimModuleTypesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/module-types/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesBulkPartialUpdateOK) + 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_module-types_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesBulkUpdate dcim module types bulk update API +*/ +func (a *Client) DcimModuleTypesBulkUpdate(params *DcimModuleTypesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_bulk_update", + Method: "PUT", + PathPattern: "/dcim/module-types/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesBulkUpdateOK) + 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_module-types_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesCreate dcim module types create API +*/ +func (a *Client) DcimModuleTypesCreate(params *DcimModuleTypesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_create", + Method: "POST", + PathPattern: "/dcim/module-types/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesCreateCreated) + 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_module-types_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesDelete dcim module types delete API +*/ +func (a *Client) DcimModuleTypesDelete(params *DcimModuleTypesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_delete", + Method: "DELETE", + PathPattern: "/dcim/module-types/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesDeleteNoContent) + 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_module-types_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimModuleTypesList(params *DcimModuleTypesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_list", + Method: "GET", + PathPattern: "/dcim/module-types/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesListOK) 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_manufacturers_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_module-types_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersDelete dcim manufacturers delete API + DcimModuleTypesPartialUpdate dcim module types partial update API */ -func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersDeleteNoContent, error) { +func (a *Client) DcimModuleTypesPartialUpdate(params *DcimModuleTypesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersDeleteParams() + params = NewDcimModuleTypesPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_delete", + ID: "dcim_module-types_partial_update", + Method: "PATCH", + PathPattern: "/dcim/module-types/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesPartialUpdateOK) + 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_module-types_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesRead dcim module types read API +*/ +func (a *Client) DcimModuleTypesRead(params *DcimModuleTypesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesReadParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_read", + Method: "GET", + PathPattern: "/dcim/module-types/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesReadOK) + 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_module-types_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModuleTypesUpdate dcim module types update API +*/ +func (a *Client) DcimModuleTypesUpdate(params *DcimModuleTypesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModuleTypesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModuleTypesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_module-types_update", + Method: "PUT", + PathPattern: "/dcim/module-types/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModuleTypesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModuleTypesUpdateOK) + 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_module-types_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModulesBulkDelete dcim modules bulk delete API +*/ +func (a *Client) DcimModulesBulkDelete(params *DcimModulesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModulesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_modules_bulk_delete", Method: "DELETE", - PathPattern: "/dcim/manufacturers/{id}/", + PathPattern: "/dcim/modules/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersDeleteReader{formats: a.formats}, + Reader: &DcimModulesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6704,33 +8762,189 @@ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersDeleteNoContent) + success, ok := result.(*DcimModulesBulkDeleteNoContent) 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_manufacturers_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_modules_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersList Overrides ListModelMixin to allow processing ExportTemplates. + DcimModulesBulkPartialUpdate dcim modules bulk partial update API */ -func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersListOK, error) { +func (a *Client) DcimModulesBulkPartialUpdate(params *DcimModulesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersListParams() + params = NewDcimModulesBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_list", + ID: "dcim_modules_bulk_partial_update", + Method: "PATCH", + PathPattern: "/dcim/modules/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModulesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModulesBulkPartialUpdateOK) + 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_modules_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModulesBulkUpdate dcim modules bulk update API +*/ +func (a *Client) DcimModulesBulkUpdate(params *DcimModulesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModulesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_modules_bulk_update", + Method: "PUT", + PathPattern: "/dcim/modules/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModulesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModulesBulkUpdateOK) + 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_modules_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModulesCreate dcim modules create API +*/ +func (a *Client) DcimModulesCreate(params *DcimModulesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModulesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_modules_create", + Method: "POST", + PathPattern: "/dcim/modules/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModulesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModulesCreateCreated) + 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_modules_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModulesDelete dcim modules delete API +*/ +func (a *Client) DcimModulesDelete(params *DcimModulesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModulesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_modules_delete", + Method: "DELETE", + PathPattern: "/dcim/modules/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DcimModulesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DcimModulesDeleteNoContent) + 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_modules_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DcimModulesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) DcimModulesList(params *DcimModulesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimModulesListParams() + } + op := &runtime.ClientOperation{ + ID: "dcim_modules_list", Method: "GET", - PathPattern: "/dcim/manufacturers/", + PathPattern: "/dcim/modules/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersListReader{formats: a.formats}, + Reader: &DcimModulesListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6743,33 +8957,33 @@ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, auth if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersListOK) + success, ok := result.(*DcimModulesListOK) 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_manufacturers_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_modules_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersPartialUpdate dcim manufacturers partial update API + DcimModulesPartialUpdate dcim modules partial update API */ -func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersPartialUpdateOK, error) { +func (a *Client) DcimModulesPartialUpdate(params *DcimModulesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersPartialUpdateParams() + params = NewDcimModulesPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_partial_update", + ID: "dcim_modules_partial_update", Method: "PATCH", - PathPattern: "/dcim/manufacturers/{id}/", + PathPattern: "/dcim/modules/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersPartialUpdateReader{formats: a.formats}, + Reader: &DcimModulesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6782,33 +8996,33 @@ func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartial if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersPartialUpdateOK) + success, ok := result.(*DcimModulesPartialUpdateOK) 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_manufacturers_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_modules_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersRead dcim manufacturers read API + DcimModulesRead dcim modules read API */ -func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersReadOK, error) { +func (a *Client) DcimModulesRead(params *DcimModulesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersReadParams() + params = NewDcimModulesReadParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_read", + ID: "dcim_modules_read", Method: "GET", - PathPattern: "/dcim/manufacturers/{id}/", + PathPattern: "/dcim/modules/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersReadReader{formats: a.formats}, + Reader: &DcimModulesReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6821,33 +9035,33 @@ func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, auth if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersReadOK) + success, ok := result.(*DcimModulesReadOK) 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_manufacturers_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_modules_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - DcimManufacturersUpdate dcim manufacturers update API + DcimModulesUpdate dcim modules update API */ -func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimManufacturersUpdateOK, error) { +func (a *Client) DcimModulesUpdate(params *DcimModulesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DcimModulesUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDcimManufacturersUpdateParams() + params = NewDcimModulesUpdateParams() } op := &runtime.ClientOperation{ - ID: "dcim_manufacturers_update", + ID: "dcim_modules_update", Method: "PUT", - PathPattern: "/dcim/manufacturers/{id}/", + PathPattern: "/dcim/modules/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &DcimManufacturersUpdateReader{formats: a.formats}, + Reader: &DcimModulesUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -6860,13 +9074,13 @@ func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, if err != nil { return nil, err } - success, ok := result.(*DcimManufacturersUpdateOK) + success, ok := result.(*DcimModulesUpdateOK) 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_manufacturers_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for dcim_modules_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -6884,7 +9098,7 @@ func (a *Client) DcimPlatformsBulkDelete(params *DcimPlatformsBulkDeleteParams, PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -6923,7 +9137,7 @@ func (a *Client) DcimPlatformsBulkPartialUpdate(params *DcimPlatformsBulkPartial PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -6962,7 +9176,7 @@ func (a *Client) DcimPlatformsBulkUpdate(params *DcimPlatformsBulkUpdateParams, PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7001,7 +9215,7 @@ func (a *Client) DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7040,7 +9254,7 @@ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -7079,7 +9293,7 @@ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo run PathPattern: "/dcim/platforms/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -7118,7 +9332,7 @@ func (a *Client) DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdatePa PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7157,7 +9371,7 @@ func (a *Client) DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo run PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -7196,7 +9410,7 @@ func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo PathPattern: "/dcim/platforms/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPlatformsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7235,7 +9449,7 @@ func (a *Client) DcimPowerFeedsBulkDelete(params *DcimPowerFeedsBulkDeleteParams PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -7274,7 +9488,7 @@ func (a *Client) DcimPowerFeedsBulkPartialUpdate(params *DcimPowerFeedsBulkParti PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7313,7 +9527,7 @@ func (a *Client) DcimPowerFeedsBulkUpdate(params *DcimPowerFeedsBulkUpdateParams PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7352,7 +9566,7 @@ func (a *Client) DcimPowerFeedsCreate(params *DcimPowerFeedsCreateParams, authIn PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7391,7 +9605,7 @@ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authIn PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -7430,7 +9644,7 @@ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo r PathPattern: "/dcim/power-feeds/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -7469,7 +9683,7 @@ func (a *Client) DcimPowerFeedsPartialUpdate(params *DcimPowerFeedsPartialUpdate PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7508,7 +9722,7 @@ func (a *Client) DcimPowerFeedsRead(params *DcimPowerFeedsReadParams, authInfo r PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -7547,7 +9761,7 @@ func (a *Client) DcimPowerFeedsTrace(params *DcimPowerFeedsTraceParams, authInfo PathPattern: "/dcim/power-feeds/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -7586,7 +9800,7 @@ func (a *Client) DcimPowerFeedsUpdate(params *DcimPowerFeedsUpdateParams, authIn PathPattern: "/dcim/power-feeds/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerFeedsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7625,7 +9839,7 @@ func (a *Client) DcimPowerOutletTemplatesBulkDelete(params *DcimPowerOutletTempl PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -7664,7 +9878,7 @@ func (a *Client) DcimPowerOutletTemplatesBulkPartialUpdate(params *DcimPowerOutl PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7703,7 +9917,7 @@ func (a *Client) DcimPowerOutletTemplatesBulkUpdate(params *DcimPowerOutletTempl PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7742,7 +9956,7 @@ func (a *Client) DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplates PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7781,7 +9995,7 @@ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplates PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -7820,7 +10034,7 @@ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesLi PathPattern: "/dcim/power-outlet-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -7859,7 +10073,7 @@ func (a *Client) DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTe PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7898,7 +10112,7 @@ func (a *Client) DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesRe PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -7937,7 +10151,7 @@ func (a *Client) DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplates PathPattern: "/dcim/power-outlet-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -7976,7 +10190,7 @@ func (a *Client) DcimPowerOutletsBulkDelete(params *DcimPowerOutletsBulkDeletePa PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -8015,7 +10229,7 @@ func (a *Client) DcimPowerOutletsBulkPartialUpdate(params *DcimPowerOutletsBulkP PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8054,7 +10268,7 @@ func (a *Client) DcimPowerOutletsBulkUpdate(params *DcimPowerOutletsBulkUpdatePa PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8093,7 +10307,7 @@ func (a *Client) DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, au PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8132,7 +10346,7 @@ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, au PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -8171,7 +10385,7 @@ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authIn PathPattern: "/dcim/power-outlets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -8210,7 +10424,7 @@ func (a *Client) DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUp PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8249,7 +10463,7 @@ func (a *Client) DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authIn PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -8288,7 +10502,7 @@ func (a *Client) DcimPowerOutletsTrace(params *DcimPowerOutletsTraceParams, auth PathPattern: "/dcim/power-outlets/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -8327,7 +10541,7 @@ func (a *Client) DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, au PathPattern: "/dcim/power-outlets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerOutletsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8366,7 +10580,7 @@ func (a *Client) DcimPowerPanelsBulkDelete(params *DcimPowerPanelsBulkDeletePara PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -8405,7 +10619,7 @@ func (a *Client) DcimPowerPanelsBulkPartialUpdate(params *DcimPowerPanelsBulkPar PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8444,7 +10658,7 @@ func (a *Client) DcimPowerPanelsBulkUpdate(params *DcimPowerPanelsBulkUpdatePara PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8483,7 +10697,7 @@ func (a *Client) DcimPowerPanelsCreate(params *DcimPowerPanelsCreateParams, auth PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8522,7 +10736,7 @@ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, auth PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -8561,7 +10775,7 @@ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo PathPattern: "/dcim/power-panels/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -8600,7 +10814,7 @@ func (a *Client) DcimPowerPanelsPartialUpdate(params *DcimPowerPanelsPartialUpda PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8639,7 +10853,7 @@ func (a *Client) DcimPowerPanelsRead(params *DcimPowerPanelsReadParams, authInfo PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -8678,7 +10892,7 @@ func (a *Client) DcimPowerPanelsUpdate(params *DcimPowerPanelsUpdateParams, auth PathPattern: "/dcim/power-panels/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPanelsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8717,7 +10931,7 @@ func (a *Client) DcimPowerPortTemplatesBulkDelete(params *DcimPowerPortTemplates PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -8756,7 +10970,7 @@ func (a *Client) DcimPowerPortTemplatesBulkPartialUpdate(params *DcimPowerPortTe PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8795,7 +11009,7 @@ func (a *Client) DcimPowerPortTemplatesBulkUpdate(params *DcimPowerPortTemplates PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8834,7 +11048,7 @@ func (a *Client) DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCrea PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8873,7 +11087,7 @@ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDele PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -8912,7 +11126,7 @@ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListPa PathPattern: "/dcim/power-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -8951,7 +11165,7 @@ func (a *Client) DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTempla PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -8990,7 +11204,7 @@ func (a *Client) DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadPa PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -9029,7 +11243,7 @@ func (a *Client) DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpda PathPattern: "/dcim/power-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9068,7 +11282,7 @@ func (a *Client) DcimPowerPortsBulkDelete(params *DcimPowerPortsBulkDeleteParams PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -9107,7 +11321,7 @@ func (a *Client) DcimPowerPortsBulkPartialUpdate(params *DcimPowerPortsBulkParti PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9146,7 +11360,7 @@ func (a *Client) DcimPowerPortsBulkUpdate(params *DcimPowerPortsBulkUpdateParams PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9185,7 +11399,7 @@ func (a *Client) DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authIn PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9224,7 +11438,7 @@ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authIn PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -9263,7 +11477,7 @@ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo r PathPattern: "/dcim/power-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -9302,7 +11516,7 @@ func (a *Client) DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdate PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9341,7 +11555,7 @@ func (a *Client) DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo r PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -9380,7 +11594,7 @@ func (a *Client) DcimPowerPortsTrace(params *DcimPowerPortsTraceParams, authInfo PathPattern: "/dcim/power-ports/{id}/trace/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsTraceReader{formats: a.formats}, AuthInfo: authInfo, @@ -9419,7 +11633,7 @@ func (a *Client) DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authIn PathPattern: "/dcim/power-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimPowerPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9458,7 +11672,7 @@ func (a *Client) DcimRackReservationsBulkDelete(params *DcimRackReservationsBulk PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -9497,7 +11711,7 @@ func (a *Client) DcimRackReservationsBulkPartialUpdate(params *DcimRackReservati PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9536,7 +11750,7 @@ func (a *Client) DcimRackReservationsBulkUpdate(params *DcimRackReservationsBulk PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9575,7 +11789,7 @@ func (a *Client) DcimRackReservationsCreate(params *DcimRackReservationsCreatePa PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9614,7 +11828,7 @@ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeletePa PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -9653,7 +11867,7 @@ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams PathPattern: "/dcim/rack-reservations/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -9692,7 +11906,7 @@ func (a *Client) DcimRackReservationsPartialUpdate(params *DcimRackReservationsP PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9731,7 +11945,7 @@ func (a *Client) DcimRackReservationsRead(params *DcimRackReservationsReadParams PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -9770,7 +11984,7 @@ func (a *Client) DcimRackReservationsUpdate(params *DcimRackReservationsUpdatePa PathPattern: "/dcim/rack-reservations/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackReservationsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9809,7 +12023,7 @@ func (a *Client) DcimRackRolesBulkDelete(params *DcimRackRolesBulkDeleteParams, PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -9848,7 +12062,7 @@ func (a *Client) DcimRackRolesBulkPartialUpdate(params *DcimRackRolesBulkPartial PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9887,7 +12101,7 @@ func (a *Client) DcimRackRolesBulkUpdate(params *DcimRackRolesBulkUpdateParams, PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9926,7 +12140,7 @@ func (a *Client) DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -9965,7 +12179,7 @@ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -10004,7 +12218,7 @@ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo run PathPattern: "/dcim/rack-roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -10043,7 +12257,7 @@ func (a *Client) DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdatePa PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10082,7 +12296,7 @@ func (a *Client) DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo run PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -10121,7 +12335,7 @@ func (a *Client) DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo PathPattern: "/dcim/rack-roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRackRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10160,7 +12374,7 @@ func (a *Client) DcimRacksBulkDelete(params *DcimRacksBulkDeleteParams, authInfo PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -10199,7 +12413,7 @@ func (a *Client) DcimRacksBulkPartialUpdate(params *DcimRacksBulkPartialUpdatePa PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10238,7 +12452,7 @@ func (a *Client) DcimRacksBulkUpdate(params *DcimRacksBulkUpdateParams, authInfo PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10277,7 +12491,7 @@ func (a *Client) DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10316,7 +12530,7 @@ func (a *Client) DcimRacksDelete(params *DcimRacksDeleteParams, authInfo runtime PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -10355,7 +12569,7 @@ func (a *Client) DcimRacksElevation(params *DcimRacksElevationParams, authInfo r PathPattern: "/dcim/racks/{id}/elevation/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksElevationReader{formats: a.formats}, AuthInfo: authInfo, @@ -10394,7 +12608,7 @@ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.Cli PathPattern: "/dcim/racks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksListReader{formats: a.formats}, AuthInfo: authInfo, @@ -10433,7 +12647,7 @@ func (a *Client) DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, au PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10472,7 +12686,7 @@ func (a *Client) DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.Cli PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -10511,7 +12725,7 @@ func (a *Client) DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime PathPattern: "/dcim/racks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRacksUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10550,7 +12764,7 @@ func (a *Client) DcimRearPortTemplatesBulkDelete(params *DcimRearPortTemplatesBu PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -10589,7 +12803,7 @@ func (a *Client) DcimRearPortTemplatesBulkPartialUpdate(params *DcimRearPortTemp PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10628,7 +12842,7 @@ func (a *Client) DcimRearPortTemplatesBulkUpdate(params *DcimRearPortTemplatesBu PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10667,7 +12881,7 @@ func (a *Client) DcimRearPortTemplatesCreate(params *DcimRearPortTemplatesCreate PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10706,7 +12920,7 @@ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDelete PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -10745,7 +12959,7 @@ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListPara PathPattern: "/dcim/rear-port-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -10784,7 +12998,7 @@ func (a *Client) DcimRearPortTemplatesPartialUpdate(params *DcimRearPortTemplate PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10823,7 +13037,7 @@ func (a *Client) DcimRearPortTemplatesRead(params *DcimRearPortTemplatesReadPara PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -10862,7 +13076,7 @@ func (a *Client) DcimRearPortTemplatesUpdate(params *DcimRearPortTemplatesUpdate PathPattern: "/dcim/rear-port-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10901,7 +13115,7 @@ func (a *Client) DcimRearPortsBulkDelete(params *DcimRearPortsBulkDeleteParams, PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -10940,7 +13154,7 @@ func (a *Client) DcimRearPortsBulkPartialUpdate(params *DcimRearPortsBulkPartial PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -10979,7 +13193,7 @@ func (a *Client) DcimRearPortsBulkUpdate(params *DcimRearPortsBulkUpdateParams, PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11018,7 +13232,7 @@ func (a *Client) DcimRearPortsCreate(params *DcimRearPortsCreateParams, authInfo PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11057,7 +13271,7 @@ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -11096,7 +13310,7 @@ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo run PathPattern: "/dcim/rear-ports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -11135,7 +13349,7 @@ func (a *Client) DcimRearPortsPartialUpdate(params *DcimRearPortsPartialUpdatePa PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11174,7 +13388,7 @@ func (a *Client) DcimRearPortsPaths(params *DcimRearPortsPathsParams, authInfo r PathPattern: "/dcim/rear-ports/{id}/paths/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsPathsReader{formats: a.formats}, AuthInfo: authInfo, @@ -11213,7 +13427,7 @@ func (a *Client) DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo run PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -11252,7 +13466,7 @@ func (a *Client) DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo PathPattern: "/dcim/rear-ports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRearPortsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11291,7 +13505,7 @@ func (a *Client) DcimRegionsBulkDelete(params *DcimRegionsBulkDeleteParams, auth PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -11330,7 +13544,7 @@ func (a *Client) DcimRegionsBulkPartialUpdate(params *DcimRegionsBulkPartialUpda PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11369,7 +13583,7 @@ func (a *Client) DcimRegionsBulkUpdate(params *DcimRegionsBulkUpdateParams, auth PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11408,7 +13622,7 @@ func (a *Client) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo run PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11447,7 +13661,7 @@ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo run PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -11486,7 +13700,7 @@ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime PathPattern: "/dcim/regions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -11525,7 +13739,7 @@ func (a *Client) DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11564,7 +13778,7 @@ func (a *Client) DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -11603,7 +13817,7 @@ func (a *Client) DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo run PathPattern: "/dcim/regions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimRegionsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11642,7 +13856,7 @@ func (a *Client) DcimSiteGroupsBulkDelete(params *DcimSiteGroupsBulkDeleteParams PathPattern: "/dcim/site-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -11681,7 +13895,7 @@ func (a *Client) DcimSiteGroupsBulkPartialUpdate(params *DcimSiteGroupsBulkParti PathPattern: "/dcim/site-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11720,7 +13934,7 @@ func (a *Client) DcimSiteGroupsBulkUpdate(params *DcimSiteGroupsBulkUpdateParams PathPattern: "/dcim/site-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11759,7 +13973,7 @@ func (a *Client) DcimSiteGroupsCreate(params *DcimSiteGroupsCreateParams, authIn PathPattern: "/dcim/site-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11798,7 +14012,7 @@ func (a *Client) DcimSiteGroupsDelete(params *DcimSiteGroupsDeleteParams, authIn PathPattern: "/dcim/site-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -11837,7 +14051,7 @@ func (a *Client) DcimSiteGroupsList(params *DcimSiteGroupsListParams, authInfo r PathPattern: "/dcim/site-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -11876,7 +14090,7 @@ func (a *Client) DcimSiteGroupsPartialUpdate(params *DcimSiteGroupsPartialUpdate PathPattern: "/dcim/site-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11915,7 +14129,7 @@ func (a *Client) DcimSiteGroupsRead(params *DcimSiteGroupsReadParams, authInfo r PathPattern: "/dcim/site-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -11954,7 +14168,7 @@ func (a *Client) DcimSiteGroupsUpdate(params *DcimSiteGroupsUpdateParams, authIn PathPattern: "/dcim/site-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSiteGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -11993,7 +14207,7 @@ func (a *Client) DcimSitesBulkDelete(params *DcimSitesBulkDeleteParams, authInfo PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -12032,7 +14246,7 @@ func (a *Client) DcimSitesBulkPartialUpdate(params *DcimSitesBulkPartialUpdatePa PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12071,7 +14285,7 @@ func (a *Client) DcimSitesBulkUpdate(params *DcimSitesBulkUpdateParams, authInfo PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12110,7 +14324,7 @@ func (a *Client) DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12149,7 +14363,7 @@ func (a *Client) DcimSitesDelete(params *DcimSitesDeleteParams, authInfo runtime PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -12188,7 +14402,7 @@ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.Cli PathPattern: "/dcim/sites/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -12227,7 +14441,7 @@ func (a *Client) DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, au PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12266,7 +14480,7 @@ func (a *Client) DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.Cli PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -12305,7 +14519,7 @@ func (a *Client) DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime PathPattern: "/dcim/sites/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimSitesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12344,7 +14558,7 @@ func (a *Client) DcimVirtualChassisBulkDelete(params *DcimVirtualChassisBulkDele PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -12383,7 +14597,7 @@ func (a *Client) DcimVirtualChassisBulkPartialUpdate(params *DcimVirtualChassisB PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12422,7 +14636,7 @@ func (a *Client) DcimVirtualChassisBulkUpdate(params *DcimVirtualChassisBulkUpda PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12461,7 +14675,7 @@ func (a *Client) DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12500,7 +14714,7 @@ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -12539,7 +14753,7 @@ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, au PathPattern: "/dcim/virtual-chassis/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisListReader{formats: a.formats}, AuthInfo: authInfo, @@ -12578,7 +14792,7 @@ func (a *Client) DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisParti PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -12617,7 +14831,7 @@ func (a *Client) DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, au PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -12656,7 +14870,7 @@ func (a *Client) DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams PathPattern: "/dcim/virtual-chassis/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &DcimVirtualChassisUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/dcim/dcim_console_port_templates_list_parameters.go b/netbox/client/dcim/dcim_console_port_templates_list_parameters.go index 9c8c12554..7c409026f 100644 --- a/netbox/client/dcim/dcim_console_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_console_port_templates_list_parameters.go @@ -123,12 +123,15 @@ type DcimConsolePortTemplatesListParams struct { */ Limit *int64 + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -162,6 +165,9 @@ type DcimConsolePortTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + // Type. Type *string @@ -386,6 +392,28 @@ func (o *DcimConsolePortTemplatesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithModuletypeID adds the moduletypeID to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimConsolePortTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimConsolePortTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithName(name *string) *DcimConsolePortTemplatesListParams { o.SetName(name) @@ -397,17 +425,6 @@ func (o *DcimConsolePortTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim console port templates list params -func (o *DcimConsolePortTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimConsolePortTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim console port templates list params -func (o *DcimConsolePortTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithNameIc(nameIc *string) *DcimConsolePortTemplatesListParams { o.SetNameIc(nameIc) @@ -518,6 +535,17 @@ func (o *DcimConsolePortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) WithQ(q *string) *DcimConsolePortTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim console port templates list params +func (o *DcimConsolePortTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim console port templates list params func (o *DcimConsolePortTemplatesListParams) WithType(typeVar *string) *DcimConsolePortTemplatesListParams { o.SetType(typeVar) @@ -803,35 +831,52 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuletypeIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param moduletype_id__n + var qrModuletypeIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1007,6 +1052,23 @@ func (o *DcimConsolePortTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_console_port_templates_list_responses.go b/netbox/client/dcim/dcim_console_port_templates_list_responses.go index a82bdc8dd..3ba97cc0d 100644 --- a/netbox/client/dcim/dcim_console_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_console_port_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimConsolePortTemplatesListOKBody) validateResults(formats strfmt.Regi if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsolePortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsolePortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimConsolePortTemplatesListOKBody) contextValidateResults(ctx context. if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsolePortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsolePortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_console_ports_list_parameters.go b/netbox/client/dcim/dcim_console_ports_list_parameters.go index 63f770cf8..76d35d4e3 100644 --- a/netbox/client/dcim/dcim_console_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_console_ports_list_parameters.go @@ -93,9 +93,6 @@ type DcimConsolePortsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -156,9 +153,6 @@ type DcimConsolePortsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -213,12 +207,15 @@ type DcimConsolePortsListParams struct { // LocationIDn. LocationIDn *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -303,6 +300,18 @@ type DcimConsolePortsListParams struct { // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -422,17 +431,6 @@ func (o *DcimConsolePortsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim console ports list params -func (o *DcimConsolePortsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimConsolePortsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim console ports list params -func (o *DcimConsolePortsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim console ports list params func (o *DcimConsolePortsListParams) WithDescriptionIc(descriptionIc *string) *DcimConsolePortsListParams { o.SetDescriptionIc(descriptionIc) @@ -653,17 +651,6 @@ func (o *DcimConsolePortsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim console ports list params -func (o *DcimConsolePortsListParams) WithLabelEmpty(labelEmpty *string) *DcimConsolePortsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim console ports list params -func (o *DcimConsolePortsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim console ports list params func (o *DcimConsolePortsListParams) WithLabelIc(labelIc *string) *DcimConsolePortsListParams { o.SetLabelIc(labelIc) @@ -851,6 +838,28 @@ func (o *DcimConsolePortsListParams) SetLocationIDn(locationIDn *string) { o.LocationIDn = locationIDn } +// WithModuleID adds the moduleID to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithModuleID(moduleID *string) *DcimConsolePortsListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithModuleIDn(moduleIDn *string) *DcimConsolePortsListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithName adds the name to the dcim console ports list params func (o *DcimConsolePortsListParams) WithName(name *string) *DcimConsolePortsListParams { o.SetName(name) @@ -862,17 +871,6 @@ func (o *DcimConsolePortsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim console ports list params -func (o *DcimConsolePortsListParams) WithNameEmpty(nameEmpty *string) *DcimConsolePortsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim console ports list params -func (o *DcimConsolePortsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim console ports list params func (o *DcimConsolePortsListParams) WithNameIc(nameIc *string) *DcimConsolePortsListParams { o.SetNameIc(nameIc) @@ -1170,6 +1168,50 @@ func (o *DcimConsolePortsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithVirtualChassis adds the virtualChassis to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithVirtualChassis(virtualChassis *string) *DcimConsolePortsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimConsolePortsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimConsolePortsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim console ports list params +func (o *DcimConsolePortsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimConsolePortsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim console ports list params +func (o *DcimConsolePortsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1280,23 +1322,6 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1637,23 +1662,6 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -1943,35 +1951,52 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.Name != nil { + if o.ModuleID != nil { - // query param name - var qrName string + // query param module_id + var qrModuleID string - if o.Name != nil { - qrName = *o.Name + if o.ModuleID != nil { + qrModuleID = *o.ModuleID } - qName := qrName - if qName != "" { + qModuleID := qrModuleID + if qModuleID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_id", qModuleID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuleIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param module_id__n + var qrModuleIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -2436,6 +2461,74 @@ func (o *DcimConsolePortsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_console_ports_list_responses.go b/netbox/client/dcim/dcim_console_ports_list_responses.go index 062e5cba9..702cbcec6 100644 --- a/netbox/client/dcim/dcim_console_ports_list_responses.go +++ b/netbox/client/dcim/dcim_console_ports_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimConsolePortsListOKBody) validateResults(formats strfmt.Registry) er if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsolePortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsolePortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimConsolePortsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsolePortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsolePortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go b/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go index 9fbd49470..8af233178 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_list_parameters.go @@ -123,12 +123,15 @@ type DcimConsoleServerPortTemplatesListParams struct { */ Limit *int64 + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -162,6 +165,9 @@ type DcimConsoleServerPortTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + // Type. Type *string @@ -386,6 +392,28 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithModuletypeID adds the moduletypeID to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimConsoleServerPortTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimConsoleServerPortTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithName(name *string) *DcimConsoleServerPortTemplatesListParams { o.SetName(name) @@ -397,17 +425,6 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim console server port templates list params -func (o *DcimConsoleServerPortTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimConsoleServerPortTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim console server port templates list params -func (o *DcimConsoleServerPortTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithNameIc(nameIc *string) *DcimConsoleServerPortTemplatesListParams { o.SetNameIc(nameIc) @@ -518,6 +535,17 @@ func (o *DcimConsoleServerPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) WithQ(q *string) *DcimConsoleServerPortTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim console server port templates list params +func (o *DcimConsoleServerPortTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim console server port templates list params func (o *DcimConsoleServerPortTemplatesListParams) WithType(typeVar *string) *DcimConsoleServerPortTemplatesListParams { o.SetType(typeVar) @@ -803,35 +831,52 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuletypeIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param moduletype_id__n + var qrModuletypeIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1007,6 +1052,23 @@ func (o *DcimConsoleServerPortTemplatesListParams) WriteToRequest(r runtime.Clie } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go b/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go index a5d3912d4..d365e94be 100644 --- a/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimConsoleServerPortTemplatesListOKBody) validateResults(formats strfm if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsoleServerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsoleServerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimConsoleServerPortTemplatesListOKBody) contextValidateResults(ctx co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsoleServerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsoleServerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_console_server_ports_list_parameters.go b/netbox/client/dcim/dcim_console_server_ports_list_parameters.go index 746cf658e..52b05c0ca 100644 --- a/netbox/client/dcim/dcim_console_server_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_console_server_ports_list_parameters.go @@ -93,9 +93,6 @@ type DcimConsoleServerPortsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -156,9 +153,6 @@ type DcimConsoleServerPortsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -213,12 +207,15 @@ type DcimConsoleServerPortsListParams struct { // LocationIDn. LocationIDn *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -303,6 +300,18 @@ type DcimConsoleServerPortsListParams struct { // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -422,17 +431,6 @@ func (o *DcimConsoleServerPortsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim console server ports list params -func (o *DcimConsoleServerPortsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimConsoleServerPortsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim console server ports list params -func (o *DcimConsoleServerPortsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithDescriptionIc(descriptionIc *string) *DcimConsoleServerPortsListParams { o.SetDescriptionIc(descriptionIc) @@ -653,17 +651,6 @@ func (o *DcimConsoleServerPortsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim console server ports list params -func (o *DcimConsoleServerPortsListParams) WithLabelEmpty(labelEmpty *string) *DcimConsoleServerPortsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim console server ports list params -func (o *DcimConsoleServerPortsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithLabelIc(labelIc *string) *DcimConsoleServerPortsListParams { o.SetLabelIc(labelIc) @@ -851,6 +838,28 @@ func (o *DcimConsoleServerPortsListParams) SetLocationIDn(locationIDn *string) { o.LocationIDn = locationIDn } +// WithModuleID adds the moduleID to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithModuleID(moduleID *string) *DcimConsoleServerPortsListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithModuleIDn(moduleIDn *string) *DcimConsoleServerPortsListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithName adds the name to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithName(name *string) *DcimConsoleServerPortsListParams { o.SetName(name) @@ -862,17 +871,6 @@ func (o *DcimConsoleServerPortsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim console server ports list params -func (o *DcimConsoleServerPortsListParams) WithNameEmpty(nameEmpty *string) *DcimConsoleServerPortsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim console server ports list params -func (o *DcimConsoleServerPortsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim console server ports list params func (o *DcimConsoleServerPortsListParams) WithNameIc(nameIc *string) *DcimConsoleServerPortsListParams { o.SetNameIc(nameIc) @@ -1170,6 +1168,50 @@ func (o *DcimConsoleServerPortsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithVirtualChassis adds the virtualChassis to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithVirtualChassis(virtualChassis *string) *DcimConsoleServerPortsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimConsoleServerPortsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimConsoleServerPortsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimConsoleServerPortsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim console server ports list params +func (o *DcimConsoleServerPortsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1280,23 +1322,6 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1637,23 +1662,6 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -1943,35 +1951,52 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } - if o.Name != nil { + if o.ModuleID != nil { - // query param name - var qrName string + // query param module_id + var qrModuleID string - if o.Name != nil { - qrName = *o.Name + if o.ModuleID != nil { + qrModuleID = *o.ModuleID } - qName := qrName - if qName != "" { + qModuleID := qrModuleID + if qModuleID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_id", qModuleID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuleIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param module_id__n + var qrModuleIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -2436,6 +2461,74 @@ func (o *DcimConsoleServerPortsListParams) WriteToRequest(r runtime.ClientReques } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_console_server_ports_list_responses.go b/netbox/client/dcim/dcim_console_server_ports_list_responses.go index 02da68dd0..5cd72b61d 100644 --- a/netbox/client/dcim/dcim_console_server_ports_list_responses.go +++ b/netbox/client/dcim/dcim_console_server_ports_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimConsoleServerPortsListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsoleServerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsoleServerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimConsoleServerPortsListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimConsoleServerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimConsoleServerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go b/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go index 6b16ca962..fa838b324 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_device_bay_templates_list_parameters.go @@ -126,9 +126,6 @@ type DcimDeviceBayTemplatesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -162,6 +159,9 @@ type DcimDeviceBayTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -391,17 +391,6 @@ func (o *DcimDeviceBayTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim device bay templates list params -func (o *DcimDeviceBayTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimDeviceBayTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim device bay templates list params -func (o *DcimDeviceBayTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim device bay templates list params func (o *DcimDeviceBayTemplatesListParams) WithNameIc(nameIc *string) *DcimDeviceBayTemplatesListParams { o.SetNameIc(nameIc) @@ -512,6 +501,17 @@ func (o *DcimDeviceBayTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) WithQ(q *string) *DcimDeviceBayTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim device bay templates list params +func (o *DcimDeviceBayTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WriteToRequest writes these params to a swagger request func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -792,23 +792,6 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -979,6 +962,23 @@ func (o *DcimDeviceBayTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_device_bay_templates_list_responses.go b/netbox/client/dcim/dcim_device_bay_templates_list_responses.go index 92384b472..bfadaad35 100644 --- a/netbox/client/dcim/dcim_device_bay_templates_list_responses.go +++ b/netbox/client/dcim/dcim_device_bay_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimDeviceBayTemplatesListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimDeviceBayTemplatesListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_device_bays_list_parameters.go b/netbox/client/dcim/dcim_device_bays_list_parameters.go index 31a64af63..ea7e3eda0 100644 --- a/netbox/client/dcim/dcim_device_bays_list_parameters.go +++ b/netbox/client/dcim/dcim_device_bays_list_parameters.go @@ -87,9 +87,6 @@ type DcimDeviceBaysListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -150,9 +147,6 @@ type DcimDeviceBaysListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -210,9 +204,6 @@ type DcimDeviceBaysListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -291,6 +282,18 @@ type DcimDeviceBaysListParams struct { // Tagn. Tagn *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -388,17 +391,6 @@ func (o *DcimDeviceBaysListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim device bays list params -func (o *DcimDeviceBaysListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimDeviceBaysListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim device bays list params -func (o *DcimDeviceBaysListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithDescriptionIc(descriptionIc *string) *DcimDeviceBaysListParams { o.SetDescriptionIc(descriptionIc) @@ -619,17 +611,6 @@ func (o *DcimDeviceBaysListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim device bays list params -func (o *DcimDeviceBaysListParams) WithLabelEmpty(labelEmpty *string) *DcimDeviceBaysListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim device bays list params -func (o *DcimDeviceBaysListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithLabelIc(labelIc *string) *DcimDeviceBaysListParams { o.SetLabelIc(labelIc) @@ -828,17 +809,6 @@ func (o *DcimDeviceBaysListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim device bays list params -func (o *DcimDeviceBaysListParams) WithNameEmpty(nameEmpty *string) *DcimDeviceBaysListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim device bays list params -func (o *DcimDeviceBaysListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim device bays list params func (o *DcimDeviceBaysListParams) WithNameIc(nameIc *string) *DcimDeviceBaysListParams { o.SetNameIc(nameIc) @@ -1114,6 +1084,50 @@ func (o *DcimDeviceBaysListParams) SetTagn(tagn *string) { o.Tagn = tagn } +// WithVirtualChassis adds the virtualChassis to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithVirtualChassis(virtualChassis *string) *DcimDeviceBaysListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithVirtualChassisn(virtualChassisn *string) *DcimDeviceBaysListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithVirtualChassisID(virtualChassisID *string) *DcimDeviceBaysListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim device bays list params +func (o *DcimDeviceBaysListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimDeviceBaysListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim device bays list params +func (o *DcimDeviceBaysListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1190,23 +1204,6 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1547,23 +1544,6 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -1870,23 +1850,6 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -2312,6 +2275,74 @@ func (o *DcimDeviceBaysListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_device_bays_list_responses.go b/netbox/client/dcim/dcim_device_bays_list_responses.go index 072babeb7..cfd8e3a7c 100644 --- a/netbox/client/dcim/dcim_device_bays_list_responses.go +++ b/netbox/client/dcim/dcim_device_bays_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimDeviceBaysListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimDeviceBaysListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_device_roles_list_parameters.go b/netbox/client/dcim/dcim_device_roles_list_parameters.go index b219cdeb0..5e9a8c730 100644 --- a/netbox/client/dcim/dcim_device_roles_list_parameters.go +++ b/netbox/client/dcim/dcim_device_roles_list_parameters.go @@ -78,9 +78,6 @@ type DcimDeviceRolesListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -117,6 +114,36 @@ type DcimDeviceRolesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -153,9 +180,6 @@ type DcimDeviceRolesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -195,9 +219,6 @@ type DcimDeviceRolesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -225,6 +246,12 @@ type DcimDeviceRolesListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + // VMRole. VMRole *string @@ -292,17 +319,6 @@ func (o *DcimDeviceRolesListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the dcim device roles list params -func (o *DcimDeviceRolesListParams) WithColorEmpty(colorEmpty *string) *DcimDeviceRolesListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the dcim device roles list params -func (o *DcimDeviceRolesListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithColorIc(colorIc *string) *DcimDeviceRolesListParams { o.SetColorIc(colorIc) @@ -435,6 +451,116 @@ func (o *DcimDeviceRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescription(description *string) *DcimDeviceRolesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionIc(descriptionIc *string) *DcimDeviceRolesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionIe(descriptionIe *string) *DcimDeviceRolesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionIew(descriptionIew *string) *DcimDeviceRolesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionIsw(descriptionIsw *string) *DcimDeviceRolesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionn(descriptionn *string) *DcimDeviceRolesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionNic(descriptionNic *string) *DcimDeviceRolesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionNie(descriptionNie *string) *DcimDeviceRolesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionNiew(descriptionNiew *string) *DcimDeviceRolesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithDescriptionNisw(descriptionNisw *string) *DcimDeviceRolesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithID(id *string) *DcimDeviceRolesListParams { o.SetID(id) @@ -556,17 +682,6 @@ func (o *DcimDeviceRolesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim device roles list params -func (o *DcimDeviceRolesListParams) WithNameEmpty(nameEmpty *string) *DcimDeviceRolesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim device roles list params -func (o *DcimDeviceRolesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithNameIc(nameIc *string) *DcimDeviceRolesListParams { o.SetNameIc(nameIc) @@ -699,17 +814,6 @@ func (o *DcimDeviceRolesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim device roles list params -func (o *DcimDeviceRolesListParams) WithSlugEmpty(slugEmpty *string) *DcimDeviceRolesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim device roles list params -func (o *DcimDeviceRolesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithSlugIc(slugIc *string) *DcimDeviceRolesListParams { o.SetSlugIc(slugIc) @@ -809,6 +913,28 @@ func (o *DcimDeviceRolesListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithTag(tag *string) *DcimDeviceRolesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim device roles list params +func (o *DcimDeviceRolesListParams) WithTagn(tagn *string) *DcimDeviceRolesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim device roles list params +func (o *DcimDeviceRolesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WithVMRole adds the vMRole to the dcim device roles list params func (o *DcimDeviceRolesListParams) WithVMRole(vMRole *string) *DcimDeviceRolesListParams { o.SetVMRole(vMRole) @@ -845,23 +971,6 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1066,6 +1175,176 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1253,23 +1532,6 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1474,23 +1736,6 @@ func (o *DcimDeviceRolesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1644,6 +1889,40 @@ func (o *DcimDeviceRolesListParams) 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 o.VMRole != nil { // query param vm_role diff --git a/netbox/client/dcim/dcim_device_roles_list_responses.go b/netbox/client/dcim/dcim_device_roles_list_responses.go index 26b918804..bcec3dfc7 100644 --- a/netbox/client/dcim/dcim_device_roles_list_responses.go +++ b/netbox/client/dcim/dcim_device_roles_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimDeviceRolesListOKBody) validateResults(formats strfmt.Registry) err if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimDeviceRolesListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_device_types_list_parameters.go b/netbox/client/dcim/dcim_device_types_list_parameters.go index b9d555ae1..beeac8cd8 100644 --- a/netbox/client/dcim/dcim_device_types_list_parameters.go +++ b/netbox/client/dcim/dcim_device_types_list_parameters.go @@ -75,6 +75,12 @@ func NewDcimDeviceTypesListParamsWithHTTPClient(client *http.Client) *DcimDevice */ type DcimDeviceTypesListParams struct { + // Airflow. + Airflow *string + + // Airflown. + Airflown *string + // ConsolePorts. ConsolePorts *string @@ -147,9 +153,6 @@ type DcimDeviceTypesListParams struct { // Model. Model *string - // ModelEmpty. - ModelEmpty *string - // ModelIc. ModelIc *string @@ -177,6 +180,9 @@ type DcimDeviceTypesListParams struct { // ModelNisw. ModelNisw *string + // ModuleBays. + ModuleBays *string + /* Offset. The initial index from which to return the results. @@ -186,9 +192,6 @@ type DcimDeviceTypesListParams struct { // PartNumber. PartNumber *string - // PartNumberEmpty. - PartNumberEmpty *string - // PartNumberIc. PartNumberIc *string @@ -231,9 +234,6 @@ type DcimDeviceTypesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -344,6 +344,28 @@ func (o *DcimDeviceTypesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithAirflow adds the airflow to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithAirflow(airflow *string) *DcimDeviceTypesListParams { + o.SetAirflow(airflow) + return o +} + +// SetAirflow adds the airflow to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetAirflow(airflow *string) { + o.Airflow = airflow +} + +// WithAirflown adds the airflown to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithAirflown(airflown *string) *DcimDeviceTypesListParams { + o.SetAirflown(airflown) + return o +} + +// SetAirflown adds the airflowN to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetAirflown(airflown *string) { + o.Airflown = airflown +} + // WithConsolePorts adds the consolePorts to the dcim device types list params func (o *DcimDeviceTypesListParams) WithConsolePorts(consolePorts *string) *DcimDeviceTypesListParams { o.SetConsolePorts(consolePorts) @@ -597,17 +619,6 @@ func (o *DcimDeviceTypesListParams) SetModel(model *string) { o.Model = model } -// WithModelEmpty adds the modelEmpty to the dcim device types list params -func (o *DcimDeviceTypesListParams) WithModelEmpty(modelEmpty *string) *DcimDeviceTypesListParams { - o.SetModelEmpty(modelEmpty) - return o -} - -// SetModelEmpty adds the modelEmpty to the dcim device types list params -func (o *DcimDeviceTypesListParams) SetModelEmpty(modelEmpty *string) { - o.ModelEmpty = modelEmpty -} - // WithModelIc adds the modelIc to the dcim device types list params func (o *DcimDeviceTypesListParams) WithModelIc(modelIc *string) *DcimDeviceTypesListParams { o.SetModelIc(modelIc) @@ -707,6 +718,17 @@ func (o *DcimDeviceTypesListParams) SetModelNisw(modelNisw *string) { o.ModelNisw = modelNisw } +// WithModuleBays adds the moduleBays to the dcim device types list params +func (o *DcimDeviceTypesListParams) WithModuleBays(moduleBays *string) *DcimDeviceTypesListParams { + o.SetModuleBays(moduleBays) + return o +} + +// SetModuleBays adds the moduleBays to the dcim device types list params +func (o *DcimDeviceTypesListParams) SetModuleBays(moduleBays *string) { + o.ModuleBays = moduleBays +} + // WithOffset adds the offset to the dcim device types list params func (o *DcimDeviceTypesListParams) WithOffset(offset *int64) *DcimDeviceTypesListParams { o.SetOffset(offset) @@ -729,17 +751,6 @@ func (o *DcimDeviceTypesListParams) SetPartNumber(partNumber *string) { o.PartNumber = partNumber } -// WithPartNumberEmpty adds the partNumberEmpty to the dcim device types list params -func (o *DcimDeviceTypesListParams) WithPartNumberEmpty(partNumberEmpty *string) *DcimDeviceTypesListParams { - o.SetPartNumberEmpty(partNumberEmpty) - return o -} - -// SetPartNumberEmpty adds the partNumberEmpty to the dcim device types list params -func (o *DcimDeviceTypesListParams) SetPartNumberEmpty(partNumberEmpty *string) { - o.PartNumberEmpty = partNumberEmpty -} - // WithPartNumberIc adds the partNumberIc to the dcim device types list params func (o *DcimDeviceTypesListParams) WithPartNumberIc(partNumberIc *string) *DcimDeviceTypesListParams { o.SetPartNumberIc(partNumberIc) @@ -894,17 +905,6 @@ func (o *DcimDeviceTypesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim device types list params -func (o *DcimDeviceTypesListParams) WithSlugEmpty(slugEmpty *string) *DcimDeviceTypesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim device types list params -func (o *DcimDeviceTypesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim device types list params func (o *DcimDeviceTypesListParams) WithSlugIc(slugIc *string) *DcimDeviceTypesListParams { o.SetSlugIc(slugIc) @@ -1122,6 +1122,40 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + if o.Airflow != nil { + + // query param airflow + var qrAirflow string + + if o.Airflow != nil { + qrAirflow = *o.Airflow + } + qAirflow := qrAirflow + if qAirflow != "" { + + if err := r.SetQueryParam("airflow", qAirflow); err != nil { + return err + } + } + } + + if o.Airflown != nil { + + // query param airflow__n + var qrAirflown string + + if o.Airflown != nil { + qrAirflown = *o.Airflown + } + qAirflown := qrAirflown + if qAirflown != "" { + + if err := r.SetQueryParam("airflow__n", qAirflown); err != nil { + return err + } + } + } + if o.ConsolePorts != nil { // query param console_ports @@ -1513,23 +1547,6 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.ModelEmpty != nil { - - // query param model__empty - var qrModelEmpty string - - if o.ModelEmpty != nil { - qrModelEmpty = *o.ModelEmpty - } - qModelEmpty := qrModelEmpty - if qModelEmpty != "" { - - if err := r.SetQueryParam("model__empty", qModelEmpty); err != nil { - return err - } - } - } - if o.ModelIc != nil { // query param model__ic @@ -1683,6 +1700,23 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.ModuleBays != nil { + + // query param module_bays + var qrModuleBays string + + if o.ModuleBays != nil { + qrModuleBays = *o.ModuleBays + } + qModuleBays := qrModuleBays + if qModuleBays != "" { + + if err := r.SetQueryParam("module_bays", qModuleBays); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -1717,23 +1751,6 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.PartNumberEmpty != nil { - - // query param part_number__empty - var qrPartNumberEmpty string - - if o.PartNumberEmpty != nil { - qrPartNumberEmpty = *o.PartNumberEmpty - } - qPartNumberEmpty := qrPartNumberEmpty - if qPartNumberEmpty != "" { - - if err := r.SetQueryParam("part_number__empty", qPartNumberEmpty); err != nil { - return err - } - } - } - if o.PartNumberIc != nil { // query param part_number__ic @@ -1972,23 +1989,6 @@ func (o *DcimDeviceTypesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic diff --git a/netbox/client/dcim/dcim_device_types_list_responses.go b/netbox/client/dcim/dcim_device_types_list_responses.go index 6739ef393..26b0de61a 100644 --- a/netbox/client/dcim/dcim_device_types_list_responses.go +++ b/netbox/client/dcim/dcim_device_types_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimDeviceTypesListOKBody) validateResults(formats strfmt.Registry) err if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimDeviceTypesListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDeviceTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDeviceTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_devices_list_parameters.go b/netbox/client/dcim/dcim_devices_list_parameters.go index 074177e8d..554ca6804 100644 --- a/netbox/client/dcim/dcim_devices_list_parameters.go +++ b/netbox/client/dcim/dcim_devices_list_parameters.go @@ -75,12 +75,15 @@ func NewDcimDevicesListParamsWithHTTPClient(client *http.Client) *DcimDevicesLis */ type DcimDevicesListParams struct { + // Airflow. + Airflow *string + + // Airflown. + Airflown *string + // AssetTag. AssetTag *string - // AssetTagEmpty. - AssetTagEmpty *string - // AssetTagIc. AssetTagIc *string @@ -120,6 +123,18 @@ type DcimDevicesListParams struct { // ConsoleServerPorts. ConsoleServerPorts *string + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -243,12 +258,12 @@ type DcimDevicesListParams struct { // Modeln. Modeln *string + // ModuleBays. + ModuleBays *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -282,6 +297,12 @@ type DcimDevicesListParams struct { */ Offset *int64 + // ParentDeviceID. + ParentDeviceID *string + + // ParentDeviceIDn. + ParentDeviceIDn *string + // PassThroughPorts. PassThroughPorts *string @@ -515,6 +536,28 @@ func (o *DcimDevicesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithAirflow adds the airflow to the dcim devices list params +func (o *DcimDevicesListParams) WithAirflow(airflow *string) *DcimDevicesListParams { + o.SetAirflow(airflow) + return o +} + +// SetAirflow adds the airflow to the dcim devices list params +func (o *DcimDevicesListParams) SetAirflow(airflow *string) { + o.Airflow = airflow +} + +// WithAirflown adds the airflown to the dcim devices list params +func (o *DcimDevicesListParams) WithAirflown(airflown *string) *DcimDevicesListParams { + o.SetAirflown(airflown) + return o +} + +// SetAirflown adds the airflowN to the dcim devices list params +func (o *DcimDevicesListParams) SetAirflown(airflown *string) { + o.Airflown = airflown +} + // WithAssetTag adds the assetTag to the dcim devices list params func (o *DcimDevicesListParams) WithAssetTag(assetTag *string) *DcimDevicesListParams { o.SetAssetTag(assetTag) @@ -526,17 +569,6 @@ func (o *DcimDevicesListParams) SetAssetTag(assetTag *string) { o.AssetTag = assetTag } -// WithAssetTagEmpty adds the assetTagEmpty to the dcim devices list params -func (o *DcimDevicesListParams) WithAssetTagEmpty(assetTagEmpty *string) *DcimDevicesListParams { - o.SetAssetTagEmpty(assetTagEmpty) - return o -} - -// SetAssetTagEmpty adds the assetTagEmpty to the dcim devices list params -func (o *DcimDevicesListParams) SetAssetTagEmpty(assetTagEmpty *string) { - o.AssetTagEmpty = assetTagEmpty -} - // WithAssetTagIc adds the assetTagIc to the dcim devices list params func (o *DcimDevicesListParams) WithAssetTagIc(assetTagIc *string) *DcimDevicesListParams { o.SetAssetTagIc(assetTagIc) @@ -680,6 +712,50 @@ func (o *DcimDevicesListParams) SetConsoleServerPorts(consoleServerPorts *string o.ConsoleServerPorts = consoleServerPorts } +// WithContact adds the contact to the dcim devices list params +func (o *DcimDevicesListParams) WithContact(contact *string) *DcimDevicesListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim devices list params +func (o *DcimDevicesListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim devices list params +func (o *DcimDevicesListParams) WithContactn(contactn *string) *DcimDevicesListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim devices list params +func (o *DcimDevicesListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim devices list params +func (o *DcimDevicesListParams) WithContactRole(contactRole *string) *DcimDevicesListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim devices list params +func (o *DcimDevicesListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim devices list params +func (o *DcimDevicesListParams) WithContactRolen(contactRolen *string) *DcimDevicesListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim devices list params +func (o *DcimDevicesListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim devices list params func (o *DcimDevicesListParams) WithCreated(created *string) *DcimDevicesListParams { o.SetCreated(created) @@ -1120,6 +1196,17 @@ func (o *DcimDevicesListParams) SetModeln(modeln *string) { o.Modeln = modeln } +// WithModuleBays adds the moduleBays to the dcim devices list params +func (o *DcimDevicesListParams) WithModuleBays(moduleBays *string) *DcimDevicesListParams { + o.SetModuleBays(moduleBays) + return o +} + +// SetModuleBays adds the moduleBays to the dcim devices list params +func (o *DcimDevicesListParams) SetModuleBays(moduleBays *string) { + o.ModuleBays = moduleBays +} + // WithName adds the name to the dcim devices list params func (o *DcimDevicesListParams) WithName(name *string) *DcimDevicesListParams { o.SetName(name) @@ -1131,17 +1218,6 @@ func (o *DcimDevicesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim devices list params -func (o *DcimDevicesListParams) WithNameEmpty(nameEmpty *string) *DcimDevicesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim devices list params -func (o *DcimDevicesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim devices list params func (o *DcimDevicesListParams) WithNameIc(nameIc *string) *DcimDevicesListParams { o.SetNameIc(nameIc) @@ -1252,6 +1328,28 @@ func (o *DcimDevicesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithParentDeviceID adds the parentDeviceID to the dcim devices list params +func (o *DcimDevicesListParams) WithParentDeviceID(parentDeviceID *string) *DcimDevicesListParams { + o.SetParentDeviceID(parentDeviceID) + return o +} + +// SetParentDeviceID adds the parentDeviceId to the dcim devices list params +func (o *DcimDevicesListParams) SetParentDeviceID(parentDeviceID *string) { + o.ParentDeviceID = parentDeviceID +} + +// WithParentDeviceIDn adds the parentDeviceIDn to the dcim devices list params +func (o *DcimDevicesListParams) WithParentDeviceIDn(parentDeviceIDn *string) *DcimDevicesListParams { + o.SetParentDeviceIDn(parentDeviceIDn) + return o +} + +// SetParentDeviceIDn adds the parentDeviceIdN to the dcim devices list params +func (o *DcimDevicesListParams) SetParentDeviceIDn(parentDeviceIDn *string) { + o.ParentDeviceIDn = parentDeviceIDn +} + // WithPassThroughPorts adds the passThroughPorts to the dcim devices list params func (o *DcimDevicesListParams) WithPassThroughPorts(passThroughPorts *string) *DcimDevicesListParams { o.SetPassThroughPorts(passThroughPorts) @@ -1920,35 +2018,52 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } var res []error - if o.AssetTag != nil { + if o.Airflow != nil { - // query param asset_tag - var qrAssetTag string + // query param airflow + var qrAirflow string - if o.AssetTag != nil { - qrAssetTag = *o.AssetTag + if o.Airflow != nil { + qrAirflow = *o.Airflow } - qAssetTag := qrAssetTag - if qAssetTag != "" { + qAirflow := qrAirflow + if qAirflow != "" { - if err := r.SetQueryParam("asset_tag", qAssetTag); err != nil { + if err := r.SetQueryParam("airflow", qAirflow); err != nil { return err } } } - if o.AssetTagEmpty != nil { + if o.Airflown != nil { - // query param asset_tag__empty - var qrAssetTagEmpty string + // query param airflow__n + var qrAirflown string - if o.AssetTagEmpty != nil { - qrAssetTagEmpty = *o.AssetTagEmpty + if o.Airflown != nil { + qrAirflown = *o.Airflown } - qAssetTagEmpty := qrAssetTagEmpty - if qAssetTagEmpty != "" { + qAirflown := qrAirflown + if qAirflown != "" { - if err := r.SetQueryParam("asset_tag__empty", qAssetTagEmpty); err != nil { + if err := r.SetQueryParam("airflow__n", qAirflown); err != nil { + return err + } + } + } + + if o.AssetTag != nil { + + // query param asset_tag + var qrAssetTag string + + if o.AssetTag != nil { + qrAssetTag = *o.AssetTag + } + qAssetTag := qrAssetTag + if qAssetTag != "" { + + if err := r.SetQueryParam("asset_tag", qAssetTag); err != nil { return err } } @@ -2175,6 +2290,74 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -2855,35 +3038,35 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } - if o.Name != nil { + if o.ModuleBays != nil { - // query param name - var qrName string + // query param module_bays + var qrModuleBays string - if o.Name != nil { - qrName = *o.Name + if o.ModuleBays != nil { + qrModuleBays = *o.ModuleBays } - qName := qrName - if qName != "" { + qModuleBays := qrModuleBays + if qModuleBays != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_bays", qModuleBays); err != nil { return err } } } - if o.NameEmpty != nil { + if o.Name != nil { - // query param name__empty - var qrNameEmpty string + // query param name + var qrName string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.Name != nil { + qrName = *o.Name } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qName := qrName + if qName != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -3059,6 +3242,40 @@ func (o *DcimDevicesListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.ParentDeviceID != nil { + + // query param parent_device_id + var qrParentDeviceID string + + if o.ParentDeviceID != nil { + qrParentDeviceID = *o.ParentDeviceID + } + qParentDeviceID := qrParentDeviceID + if qParentDeviceID != "" { + + if err := r.SetQueryParam("parent_device_id", qParentDeviceID); err != nil { + return err + } + } + } + + if o.ParentDeviceIDn != nil { + + // query param parent_device_id__n + var qrParentDeviceIDn string + + if o.ParentDeviceIDn != nil { + qrParentDeviceIDn = *o.ParentDeviceIDn + } + qParentDeviceIDn := qrParentDeviceIDn + if qParentDeviceIDn != "" { + + if err := r.SetQueryParam("parent_device_id__n", qParentDeviceIDn); err != nil { + return err + } + } + } + if o.PassThroughPorts != nil { // query param pass_through_ports diff --git a/netbox/client/dcim/dcim_devices_list_responses.go b/netbox/client/dcim/dcim_devices_list_responses.go index cd8c27485..fca02f516 100644 --- a/netbox/client/dcim/dcim_devices_list_responses.go +++ b/netbox/client/dcim/dcim_devices_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimDevicesListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDevicesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDevicesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimDevicesListOKBody) contextValidateResults(ctx context.Context, form if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimDevicesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimDevicesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_front_port_templates_list_parameters.go b/netbox/client/dcim/dcim_front_port_templates_list_parameters.go index 7955b8c3c..b548069c7 100644 --- a/netbox/client/dcim/dcim_front_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_front_port_templates_list_parameters.go @@ -78,9 +78,6 @@ type DcimFrontPortTemplatesListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -156,12 +153,15 @@ type DcimFrontPortTemplatesListParams struct { */ Limit *int64 + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -195,6 +195,9 @@ type DcimFrontPortTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + // Type. Type *string @@ -265,17 +268,6 @@ func (o *DcimFrontPortTemplatesListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the dcim front port templates list params -func (o *DcimFrontPortTemplatesListParams) WithColorEmpty(colorEmpty *string) *DcimFrontPortTemplatesListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the dcim front port templates list params -func (o *DcimFrontPortTemplatesListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithColorIc(colorIc *string) *DcimFrontPortTemplatesListParams { o.SetColorIc(colorIc) @@ -540,6 +532,28 @@ func (o *DcimFrontPortTemplatesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithModuletypeID adds the moduletypeID to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimFrontPortTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimFrontPortTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithName(name *string) *DcimFrontPortTemplatesListParams { o.SetName(name) @@ -551,17 +565,6 @@ func (o *DcimFrontPortTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim front port templates list params -func (o *DcimFrontPortTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimFrontPortTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim front port templates list params -func (o *DcimFrontPortTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithNameIc(nameIc *string) *DcimFrontPortTemplatesListParams { o.SetNameIc(nameIc) @@ -672,6 +675,17 @@ func (o *DcimFrontPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) WithQ(q *string) *DcimFrontPortTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim front port templates list params +func (o *DcimFrontPortTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim front port templates list params func (o *DcimFrontPortTemplatesListParams) WithType(typeVar *string) *DcimFrontPortTemplatesListParams { o.SetType(typeVar) @@ -719,23 +733,6 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1144,35 +1141,52 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { + return err + } + } + } + + if o.ModuletypeIDn != nil { + + // query param moduletype_id__n + var qrModuletypeIDn string + + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn + } + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { + + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { return err } } } - if o.NameEmpty != nil { + if o.Name != nil { - // query param name__empty - var qrNameEmpty string + // query param name + var qrName string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.Name != nil { + qrName = *o.Name } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qName := qrName + if qName != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1348,6 +1362,23 @@ func (o *DcimFrontPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_front_port_templates_list_responses.go b/netbox/client/dcim/dcim_front_port_templates_list_responses.go index db88b0067..22032f8a6 100644 --- a/netbox/client/dcim/dcim_front_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_front_port_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimFrontPortTemplatesListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimFrontPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimFrontPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimFrontPortTemplatesListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimFrontPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimFrontPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_front_ports_list_parameters.go b/netbox/client/dcim/dcim_front_ports_list_parameters.go index cd7f99df9..37c66b1c2 100644 --- a/netbox/client/dcim/dcim_front_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_front_ports_list_parameters.go @@ -81,9 +81,6 @@ type DcimFrontPortsListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -123,9 +120,6 @@ type DcimFrontPortsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -186,9 +180,6 @@ type DcimFrontPortsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -243,12 +234,15 @@ type DcimFrontPortsListParams struct { // LocationIDn. LocationIDn *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -333,6 +327,18 @@ type DcimFrontPortsListParams struct { // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -408,17 +414,6 @@ func (o *DcimFrontPortsListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) WithColorEmpty(colorEmpty *string) *DcimFrontPortsListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the dcim front ports list params func (o *DcimFrontPortsListParams) WithColorIc(colorIc *string) *DcimFrontPortsListParams { o.SetColorIc(colorIc) @@ -562,17 +557,6 @@ func (o *DcimFrontPortsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimFrontPortsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim front ports list params func (o *DcimFrontPortsListParams) WithDescriptionIc(descriptionIc *string) *DcimFrontPortsListParams { o.SetDescriptionIc(descriptionIc) @@ -793,17 +777,6 @@ func (o *DcimFrontPortsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) WithLabelEmpty(labelEmpty *string) *DcimFrontPortsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim front ports list params func (o *DcimFrontPortsListParams) WithLabelIc(labelIc *string) *DcimFrontPortsListParams { o.SetLabelIc(labelIc) @@ -991,6 +964,28 @@ func (o *DcimFrontPortsListParams) SetLocationIDn(locationIDn *string) { o.LocationIDn = locationIDn } +// WithModuleID adds the moduleID to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithModuleID(moduleID *string) *DcimFrontPortsListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithModuleIDn(moduleIDn *string) *DcimFrontPortsListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithName adds the name to the dcim front ports list params func (o *DcimFrontPortsListParams) WithName(name *string) *DcimFrontPortsListParams { o.SetName(name) @@ -1002,17 +997,6 @@ func (o *DcimFrontPortsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) WithNameEmpty(nameEmpty *string) *DcimFrontPortsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim front ports list params -func (o *DcimFrontPortsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim front ports list params func (o *DcimFrontPortsListParams) WithNameIc(nameIc *string) *DcimFrontPortsListParams { o.SetNameIc(nameIc) @@ -1310,6 +1294,50 @@ func (o *DcimFrontPortsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithVirtualChassis adds the virtualChassis to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithVirtualChassis(virtualChassis *string) *DcimFrontPortsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimFrontPortsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimFrontPortsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim front ports list params +func (o *DcimFrontPortsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimFrontPortsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim front ports list params +func (o *DcimFrontPortsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1352,23 +1380,6 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1590,23 +1601,6 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1947,23 +1941,6 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -2253,35 +2230,52 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.Name != nil { + if o.ModuleID != nil { - // query param name - var qrName string + // query param module_id + var qrModuleID string - if o.Name != nil { - qrName = *o.Name + if o.ModuleID != nil { + qrModuleID = *o.ModuleID } - qName := qrName - if qName != "" { + qModuleID := qrModuleID + if qModuleID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_id", qModuleID); err != nil { + return err + } + } + } + + if o.ModuleIDn != nil { + + // query param module_id__n + var qrModuleIDn string + + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn + } + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { + + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { return err } } } - if o.NameEmpty != nil { + if o.Name != nil { - // query param name__empty - var qrNameEmpty string + // query param name + var qrName string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.Name != nil { + qrName = *o.Name } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qName := qrName + if qName != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -2746,6 +2740,74 @@ func (o *DcimFrontPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_front_ports_list_responses.go b/netbox/client/dcim/dcim_front_ports_list_responses.go index 994e543b5..6f2d4fd95 100644 --- a/netbox/client/dcim/dcim_front_ports_list_responses.go +++ b/netbox/client/dcim/dcim_front_ports_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimFrontPortsListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimFrontPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimFrontPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimFrontPortsListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimFrontPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimFrontPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_interface_templates_list_parameters.go b/netbox/client/dcim/dcim_interface_templates_list_parameters.go index 8e461373e..71dca30dc 100644 --- a/netbox/client/dcim/dcim_interface_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_interface_templates_list_parameters.go @@ -126,12 +126,15 @@ type DcimInterfaceTemplatesListParams struct { // MgmtOnly. MgmtOnly *string + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -165,6 +168,9 @@ type DcimInterfaceTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + // Type. Type *string @@ -400,6 +406,28 @@ func (o *DcimInterfaceTemplatesListParams) SetMgmtOnly(mgmtOnly *string) { o.MgmtOnly = mgmtOnly } +// WithModuletypeID adds the moduletypeID to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimInterfaceTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimInterfaceTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithName(name *string) *DcimInterfaceTemplatesListParams { o.SetName(name) @@ -411,17 +439,6 @@ func (o *DcimInterfaceTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim interface templates list params -func (o *DcimInterfaceTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimInterfaceTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim interface templates list params -func (o *DcimInterfaceTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithNameIc(nameIc *string) *DcimInterfaceTemplatesListParams { o.SetNameIc(nameIc) @@ -532,6 +549,17 @@ func (o *DcimInterfaceTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) WithQ(q *string) *DcimInterfaceTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim interface templates list params +func (o *DcimInterfaceTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim interface templates list params func (o *DcimInterfaceTemplatesListParams) WithType(typeVar *string) *DcimInterfaceTemplatesListParams { o.SetType(typeVar) @@ -834,35 +862,52 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuletypeIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param moduletype_id__n + var qrModuletypeIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1038,6 +1083,23 @@ func (o *DcimInterfaceTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_interface_templates_list_responses.go b/netbox/client/dcim/dcim_interface_templates_list_responses.go index 21d0c521e..28d4dceec 100644 --- a/netbox/client/dcim/dcim_interface_templates_list_responses.go +++ b/netbox/client/dcim/dcim_interface_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimInterfaceTemplatesListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimInterfaceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInterfaceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimInterfaceTemplatesListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimInterfaceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInterfaceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_interfaces_list_parameters.go b/netbox/client/dcim/dcim_interfaces_list_parameters.go index 2506d0f7f..b456b1b0e 100644 --- a/netbox/client/dcim/dcim_interfaces_list_parameters.go +++ b/netbox/client/dcim/dcim_interfaces_list_parameters.go @@ -75,6 +75,12 @@ func NewDcimInterfacesListParamsWithHTTPClient(client *http.Client) *DcimInterfa */ type DcimInterfacesListParams struct { + // BridgeID. + BridgeID *string + + // BridgeIDn. + BridgeIDn *string + // Cabled. Cabled *string @@ -93,9 +99,6 @@ type DcimInterfacesListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -129,6 +132,12 @@ type DcimInterfacesListParams struct { // DeviceID. DeviceID *string + // Duplex. + Duplex *string + + // Duplexn. + Duplexn *string + // Enabled. Enabled *string @@ -156,9 +165,6 @@ type DcimInterfacesListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -258,6 +264,12 @@ type DcimInterfacesListParams struct { // Moden. Moden *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Mtu. Mtu *string @@ -279,9 +291,6 @@ type DcimInterfacesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -336,6 +345,54 @@ type DcimInterfacesListParams struct { // RegionIDn. RegionIDn *string + // RfChannel. + RfChannel *string + + // RfChanneln. + RfChanneln *string + + // RfChannelFrequency. + RfChannelFrequency *string + + // RfChannelFrequencyGt. + RfChannelFrequencyGt *string + + // RfChannelFrequencyGte. + RfChannelFrequencyGte *string + + // RfChannelFrequencyLt. + RfChannelFrequencyLt *string + + // RfChannelFrequencyLte. + RfChannelFrequencyLte *string + + // RfChannelFrequencyn. + RfChannelFrequencyn *string + + // RfChannelWidth. + RfChannelWidth *string + + // RfChannelWidthGt. + RfChannelWidthGt *string + + // RfChannelWidthGte. + RfChannelWidthGte *string + + // RfChannelWidthLt. + RfChannelWidthLt *string + + // RfChannelWidthLte. + RfChannelWidthLte *string + + // RfChannelWidthn. + RfChannelWidthn *string + + // RfRole. + RfRole *string + + // RfRolen. + RfRolen *string + // Site. Site *string @@ -360,24 +417,114 @@ type DcimInterfacesListParams struct { // SiteIDn. SiteIDn *string + // Speed. + Speed *string + + // SpeedGt. + SpeedGt *string + + // SpeedGte. + SpeedGte *string + + // SpeedLt. + SpeedLt *string + + // SpeedLte. + SpeedLte *string + + // Speedn. + Speedn *string + // Tag. Tag *string // Tagn. Tagn *string + // TxPower. + TxPower *string + + // TxPowerGt. + TxPowerGt *string + + // TxPowerGte. + TxPowerGte *string + + // TxPowerLt. + TxPowerLt *string + + // TxPowerLte. + TxPowerLte *string + + // TxPowern. + TxPowern *string + // Type. Type *string // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + // Vlan. Vlan *string // VlanID. VlanID *string + // Vrf. + Vrf *string + + // Vrfn. + Vrfn *string + + // VrfID. + VrfID *string + + // VrfIDn. + VrfIDn *string + + // Wwn. + Wwn *string + + // WwnIc. + WwnIc *string + + // WwnIe. + WwnIe *string + + // WwnIew. + WwnIew *string + + // WwnIsw. + WwnIsw *string + + // Wwnn. + Wwnn *string + + // WwnNic. + WwnNic *string + + // WwnNie. + WwnNie *string + + // WwnNiew. + WwnNiew *string + + // WwnNisw. + WwnNisw *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -431,6 +578,28 @@ func (o *DcimInterfacesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithBridgeID adds the bridgeID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithBridgeID(bridgeID *string) *DcimInterfacesListParams { + o.SetBridgeID(bridgeID) + return o +} + +// SetBridgeID adds the bridgeId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetBridgeID(bridgeID *string) { + o.BridgeID = bridgeID +} + +// WithBridgeIDn adds the bridgeIDn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithBridgeIDn(bridgeIDn *string) *DcimInterfacesListParams { + o.SetBridgeIDn(bridgeIDn) + return o +} + +// SetBridgeIDn adds the bridgeIdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetBridgeIDn(bridgeIDn *string) { + o.BridgeIDn = bridgeIDn +} + // WithCabled adds the cabled to the dcim interfaces list params func (o *DcimInterfacesListParams) WithCabled(cabled *string) *DcimInterfacesListParams { o.SetCabled(cabled) @@ -497,17 +666,6 @@ func (o *DcimInterfacesListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim interfaces list params -func (o *DcimInterfacesListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimInterfacesListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim interfaces list params -func (o *DcimInterfacesListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim interfaces list params func (o *DcimInterfacesListParams) WithDescriptionIc(descriptionIc *string) *DcimInterfacesListParams { o.SetDescriptionIc(descriptionIc) @@ -629,6 +787,28 @@ func (o *DcimInterfacesListParams) SetDeviceID(deviceID *string) { o.DeviceID = deviceID } +// WithDuplex adds the duplex to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithDuplex(duplex *string) *DcimInterfacesListParams { + o.SetDuplex(duplex) + return o +} + +// SetDuplex adds the duplex to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetDuplex(duplex *string) { + o.Duplex = duplex +} + +// WithDuplexn adds the duplexn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithDuplexn(duplexn *string) *DcimInterfacesListParams { + o.SetDuplexn(duplexn) + return o +} + +// SetDuplexn adds the duplexN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetDuplexn(duplexn *string) { + o.Duplexn = duplexn +} + // WithEnabled adds the enabled to the dcim interfaces list params func (o *DcimInterfacesListParams) WithEnabled(enabled *string) *DcimInterfacesListParams { o.SetEnabled(enabled) @@ -728,17 +908,6 @@ func (o *DcimInterfacesListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim interfaces list params -func (o *DcimInterfacesListParams) WithLabelEmpty(labelEmpty *string) *DcimInterfacesListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim interfaces list params -func (o *DcimInterfacesListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim interfaces list params func (o *DcimInterfacesListParams) WithLabelIc(labelIc *string) *DcimInterfacesListParams { o.SetLabelIc(labelIc) @@ -1091,6 +1260,28 @@ func (o *DcimInterfacesListParams) SetModen(moden *string) { o.Moden = moden } +// WithModuleID adds the moduleID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithModuleID(moduleID *string) *DcimInterfacesListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithModuleIDn(moduleIDn *string) *DcimInterfacesListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithMtu adds the mtu to the dcim interfaces list params func (o *DcimInterfacesListParams) WithMtu(mtu *string) *DcimInterfacesListParams { o.SetMtu(mtu) @@ -1168,17 +1359,6 @@ func (o *DcimInterfacesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim interfaces list params -func (o *DcimInterfacesListParams) WithNameEmpty(nameEmpty *string) *DcimInterfacesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim interfaces list params -func (o *DcimInterfacesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim interfaces list params func (o *DcimInterfacesListParams) WithNameIc(nameIc *string) *DcimInterfacesListParams { o.SetNameIc(nameIc) @@ -1366,6 +1546,182 @@ func (o *DcimInterfacesListParams) SetRegionIDn(regionIDn *string) { o.RegionIDn = regionIDn } +// WithRfChannel adds the rfChannel to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannel(rfChannel *string) *DcimInterfacesListParams { + o.SetRfChannel(rfChannel) + return o +} + +// SetRfChannel adds the rfChannel to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannel(rfChannel *string) { + o.RfChannel = rfChannel +} + +// WithRfChanneln adds the rfChanneln to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChanneln(rfChanneln *string) *DcimInterfacesListParams { + o.SetRfChanneln(rfChanneln) + return o +} + +// SetRfChanneln adds the rfChannelN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChanneln(rfChanneln *string) { + o.RfChanneln = rfChanneln +} + +// WithRfChannelFrequency adds the rfChannelFrequency to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelFrequency(rfChannelFrequency *string) *DcimInterfacesListParams { + o.SetRfChannelFrequency(rfChannelFrequency) + return o +} + +// SetRfChannelFrequency adds the rfChannelFrequency to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelFrequency(rfChannelFrequency *string) { + o.RfChannelFrequency = rfChannelFrequency +} + +// WithRfChannelFrequencyGt adds the rfChannelFrequencyGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelFrequencyGt(rfChannelFrequencyGt *string) *DcimInterfacesListParams { + o.SetRfChannelFrequencyGt(rfChannelFrequencyGt) + return o +} + +// SetRfChannelFrequencyGt adds the rfChannelFrequencyGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelFrequencyGt(rfChannelFrequencyGt *string) { + o.RfChannelFrequencyGt = rfChannelFrequencyGt +} + +// WithRfChannelFrequencyGte adds the rfChannelFrequencyGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelFrequencyGte(rfChannelFrequencyGte *string) *DcimInterfacesListParams { + o.SetRfChannelFrequencyGte(rfChannelFrequencyGte) + return o +} + +// SetRfChannelFrequencyGte adds the rfChannelFrequencyGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelFrequencyGte(rfChannelFrequencyGte *string) { + o.RfChannelFrequencyGte = rfChannelFrequencyGte +} + +// WithRfChannelFrequencyLt adds the rfChannelFrequencyLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelFrequencyLt(rfChannelFrequencyLt *string) *DcimInterfacesListParams { + o.SetRfChannelFrequencyLt(rfChannelFrequencyLt) + return o +} + +// SetRfChannelFrequencyLt adds the rfChannelFrequencyLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelFrequencyLt(rfChannelFrequencyLt *string) { + o.RfChannelFrequencyLt = rfChannelFrequencyLt +} + +// WithRfChannelFrequencyLte adds the rfChannelFrequencyLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelFrequencyLte(rfChannelFrequencyLte *string) *DcimInterfacesListParams { + o.SetRfChannelFrequencyLte(rfChannelFrequencyLte) + return o +} + +// SetRfChannelFrequencyLte adds the rfChannelFrequencyLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelFrequencyLte(rfChannelFrequencyLte *string) { + o.RfChannelFrequencyLte = rfChannelFrequencyLte +} + +// WithRfChannelFrequencyn adds the rfChannelFrequencyn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelFrequencyn(rfChannelFrequencyn *string) *DcimInterfacesListParams { + o.SetRfChannelFrequencyn(rfChannelFrequencyn) + return o +} + +// SetRfChannelFrequencyn adds the rfChannelFrequencyN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelFrequencyn(rfChannelFrequencyn *string) { + o.RfChannelFrequencyn = rfChannelFrequencyn +} + +// WithRfChannelWidth adds the rfChannelWidth to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelWidth(rfChannelWidth *string) *DcimInterfacesListParams { + o.SetRfChannelWidth(rfChannelWidth) + return o +} + +// SetRfChannelWidth adds the rfChannelWidth to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelWidth(rfChannelWidth *string) { + o.RfChannelWidth = rfChannelWidth +} + +// WithRfChannelWidthGt adds the rfChannelWidthGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelWidthGt(rfChannelWidthGt *string) *DcimInterfacesListParams { + o.SetRfChannelWidthGt(rfChannelWidthGt) + return o +} + +// SetRfChannelWidthGt adds the rfChannelWidthGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelWidthGt(rfChannelWidthGt *string) { + o.RfChannelWidthGt = rfChannelWidthGt +} + +// WithRfChannelWidthGte adds the rfChannelWidthGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelWidthGte(rfChannelWidthGte *string) *DcimInterfacesListParams { + o.SetRfChannelWidthGte(rfChannelWidthGte) + return o +} + +// SetRfChannelWidthGte adds the rfChannelWidthGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelWidthGte(rfChannelWidthGte *string) { + o.RfChannelWidthGte = rfChannelWidthGte +} + +// WithRfChannelWidthLt adds the rfChannelWidthLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelWidthLt(rfChannelWidthLt *string) *DcimInterfacesListParams { + o.SetRfChannelWidthLt(rfChannelWidthLt) + return o +} + +// SetRfChannelWidthLt adds the rfChannelWidthLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelWidthLt(rfChannelWidthLt *string) { + o.RfChannelWidthLt = rfChannelWidthLt +} + +// WithRfChannelWidthLte adds the rfChannelWidthLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelWidthLte(rfChannelWidthLte *string) *DcimInterfacesListParams { + o.SetRfChannelWidthLte(rfChannelWidthLte) + return o +} + +// SetRfChannelWidthLte adds the rfChannelWidthLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelWidthLte(rfChannelWidthLte *string) { + o.RfChannelWidthLte = rfChannelWidthLte +} + +// WithRfChannelWidthn adds the rfChannelWidthn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfChannelWidthn(rfChannelWidthn *string) *DcimInterfacesListParams { + o.SetRfChannelWidthn(rfChannelWidthn) + return o +} + +// SetRfChannelWidthn adds the rfChannelWidthN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfChannelWidthn(rfChannelWidthn *string) { + o.RfChannelWidthn = rfChannelWidthn +} + +// WithRfRole adds the rfRole to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfRole(rfRole *string) *DcimInterfacesListParams { + o.SetRfRole(rfRole) + return o +} + +// SetRfRole adds the rfRole to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfRole(rfRole *string) { + o.RfRole = rfRole +} + +// WithRfRolen adds the rfRolen to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithRfRolen(rfRolen *string) *DcimInterfacesListParams { + o.SetRfRolen(rfRolen) + return o +} + +// SetRfRolen adds the rfRoleN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetRfRolen(rfRolen *string) { + o.RfRolen = rfRolen +} + // WithSite adds the site to the dcim interfaces list params func (o *DcimInterfacesListParams) WithSite(site *string) *DcimInterfacesListParams { o.SetSite(site) @@ -1454,6 +1810,72 @@ func (o *DcimInterfacesListParams) SetSiteIDn(siteIDn *string) { o.SiteIDn = siteIDn } +// WithSpeed adds the speed to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSpeed(speed *string) *DcimInterfacesListParams { + o.SetSpeed(speed) + return o +} + +// SetSpeed adds the speed to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSpeed(speed *string) { + o.Speed = speed +} + +// WithSpeedGt adds the speedGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSpeedGt(speedGt *string) *DcimInterfacesListParams { + o.SetSpeedGt(speedGt) + return o +} + +// SetSpeedGt adds the speedGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSpeedGt(speedGt *string) { + o.SpeedGt = speedGt +} + +// WithSpeedGte adds the speedGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSpeedGte(speedGte *string) *DcimInterfacesListParams { + o.SetSpeedGte(speedGte) + return o +} + +// SetSpeedGte adds the speedGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSpeedGte(speedGte *string) { + o.SpeedGte = speedGte +} + +// WithSpeedLt adds the speedLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSpeedLt(speedLt *string) *DcimInterfacesListParams { + o.SetSpeedLt(speedLt) + return o +} + +// SetSpeedLt adds the speedLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSpeedLt(speedLt *string) { + o.SpeedLt = speedLt +} + +// WithSpeedLte adds the speedLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSpeedLte(speedLte *string) *DcimInterfacesListParams { + o.SetSpeedLte(speedLte) + return o +} + +// SetSpeedLte adds the speedLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSpeedLte(speedLte *string) { + o.SpeedLte = speedLte +} + +// WithSpeedn adds the speedn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithSpeedn(speedn *string) *DcimInterfacesListParams { + o.SetSpeedn(speedn) + return o +} + +// SetSpeedn adds the speedN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetSpeedn(speedn *string) { + o.Speedn = speedn +} + // WithTag adds the tag to the dcim interfaces list params func (o *DcimInterfacesListParams) WithTag(tag *string) *DcimInterfacesListParams { o.SetTag(tag) @@ -1476,6 +1898,72 @@ func (o *DcimInterfacesListParams) SetTagn(tagn *string) { o.Tagn = tagn } +// WithTxPower adds the txPower to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithTxPower(txPower *string) *DcimInterfacesListParams { + o.SetTxPower(txPower) + return o +} + +// SetTxPower adds the txPower to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetTxPower(txPower *string) { + o.TxPower = txPower +} + +// WithTxPowerGt adds the txPowerGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithTxPowerGt(txPowerGt *string) *DcimInterfacesListParams { + o.SetTxPowerGt(txPowerGt) + return o +} + +// SetTxPowerGt adds the txPowerGt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetTxPowerGt(txPowerGt *string) { + o.TxPowerGt = txPowerGt +} + +// WithTxPowerGte adds the txPowerGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithTxPowerGte(txPowerGte *string) *DcimInterfacesListParams { + o.SetTxPowerGte(txPowerGte) + return o +} + +// SetTxPowerGte adds the txPowerGte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetTxPowerGte(txPowerGte *string) { + o.TxPowerGte = txPowerGte +} + +// WithTxPowerLt adds the txPowerLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithTxPowerLt(txPowerLt *string) *DcimInterfacesListParams { + o.SetTxPowerLt(txPowerLt) + return o +} + +// SetTxPowerLt adds the txPowerLt to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetTxPowerLt(txPowerLt *string) { + o.TxPowerLt = txPowerLt +} + +// WithTxPowerLte adds the txPowerLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithTxPowerLte(txPowerLte *string) *DcimInterfacesListParams { + o.SetTxPowerLte(txPowerLte) + return o +} + +// SetTxPowerLte adds the txPowerLte to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetTxPowerLte(txPowerLte *string) { + o.TxPowerLte = txPowerLte +} + +// WithTxPowern adds the txPowern to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithTxPowern(txPowern *string) *DcimInterfacesListParams { + o.SetTxPowern(txPowern) + return o +} + +// SetTxPowern adds the txPowerN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetTxPowern(txPowern *string) { + o.TxPowern = txPowern +} + // WithType adds the typeVar to the dcim interfaces list params func (o *DcimInterfacesListParams) WithType(typeVar *string) *DcimInterfacesListParams { o.SetType(typeVar) @@ -1498,36 +1986,268 @@ func (o *DcimInterfacesListParams) SetTypen(typen *string) { o.Typen = typen } -// WithVlan adds the vlan to the dcim interfaces list params -func (o *DcimInterfacesListParams) WithVlan(vlan *string) *DcimInterfacesListParams { - o.SetVlan(vlan) +// WithVirtualChassis adds the virtualChassis to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVirtualChassis(virtualChassis *string) *DcimInterfacesListParams { + o.SetVirtualChassis(virtualChassis) return o } -// SetVlan adds the vlan to the dcim interfaces list params -func (o *DcimInterfacesListParams) SetVlan(vlan *string) { - o.Vlan = vlan +// SetVirtualChassis adds the virtualChassis to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis } -// WithVlanID adds the vlanID to the dcim interfaces list params -func (o *DcimInterfacesListParams) WithVlanID(vlanID *string) *DcimInterfacesListParams { - o.SetVlanID(vlanID) +// WithVirtualChassisn adds the virtualChassisn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVirtualChassisn(virtualChassisn *string) *DcimInterfacesListParams { + o.SetVirtualChassisn(virtualChassisn) return o } -// SetVlanID adds the vlanId to the dcim interfaces list params -func (o *DcimInterfacesListParams) SetVlanID(vlanID *string) { - o.VlanID = vlanID +// SetVirtualChassisn adds the virtualChassisN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn } -// WriteToRequest writes these params to a swagger request -func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +// WithVirtualChassisID adds the virtualChassisID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVirtualChassisID(virtualChassisID *string) *DcimInterfacesListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimInterfacesListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + +// WithVlan adds the vlan to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVlan(vlan *string) *DcimInterfacesListParams { + o.SetVlan(vlan) + return o +} + +// SetVlan adds the vlan to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVlan(vlan *string) { + o.Vlan = vlan +} + +// WithVlanID adds the vlanID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVlanID(vlanID *string) *DcimInterfacesListParams { + o.SetVlanID(vlanID) + return o +} + +// SetVlanID adds the vlanId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVlanID(vlanID *string) { + o.VlanID = vlanID +} + +// WithVrf adds the vrf to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVrf(vrf *string) *DcimInterfacesListParams { + o.SetVrf(vrf) + return o +} + +// SetVrf adds the vrf to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVrf(vrf *string) { + o.Vrf = vrf +} + +// WithVrfn adds the vrfn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVrfn(vrfn *string) *DcimInterfacesListParams { + o.SetVrfn(vrfn) + return o +} + +// SetVrfn adds the vrfN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVrfn(vrfn *string) { + o.Vrfn = vrfn +} + +// WithVrfID adds the vrfID to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVrfID(vrfID *string) *DcimInterfacesListParams { + o.SetVrfID(vrfID) + return o +} + +// SetVrfID adds the vrfId to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVrfID(vrfID *string) { + o.VrfID = vrfID +} + +// WithVrfIDn adds the vrfIDn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithVrfIDn(vrfIDn *string) *DcimInterfacesListParams { + o.SetVrfIDn(vrfIDn) + return o +} + +// SetVrfIDn adds the vrfIdN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetVrfIDn(vrfIDn *string) { + o.VrfIDn = vrfIDn +} + +// WithWwn adds the wwn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwn(wwn *string) *DcimInterfacesListParams { + o.SetWwn(wwn) + return o +} + +// SetWwn adds the wwn to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwn(wwn *string) { + o.Wwn = wwn +} + +// WithWwnIc adds the wwnIc to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnIc(wwnIc *string) *DcimInterfacesListParams { + o.SetWwnIc(wwnIc) + return o +} + +// SetWwnIc adds the wwnIc to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnIc(wwnIc *string) { + o.WwnIc = wwnIc +} + +// WithWwnIe adds the wwnIe to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnIe(wwnIe *string) *DcimInterfacesListParams { + o.SetWwnIe(wwnIe) + return o +} + +// SetWwnIe adds the wwnIe to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnIe(wwnIe *string) { + o.WwnIe = wwnIe +} + +// WithWwnIew adds the wwnIew to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnIew(wwnIew *string) *DcimInterfacesListParams { + o.SetWwnIew(wwnIew) + return o +} + +// SetWwnIew adds the wwnIew to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnIew(wwnIew *string) { + o.WwnIew = wwnIew +} + +// WithWwnIsw adds the wwnIsw to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnIsw(wwnIsw *string) *DcimInterfacesListParams { + o.SetWwnIsw(wwnIsw) + return o +} + +// SetWwnIsw adds the wwnIsw to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnIsw(wwnIsw *string) { + o.WwnIsw = wwnIsw +} + +// WithWwnn adds the wwnn to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnn(wwnn *string) *DcimInterfacesListParams { + o.SetWwnn(wwnn) + return o +} + +// SetWwnn adds the wwnN to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnn(wwnn *string) { + o.Wwnn = wwnn +} + +// WithWwnNic adds the wwnNic to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnNic(wwnNic *string) *DcimInterfacesListParams { + o.SetWwnNic(wwnNic) + return o +} + +// SetWwnNic adds the wwnNic to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnNic(wwnNic *string) { + o.WwnNic = wwnNic +} + +// WithWwnNie adds the wwnNie to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnNie(wwnNie *string) *DcimInterfacesListParams { + o.SetWwnNie(wwnNie) + return o +} + +// SetWwnNie adds the wwnNie to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnNie(wwnNie *string) { + o.WwnNie = wwnNie +} + +// WithWwnNiew adds the wwnNiew to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnNiew(wwnNiew *string) *DcimInterfacesListParams { + o.SetWwnNiew(wwnNiew) + return o +} + +// SetWwnNiew adds the wwnNiew to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnNiew(wwnNiew *string) { + o.WwnNiew = wwnNiew +} + +// WithWwnNisw adds the wwnNisw to the dcim interfaces list params +func (o *DcimInterfacesListParams) WithWwnNisw(wwnNisw *string) *DcimInterfacesListParams { + o.SetWwnNisw(wwnNisw) + return o +} + +// SetWwnNisw adds the wwnNisw to the dcim interfaces list params +func (o *DcimInterfacesListParams) SetWwnNisw(wwnNisw *string) { + o.WwnNisw = wwnNisw +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error + if o.BridgeID != nil { + + // query param bridge_id + var qrBridgeID string + + if o.BridgeID != nil { + qrBridgeID = *o.BridgeID + } + qBridgeID := qrBridgeID + if qBridgeID != "" { + + if err := r.SetQueryParam("bridge_id", qBridgeID); err != nil { + return err + } + } + } + + if o.BridgeIDn != nil { + + // query param bridge_id__n + var qrBridgeIDn string + + if o.BridgeIDn != nil { + qrBridgeIDn = *o.BridgeIDn + } + qBridgeIDn := qrBridgeIDn + if qBridgeIDn != "" { + + if err := r.SetQueryParam("bridge_id__n", qBridgeIDn); err != nil { + return err + } + } + } + if o.Cabled != nil { // query param cabled @@ -1630,23 +2350,6 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1834,6 +2537,40 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Duplex != nil { + + // query param duplex + var qrDuplex string + + if o.Duplex != nil { + qrDuplex = *o.Duplex + } + qDuplex := qrDuplex + if qDuplex != "" { + + if err := r.SetQueryParam("duplex", qDuplex); err != nil { + return err + } + } + } + + if o.Duplexn != nil { + + // query param duplex__n + var qrDuplexn string + + if o.Duplexn != nil { + qrDuplexn = *o.Duplexn + } + qDuplexn := qrDuplexn + if qDuplexn != "" { + + if err := r.SetQueryParam("duplex__n", qDuplexn); err != nil { + return err + } + } + } + if o.Enabled != nil { // query param enabled @@ -1987,23 +2724,6 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -2548,6 +3268,40 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.ModuleID != nil { + + // query param module_id + var qrModuleID string + + if o.ModuleID != nil { + qrModuleID = *o.ModuleID + } + qModuleID := qrModuleID + if qModuleID != "" { + + if err := r.SetQueryParam("module_id", qModuleID); err != nil { + return err + } + } + } + + if o.ModuleIDn != nil { + + // query param module_id__n + var qrModuleIDn string + + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn + } + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { + + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { + return err + } + } + } + if o.Mtu != nil { // query param mtu @@ -2667,23 +3421,6 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -2973,160 +3710,534 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.Site != nil { + if o.RfChannel != nil { - // query param site - var qrSite string + // query param rf_channel + var qrRfChannel string - if o.Site != nil { - qrSite = *o.Site + if o.RfChannel != nil { + qrRfChannel = *o.RfChannel } - qSite := qrSite - if qSite != "" { + qRfChannel := qrRfChannel + if qRfChannel != "" { - if err := r.SetQueryParam("site", qSite); err != nil { + if err := r.SetQueryParam("rf_channel", qRfChannel); err != nil { return err } } } - if o.Siten != nil { + if o.RfChanneln != nil { - // query param site__n - var qrSiten string + // query param rf_channel__n + var qrRfChanneln string - if o.Siten != nil { - qrSiten = *o.Siten + if o.RfChanneln != nil { + qrRfChanneln = *o.RfChanneln } - qSiten := qrSiten - if qSiten != "" { + qRfChanneln := qrRfChanneln + if qRfChanneln != "" { - if err := r.SetQueryParam("site__n", qSiten); err != nil { + if err := r.SetQueryParam("rf_channel__n", qRfChanneln); err != nil { return err } } } - if o.SiteGroup != nil { + if o.RfChannelFrequency != nil { - // query param site_group - var qrSiteGroup string + // query param rf_channel_frequency + var qrRfChannelFrequency string - if o.SiteGroup != nil { - qrSiteGroup = *o.SiteGroup + if o.RfChannelFrequency != nil { + qrRfChannelFrequency = *o.RfChannelFrequency } - qSiteGroup := qrSiteGroup - if qSiteGroup != "" { + qRfChannelFrequency := qrRfChannelFrequency + if qRfChannelFrequency != "" { - if err := r.SetQueryParam("site_group", qSiteGroup); err != nil { + if err := r.SetQueryParam("rf_channel_frequency", qRfChannelFrequency); err != nil { return err } } } - if o.SiteGroupn != nil { + if o.RfChannelFrequencyGt != nil { - // query param site_group__n - var qrSiteGroupn string + // query param rf_channel_frequency__gt + var qrRfChannelFrequencyGt string - if o.SiteGroupn != nil { - qrSiteGroupn = *o.SiteGroupn + if o.RfChannelFrequencyGt != nil { + qrRfChannelFrequencyGt = *o.RfChannelFrequencyGt } - qSiteGroupn := qrSiteGroupn - if qSiteGroupn != "" { + qRfChannelFrequencyGt := qrRfChannelFrequencyGt + if qRfChannelFrequencyGt != "" { - if err := r.SetQueryParam("site_group__n", qSiteGroupn); err != nil { + if err := r.SetQueryParam("rf_channel_frequency__gt", qRfChannelFrequencyGt); err != nil { return err } } } - if o.SiteGroupID != nil { + if o.RfChannelFrequencyGte != nil { - // query param site_group_id - var qrSiteGroupID string + // query param rf_channel_frequency__gte + var qrRfChannelFrequencyGte string - if o.SiteGroupID != nil { - qrSiteGroupID = *o.SiteGroupID + if o.RfChannelFrequencyGte != nil { + qrRfChannelFrequencyGte = *o.RfChannelFrequencyGte } - qSiteGroupID := qrSiteGroupID - if qSiteGroupID != "" { + qRfChannelFrequencyGte := qrRfChannelFrequencyGte + if qRfChannelFrequencyGte != "" { - if err := r.SetQueryParam("site_group_id", qSiteGroupID); err != nil { + if err := r.SetQueryParam("rf_channel_frequency__gte", qRfChannelFrequencyGte); err != nil { return err } } } - if o.SiteGroupIDn != nil { + if o.RfChannelFrequencyLt != nil { - // query param site_group_id__n - var qrSiteGroupIDn string + // query param rf_channel_frequency__lt + var qrRfChannelFrequencyLt string - if o.SiteGroupIDn != nil { - qrSiteGroupIDn = *o.SiteGroupIDn + if o.RfChannelFrequencyLt != nil { + qrRfChannelFrequencyLt = *o.RfChannelFrequencyLt } - qSiteGroupIDn := qrSiteGroupIDn - if qSiteGroupIDn != "" { + qRfChannelFrequencyLt := qrRfChannelFrequencyLt + if qRfChannelFrequencyLt != "" { - if err := r.SetQueryParam("site_group_id__n", qSiteGroupIDn); err != nil { + if err := r.SetQueryParam("rf_channel_frequency__lt", qRfChannelFrequencyLt); err != nil { return err } } } - if o.SiteID != nil { + if o.RfChannelFrequencyLte != nil { - // query param site_id - var qrSiteID string + // query param rf_channel_frequency__lte + var qrRfChannelFrequencyLte string - if o.SiteID != nil { - qrSiteID = *o.SiteID + if o.RfChannelFrequencyLte != nil { + qrRfChannelFrequencyLte = *o.RfChannelFrequencyLte } - qSiteID := qrSiteID - if qSiteID != "" { + qRfChannelFrequencyLte := qrRfChannelFrequencyLte + if qRfChannelFrequencyLte != "" { - if err := r.SetQueryParam("site_id", qSiteID); err != nil { + if err := r.SetQueryParam("rf_channel_frequency__lte", qRfChannelFrequencyLte); err != nil { return err } } } - if o.SiteIDn != nil { + if o.RfChannelFrequencyn != nil { - // query param site_id__n - var qrSiteIDn string + // query param rf_channel_frequency__n + var qrRfChannelFrequencyn string - if o.SiteIDn != nil { - qrSiteIDn = *o.SiteIDn + if o.RfChannelFrequencyn != nil { + qrRfChannelFrequencyn = *o.RfChannelFrequencyn } - qSiteIDn := qrSiteIDn - if qSiteIDn != "" { + qRfChannelFrequencyn := qrRfChannelFrequencyn + if qRfChannelFrequencyn != "" { - if err := r.SetQueryParam("site_id__n", qSiteIDn); err != nil { + if err := r.SetQueryParam("rf_channel_frequency__n", qRfChannelFrequencyn); err != nil { return err } } } - if o.Tag != nil { + if o.RfChannelWidth != nil { - // query param tag - var qrTag string + // query param rf_channel_width + var qrRfChannelWidth string - if o.Tag != nil { - qrTag = *o.Tag + if o.RfChannelWidth != nil { + qrRfChannelWidth = *o.RfChannelWidth } - qTag := qrTag - if qTag != "" { + qRfChannelWidth := qrRfChannelWidth + if qRfChannelWidth != "" { - if err := r.SetQueryParam("tag", qTag); err != nil { + if err := r.SetQueryParam("rf_channel_width", qRfChannelWidth); err != nil { return err } } } - if o.Tagn != nil { + if o.RfChannelWidthGt != nil { + + // query param rf_channel_width__gt + var qrRfChannelWidthGt string + + if o.RfChannelWidthGt != nil { + qrRfChannelWidthGt = *o.RfChannelWidthGt + } + qRfChannelWidthGt := qrRfChannelWidthGt + if qRfChannelWidthGt != "" { + + if err := r.SetQueryParam("rf_channel_width__gt", qRfChannelWidthGt); err != nil { + return err + } + } + } + + if o.RfChannelWidthGte != nil { + + // query param rf_channel_width__gte + var qrRfChannelWidthGte string + + if o.RfChannelWidthGte != nil { + qrRfChannelWidthGte = *o.RfChannelWidthGte + } + qRfChannelWidthGte := qrRfChannelWidthGte + if qRfChannelWidthGte != "" { + + if err := r.SetQueryParam("rf_channel_width__gte", qRfChannelWidthGte); err != nil { + return err + } + } + } + + if o.RfChannelWidthLt != nil { + + // query param rf_channel_width__lt + var qrRfChannelWidthLt string + + if o.RfChannelWidthLt != nil { + qrRfChannelWidthLt = *o.RfChannelWidthLt + } + qRfChannelWidthLt := qrRfChannelWidthLt + if qRfChannelWidthLt != "" { + + if err := r.SetQueryParam("rf_channel_width__lt", qRfChannelWidthLt); err != nil { + return err + } + } + } + + if o.RfChannelWidthLte != nil { + + // query param rf_channel_width__lte + var qrRfChannelWidthLte string + + if o.RfChannelWidthLte != nil { + qrRfChannelWidthLte = *o.RfChannelWidthLte + } + qRfChannelWidthLte := qrRfChannelWidthLte + if qRfChannelWidthLte != "" { + + if err := r.SetQueryParam("rf_channel_width__lte", qRfChannelWidthLte); err != nil { + return err + } + } + } + + if o.RfChannelWidthn != nil { + + // query param rf_channel_width__n + var qrRfChannelWidthn string + + if o.RfChannelWidthn != nil { + qrRfChannelWidthn = *o.RfChannelWidthn + } + qRfChannelWidthn := qrRfChannelWidthn + if qRfChannelWidthn != "" { + + if err := r.SetQueryParam("rf_channel_width__n", qRfChannelWidthn); err != nil { + return err + } + } + } + + if o.RfRole != nil { + + // query param rf_role + var qrRfRole string + + if o.RfRole != nil { + qrRfRole = *o.RfRole + } + qRfRole := qrRfRole + if qRfRole != "" { + + if err := r.SetQueryParam("rf_role", qRfRole); err != nil { + return err + } + } + } + + if o.RfRolen != nil { + + // query param rf_role__n + var qrRfRolen string + + if o.RfRolen != nil { + qrRfRolen = *o.RfRolen + } + qRfRolen := qrRfRolen + if qRfRolen != "" { + + if err := r.SetQueryParam("rf_role__n", qRfRolen); err != nil { + return err + } + } + } + + if o.Site != nil { + + // query param site + var qrSite string + + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + } + + if o.Siten != nil { + + // query param site__n + var qrSiten string + + if o.Siten != nil { + qrSiten = *o.Siten + } + qSiten := qrSiten + if qSiten != "" { + + if err := r.SetQueryParam("site__n", qSiten); err != nil { + return err + } + } + } + + if o.SiteGroup != nil { + + // query param site_group + var qrSiteGroup string + + if o.SiteGroup != nil { + qrSiteGroup = *o.SiteGroup + } + qSiteGroup := qrSiteGroup + if qSiteGroup != "" { + + if err := r.SetQueryParam("site_group", qSiteGroup); err != nil { + return err + } + } + } + + if o.SiteGroupn != nil { + + // query param site_group__n + var qrSiteGroupn string + + if o.SiteGroupn != nil { + qrSiteGroupn = *o.SiteGroupn + } + qSiteGroupn := qrSiteGroupn + if qSiteGroupn != "" { + + if err := r.SetQueryParam("site_group__n", qSiteGroupn); err != nil { + return err + } + } + } + + if o.SiteGroupID != nil { + + // query param site_group_id + var qrSiteGroupID string + + if o.SiteGroupID != nil { + qrSiteGroupID = *o.SiteGroupID + } + qSiteGroupID := qrSiteGroupID + if qSiteGroupID != "" { + + if err := r.SetQueryParam("site_group_id", qSiteGroupID); err != nil { + return err + } + } + } + + if o.SiteGroupIDn != nil { + + // query param site_group_id__n + var qrSiteGroupIDn string + + if o.SiteGroupIDn != nil { + qrSiteGroupIDn = *o.SiteGroupIDn + } + qSiteGroupIDn := qrSiteGroupIDn + if qSiteGroupIDn != "" { + + if err := r.SetQueryParam("site_group_id__n", qSiteGroupIDn); err != nil { + return err + } + } + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + } + + if o.SiteIDn != nil { + + // query param site_id__n + var qrSiteIDn string + + if o.SiteIDn != nil { + qrSiteIDn = *o.SiteIDn + } + qSiteIDn := qrSiteIDn + if qSiteIDn != "" { + + if err := r.SetQueryParam("site_id__n", qSiteIDn); err != nil { + return err + } + } + } + + if o.Speed != nil { + + // query param speed + var qrSpeed string + + if o.Speed != nil { + qrSpeed = *o.Speed + } + qSpeed := qrSpeed + if qSpeed != "" { + + if err := r.SetQueryParam("speed", qSpeed); err != nil { + return err + } + } + } + + if o.SpeedGt != nil { + + // query param speed__gt + var qrSpeedGt string + + if o.SpeedGt != nil { + qrSpeedGt = *o.SpeedGt + } + qSpeedGt := qrSpeedGt + if qSpeedGt != "" { + + if err := r.SetQueryParam("speed__gt", qSpeedGt); err != nil { + return err + } + } + } + + if o.SpeedGte != nil { + + // query param speed__gte + var qrSpeedGte string + + if o.SpeedGte != nil { + qrSpeedGte = *o.SpeedGte + } + qSpeedGte := qrSpeedGte + if qSpeedGte != "" { + + if err := r.SetQueryParam("speed__gte", qSpeedGte); err != nil { + return err + } + } + } + + if o.SpeedLt != nil { + + // query param speed__lt + var qrSpeedLt string + + if o.SpeedLt != nil { + qrSpeedLt = *o.SpeedLt + } + qSpeedLt := qrSpeedLt + if qSpeedLt != "" { + + if err := r.SetQueryParam("speed__lt", qSpeedLt); err != nil { + return err + } + } + } + + if o.SpeedLte != nil { + + // query param speed__lte + var qrSpeedLte string + + if o.SpeedLte != nil { + qrSpeedLte = *o.SpeedLte + } + qSpeedLte := qrSpeedLte + if qSpeedLte != "" { + + if err := r.SetQueryParam("speed__lte", qSpeedLte); err != nil { + return err + } + } + } + + if o.Speedn != nil { + + // query param speed__n + var qrSpeedn string + + if o.Speedn != nil { + qrSpeedn = *o.Speedn + } + qSpeedn := qrSpeedn + if qSpeedn != "" { + + if err := r.SetQueryParam("speed__n", qSpeedn); err != nil { + return err + } + } + } + + 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 @@ -3143,6 +4254,108 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.TxPower != nil { + + // query param tx_power + var qrTxPower string + + if o.TxPower != nil { + qrTxPower = *o.TxPower + } + qTxPower := qrTxPower + if qTxPower != "" { + + if err := r.SetQueryParam("tx_power", qTxPower); err != nil { + return err + } + } + } + + if o.TxPowerGt != nil { + + // query param tx_power__gt + var qrTxPowerGt string + + if o.TxPowerGt != nil { + qrTxPowerGt = *o.TxPowerGt + } + qTxPowerGt := qrTxPowerGt + if qTxPowerGt != "" { + + if err := r.SetQueryParam("tx_power__gt", qTxPowerGt); err != nil { + return err + } + } + } + + if o.TxPowerGte != nil { + + // query param tx_power__gte + var qrTxPowerGte string + + if o.TxPowerGte != nil { + qrTxPowerGte = *o.TxPowerGte + } + qTxPowerGte := qrTxPowerGte + if qTxPowerGte != "" { + + if err := r.SetQueryParam("tx_power__gte", qTxPowerGte); err != nil { + return err + } + } + } + + if o.TxPowerLt != nil { + + // query param tx_power__lt + var qrTxPowerLt string + + if o.TxPowerLt != nil { + qrTxPowerLt = *o.TxPowerLt + } + qTxPowerLt := qrTxPowerLt + if qTxPowerLt != "" { + + if err := r.SetQueryParam("tx_power__lt", qTxPowerLt); err != nil { + return err + } + } + } + + if o.TxPowerLte != nil { + + // query param tx_power__lte + var qrTxPowerLte string + + if o.TxPowerLte != nil { + qrTxPowerLte = *o.TxPowerLte + } + qTxPowerLte := qrTxPowerLte + if qTxPowerLte != "" { + + if err := r.SetQueryParam("tx_power__lte", qTxPowerLte); err != nil { + return err + } + } + } + + if o.TxPowern != nil { + + // query param tx_power__n + var qrTxPowern string + + if o.TxPowern != nil { + qrTxPowern = *o.TxPowern + } + qTxPowern := qrTxPowern + if qTxPowern != "" { + + if err := r.SetQueryParam("tx_power__n", qTxPowern); err != nil { + return err + } + } + } + if o.Type != nil { // query param type @@ -3177,6 +4390,74 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if o.Vlan != nil { // query param vlan @@ -3211,6 +4492,244 @@ func (o *DcimInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Vrf != nil { + + // query param vrf + var qrVrf string + + if o.Vrf != nil { + qrVrf = *o.Vrf + } + qVrf := qrVrf + if qVrf != "" { + + if err := r.SetQueryParam("vrf", qVrf); err != nil { + return err + } + } + } + + if o.Vrfn != nil { + + // query param vrf__n + var qrVrfn string + + if o.Vrfn != nil { + qrVrfn = *o.Vrfn + } + qVrfn := qrVrfn + if qVrfn != "" { + + if err := r.SetQueryParam("vrf__n", qVrfn); err != nil { + return err + } + } + } + + if o.VrfID != nil { + + // query param vrf_id + var qrVrfID string + + if o.VrfID != nil { + qrVrfID = *o.VrfID + } + qVrfID := qrVrfID + if qVrfID != "" { + + if err := r.SetQueryParam("vrf_id", qVrfID); err != nil { + return err + } + } + } + + if o.VrfIDn != nil { + + // query param vrf_id__n + var qrVrfIDn string + + if o.VrfIDn != nil { + qrVrfIDn = *o.VrfIDn + } + qVrfIDn := qrVrfIDn + if qVrfIDn != "" { + + if err := r.SetQueryParam("vrf_id__n", qVrfIDn); err != nil { + return err + } + } + } + + if o.Wwn != nil { + + // query param wwn + var qrWwn string + + if o.Wwn != nil { + qrWwn = *o.Wwn + } + qWwn := qrWwn + if qWwn != "" { + + if err := r.SetQueryParam("wwn", qWwn); err != nil { + return err + } + } + } + + if o.WwnIc != nil { + + // query param wwn__ic + var qrWwnIc string + + if o.WwnIc != nil { + qrWwnIc = *o.WwnIc + } + qWwnIc := qrWwnIc + if qWwnIc != "" { + + if err := r.SetQueryParam("wwn__ic", qWwnIc); err != nil { + return err + } + } + } + + if o.WwnIe != nil { + + // query param wwn__ie + var qrWwnIe string + + if o.WwnIe != nil { + qrWwnIe = *o.WwnIe + } + qWwnIe := qrWwnIe + if qWwnIe != "" { + + if err := r.SetQueryParam("wwn__ie", qWwnIe); err != nil { + return err + } + } + } + + if o.WwnIew != nil { + + // query param wwn__iew + var qrWwnIew string + + if o.WwnIew != nil { + qrWwnIew = *o.WwnIew + } + qWwnIew := qrWwnIew + if qWwnIew != "" { + + if err := r.SetQueryParam("wwn__iew", qWwnIew); err != nil { + return err + } + } + } + + if o.WwnIsw != nil { + + // query param wwn__isw + var qrWwnIsw string + + if o.WwnIsw != nil { + qrWwnIsw = *o.WwnIsw + } + qWwnIsw := qrWwnIsw + if qWwnIsw != "" { + + if err := r.SetQueryParam("wwn__isw", qWwnIsw); err != nil { + return err + } + } + } + + if o.Wwnn != nil { + + // query param wwn__n + var qrWwnn string + + if o.Wwnn != nil { + qrWwnn = *o.Wwnn + } + qWwnn := qrWwnn + if qWwnn != "" { + + if err := r.SetQueryParam("wwn__n", qWwnn); err != nil { + return err + } + } + } + + if o.WwnNic != nil { + + // query param wwn__nic + var qrWwnNic string + + if o.WwnNic != nil { + qrWwnNic = *o.WwnNic + } + qWwnNic := qrWwnNic + if qWwnNic != "" { + + if err := r.SetQueryParam("wwn__nic", qWwnNic); err != nil { + return err + } + } + } + + if o.WwnNie != nil { + + // query param wwn__nie + var qrWwnNie string + + if o.WwnNie != nil { + qrWwnNie = *o.WwnNie + } + qWwnNie := qrWwnNie + if qWwnNie != "" { + + if err := r.SetQueryParam("wwn__nie", qWwnNie); err != nil { + return err + } + } + } + + if o.WwnNiew != nil { + + // query param wwn__niew + var qrWwnNiew string + + if o.WwnNiew != nil { + qrWwnNiew = *o.WwnNiew + } + qWwnNiew := qrWwnNiew + if qWwnNiew != "" { + + if err := r.SetQueryParam("wwn__niew", qWwnNiew); err != nil { + return err + } + } + } + + if o.WwnNisw != nil { + + // query param wwn__nisw + var qrWwnNisw string + + if o.WwnNisw != nil { + qrWwnNisw = *o.WwnNisw + } + qWwnNisw := qrWwnNisw + if qWwnNisw != "" { + + if err := r.SetQueryParam("wwn__nisw", qWwnNisw); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_interfaces_list_responses.go b/netbox/client/dcim/dcim_interfaces_list_responses.go index d65febc8a..f6e7ff775 100644 --- a/netbox/client/dcim/dcim_interfaces_list_responses.go +++ b/netbox/client/dcim/dcim_interfaces_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimInterfacesListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimInterfacesListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_parameters.go new file mode 100644 index 000000000..2bb8ca526 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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" +) + +// NewDcimInventoryItemRolesBulkDeleteParams creates a new DcimInventoryItemRolesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesBulkDeleteParams() *DcimInventoryItemRolesBulkDeleteParams { + return &DcimInventoryItemRolesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesBulkDeleteParamsWithTimeout creates a new DcimInventoryItemRolesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesBulkDeleteParams { + return &DcimInventoryItemRolesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesBulkDeleteParamsWithContext creates a new DcimInventoryItemRolesBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesBulkDeleteParamsWithContext(ctx context.Context) *DcimInventoryItemRolesBulkDeleteParams { + return &DcimInventoryItemRolesBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesBulkDeleteParamsWithHTTPClient creates a new DcimInventoryItemRolesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesBulkDeleteParams { + return &DcimInventoryItemRolesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesBulkDeleteParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesBulkDeleteParams) WithDefaults() *DcimInventoryItemRolesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles bulk delete params +func (o *DcimInventoryItemRolesBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles bulk delete params +func (o *DcimInventoryItemRolesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles bulk delete params +func (o *DcimInventoryItemRolesBulkDeleteParams) WithContext(ctx context.Context) *DcimInventoryItemRolesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles bulk delete params +func (o *DcimInventoryItemRolesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles bulk delete params +func (o *DcimInventoryItemRolesBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles bulk delete params +func (o *DcimInventoryItemRolesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesBulkDeleteParams) 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/netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_responses.go new file mode 100644 index 000000000..25c8de3af --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimInventoryItemRolesBulkDeleteReader is a Reader for the DcimInventoryItemRolesBulkDelete structure. +type DcimInventoryItemRolesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimInventoryItemRolesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesBulkDeleteNoContent creates a DcimInventoryItemRolesBulkDeleteNoContent with default headers values +func NewDcimInventoryItemRolesBulkDeleteNoContent() *DcimInventoryItemRolesBulkDeleteNoContent { + return &DcimInventoryItemRolesBulkDeleteNoContent{} +} + +/* DcimInventoryItemRolesBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimInventoryItemRolesBulkDeleteNoContent dcim inventory item roles bulk delete no content +*/ +type DcimInventoryItemRolesBulkDeleteNoContent struct { +} + +func (o *DcimInventoryItemRolesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/inventory-item-roles/][%d] dcimInventoryItemRolesBulkDeleteNoContent ", 204) +} + +func (o *DcimInventoryItemRolesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_parameters.go new file mode 100644 index 000000000..26255d950 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemRolesBulkPartialUpdateParams creates a new DcimInventoryItemRolesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesBulkPartialUpdateParams() *DcimInventoryItemRolesBulkPartialUpdateParams { + return &DcimInventoryItemRolesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesBulkPartialUpdateParamsWithTimeout creates a new DcimInventoryItemRolesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesBulkPartialUpdateParams { + return &DcimInventoryItemRolesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesBulkPartialUpdateParamsWithContext creates a new DcimInventoryItemRolesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemRolesBulkPartialUpdateParams { + return &DcimInventoryItemRolesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesBulkPartialUpdateParamsWithHTTPClient creates a new DcimInventoryItemRolesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesBulkPartialUpdateParams { + return &DcimInventoryItemRolesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesBulkPartialUpdateParams struct { + + // Data. + Data *models.InventoryItemRole + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) WithDefaults() *DcimInventoryItemRolesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemRolesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) WithData(data *models.InventoryItemRole) *DcimInventoryItemRolesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item roles bulk partial update params +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) SetData(data *models.InventoryItemRole) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_responses.go new file mode 100644 index 000000000..9265a2850 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesBulkPartialUpdateReader is a Reader for the DcimInventoryItemRolesBulkPartialUpdate structure. +type DcimInventoryItemRolesBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemRolesBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesBulkPartialUpdateOK creates a DcimInventoryItemRolesBulkPartialUpdateOK with default headers values +func NewDcimInventoryItemRolesBulkPartialUpdateOK() *DcimInventoryItemRolesBulkPartialUpdateOK { + return &DcimInventoryItemRolesBulkPartialUpdateOK{} +} + +/* DcimInventoryItemRolesBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemRolesBulkPartialUpdateOK dcim inventory item roles bulk partial update o k +*/ +type DcimInventoryItemRolesBulkPartialUpdateOK struct { + Payload *models.InventoryItemRole +} + +func (o *DcimInventoryItemRolesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/inventory-item-roles/][%d] dcimInventoryItemRolesBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemRolesBulkPartialUpdateOK) GetPayload() *models.InventoryItemRole { + return o.Payload +} + +func (o *DcimInventoryItemRolesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_bulk_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_bulk_update_parameters.go new file mode 100644 index 000000000..cf3bc0770 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemRolesBulkUpdateParams creates a new DcimInventoryItemRolesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesBulkUpdateParams() *DcimInventoryItemRolesBulkUpdateParams { + return &DcimInventoryItemRolesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesBulkUpdateParamsWithTimeout creates a new DcimInventoryItemRolesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesBulkUpdateParams { + return &DcimInventoryItemRolesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesBulkUpdateParamsWithContext creates a new DcimInventoryItemRolesBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesBulkUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemRolesBulkUpdateParams { + return &DcimInventoryItemRolesBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesBulkUpdateParamsWithHTTPClient creates a new DcimInventoryItemRolesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesBulkUpdateParams { + return &DcimInventoryItemRolesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesBulkUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesBulkUpdateParams struct { + + // Data. + Data *models.InventoryItemRole + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesBulkUpdateParams) WithDefaults() *DcimInventoryItemRolesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemRolesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) WithData(data *models.InventoryItemRole) *DcimInventoryItemRolesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item roles bulk update params +func (o *DcimInventoryItemRolesBulkUpdateParams) SetData(data *models.InventoryItemRole) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_bulk_update_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_bulk_update_responses.go new file mode 100644 index 000000000..7fb423c21 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesBulkUpdateReader is a Reader for the DcimInventoryItemRolesBulkUpdate structure. +type DcimInventoryItemRolesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemRolesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesBulkUpdateOK creates a DcimInventoryItemRolesBulkUpdateOK with default headers values +func NewDcimInventoryItemRolesBulkUpdateOK() *DcimInventoryItemRolesBulkUpdateOK { + return &DcimInventoryItemRolesBulkUpdateOK{} +} + +/* DcimInventoryItemRolesBulkUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemRolesBulkUpdateOK dcim inventory item roles bulk update o k +*/ +type DcimInventoryItemRolesBulkUpdateOK struct { + Payload *models.InventoryItemRole +} + +func (o *DcimInventoryItemRolesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/inventory-item-roles/][%d] dcimInventoryItemRolesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemRolesBulkUpdateOK) GetPayload() *models.InventoryItemRole { + return o.Payload +} + +func (o *DcimInventoryItemRolesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_create_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_create_parameters.go new file mode 100644 index 000000000..3b481394d --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_create_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemRolesCreateParams creates a new DcimInventoryItemRolesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesCreateParams() *DcimInventoryItemRolesCreateParams { + return &DcimInventoryItemRolesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesCreateParamsWithTimeout creates a new DcimInventoryItemRolesCreateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesCreateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesCreateParams { + return &DcimInventoryItemRolesCreateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesCreateParamsWithContext creates a new DcimInventoryItemRolesCreateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesCreateParamsWithContext(ctx context.Context) *DcimInventoryItemRolesCreateParams { + return &DcimInventoryItemRolesCreateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesCreateParamsWithHTTPClient creates a new DcimInventoryItemRolesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesCreateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesCreateParams { + return &DcimInventoryItemRolesCreateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesCreateParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles create operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesCreateParams struct { + + // Data. + Data *models.InventoryItemRole + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesCreateParams) WithDefaults() *DcimInventoryItemRolesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) WithContext(ctx context.Context) *DcimInventoryItemRolesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) WithData(data *models.InventoryItemRole) *DcimInventoryItemRolesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item roles create params +func (o *DcimInventoryItemRolesCreateParams) SetData(data *models.InventoryItemRole) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_create_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_create_responses.go new file mode 100644 index 000000000..e15702697 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_create_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesCreateReader is a Reader for the DcimInventoryItemRolesCreate structure. +type DcimInventoryItemRolesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimInventoryItemRolesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesCreateCreated creates a DcimInventoryItemRolesCreateCreated with default headers values +func NewDcimInventoryItemRolesCreateCreated() *DcimInventoryItemRolesCreateCreated { + return &DcimInventoryItemRolesCreateCreated{} +} + +/* DcimInventoryItemRolesCreateCreated describes a response with status code 201, with default header values. + +DcimInventoryItemRolesCreateCreated dcim inventory item roles create created +*/ +type DcimInventoryItemRolesCreateCreated struct { + Payload *models.InventoryItemRole +} + +func (o *DcimInventoryItemRolesCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/inventory-item-roles/][%d] dcimInventoryItemRolesCreateCreated %+v", 201, o.Payload) +} +func (o *DcimInventoryItemRolesCreateCreated) GetPayload() *models.InventoryItemRole { + return o.Payload +} + +func (o *DcimInventoryItemRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_delete_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_delete_parameters.go new file mode 100644 index 000000000..4f89f9c31 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_delete_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimInventoryItemRolesDeleteParams creates a new DcimInventoryItemRolesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesDeleteParams() *DcimInventoryItemRolesDeleteParams { + return &DcimInventoryItemRolesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesDeleteParamsWithTimeout creates a new DcimInventoryItemRolesDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesDeleteParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesDeleteParams { + return &DcimInventoryItemRolesDeleteParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesDeleteParamsWithContext creates a new DcimInventoryItemRolesDeleteParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesDeleteParamsWithContext(ctx context.Context) *DcimInventoryItemRolesDeleteParams { + return &DcimInventoryItemRolesDeleteParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesDeleteParamsWithHTTPClient creates a new DcimInventoryItemRolesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesDeleteParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesDeleteParams { + return &DcimInventoryItemRolesDeleteParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesDeleteParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles delete operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesDeleteParams struct { + + /* ID. + + A unique integer value identifying this inventory item role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesDeleteParams) WithDefaults() *DcimInventoryItemRolesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) WithContext(ctx context.Context) *DcimInventoryItemRolesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) WithID(id int64) *DcimInventoryItemRolesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item roles delete params +func (o *DcimInventoryItemRolesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesDeleteParams) 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/netbox/client/dcim/dcim_inventory_item_roles_delete_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_delete_responses.go new file mode 100644 index 000000000..321794e99 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimInventoryItemRolesDeleteReader is a Reader for the DcimInventoryItemRolesDelete structure. +type DcimInventoryItemRolesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimInventoryItemRolesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesDeleteNoContent creates a DcimInventoryItemRolesDeleteNoContent with default headers values +func NewDcimInventoryItemRolesDeleteNoContent() *DcimInventoryItemRolesDeleteNoContent { + return &DcimInventoryItemRolesDeleteNoContent{} +} + +/* DcimInventoryItemRolesDeleteNoContent describes a response with status code 204, with default header values. + +DcimInventoryItemRolesDeleteNoContent dcim inventory item roles delete no content +*/ +type DcimInventoryItemRolesDeleteNoContent struct { +} + +func (o *DcimInventoryItemRolesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/inventory-item-roles/{id}/][%d] dcimInventoryItemRolesDeleteNoContent ", 204) +} + +func (o *DcimInventoryItemRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go new file mode 100644 index 000000000..4add1278e --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_list_parameters.go @@ -0,0 +1,1606 @@ +// 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" +) + +// NewDcimInventoryItemRolesListParams creates a new DcimInventoryItemRolesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesListParams() *DcimInventoryItemRolesListParams { + return &DcimInventoryItemRolesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesListParamsWithTimeout creates a new DcimInventoryItemRolesListParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesListParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesListParams { + return &DcimInventoryItemRolesListParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesListParamsWithContext creates a new DcimInventoryItemRolesListParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesListParamsWithContext(ctx context.Context) *DcimInventoryItemRolesListParams { + return &DcimInventoryItemRolesListParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesListParamsWithHTTPClient creates a new DcimInventoryItemRolesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesListParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesListParams { + return &DcimInventoryItemRolesListParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesListParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles list operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesListParams struct { + + // Color. + Color *string + + // ColorIc. + ColorIc *string + + // ColorIe. + ColorIe *string + + // ColorIew. + ColorIew *string + + // ColorIsw. + ColorIsw *string + + // Colorn. + Colorn *string + + // ColorNic. + ColorNic *string + + // ColorNie. + ColorNie *string + + // ColorNiew. + ColorNiew *string + + // ColorNisw. + ColorNisw *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Slug. + Slug *string + + // SlugIc. + SlugIc *string + + // SlugIe. + SlugIe *string + + // SlugIew. + SlugIew *string + + // SlugIsw. + SlugIsw *string + + // Slugn. + Slugn *string + + // SlugNic. + SlugNic *string + + // SlugNie. + SlugNie *string + + // SlugNiew. + SlugNiew *string + + // SlugNisw. + SlugNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesListParams) WithDefaults() *DcimInventoryItemRolesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithContext(ctx context.Context) *DcimInventoryItemRolesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithColor adds the color to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColor(color *string) *DcimInventoryItemRolesListParams { + o.SetColor(color) + return o +} + +// SetColor adds the color to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColor(color *string) { + o.Color = color +} + +// WithColorIc adds the colorIc to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorIc(colorIc *string) *DcimInventoryItemRolesListParams { + o.SetColorIc(colorIc) + return o +} + +// SetColorIc adds the colorIc to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorIc(colorIc *string) { + o.ColorIc = colorIc +} + +// WithColorIe adds the colorIe to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorIe(colorIe *string) *DcimInventoryItemRolesListParams { + o.SetColorIe(colorIe) + return o +} + +// SetColorIe adds the colorIe to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorIe(colorIe *string) { + o.ColorIe = colorIe +} + +// WithColorIew adds the colorIew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorIew(colorIew *string) *DcimInventoryItemRolesListParams { + o.SetColorIew(colorIew) + return o +} + +// SetColorIew adds the colorIew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorIew(colorIew *string) { + o.ColorIew = colorIew +} + +// WithColorIsw adds the colorIsw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorIsw(colorIsw *string) *DcimInventoryItemRolesListParams { + o.SetColorIsw(colorIsw) + return o +} + +// SetColorIsw adds the colorIsw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorIsw(colorIsw *string) { + o.ColorIsw = colorIsw +} + +// WithColorn adds the colorn to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorn(colorn *string) *DcimInventoryItemRolesListParams { + o.SetColorn(colorn) + return o +} + +// SetColorn adds the colorN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorn(colorn *string) { + o.Colorn = colorn +} + +// WithColorNic adds the colorNic to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorNic(colorNic *string) *DcimInventoryItemRolesListParams { + o.SetColorNic(colorNic) + return o +} + +// SetColorNic adds the colorNic to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorNic(colorNic *string) { + o.ColorNic = colorNic +} + +// WithColorNie adds the colorNie to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorNie(colorNie *string) *DcimInventoryItemRolesListParams { + o.SetColorNie(colorNie) + return o +} + +// SetColorNie adds the colorNie to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorNie(colorNie *string) { + o.ColorNie = colorNie +} + +// WithColorNiew adds the colorNiew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorNiew(colorNiew *string) *DcimInventoryItemRolesListParams { + o.SetColorNiew(colorNiew) + return o +} + +// SetColorNiew adds the colorNiew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorNiew(colorNiew *string) { + o.ColorNiew = colorNiew +} + +// WithColorNisw adds the colorNisw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithColorNisw(colorNisw *string) *DcimInventoryItemRolesListParams { + o.SetColorNisw(colorNisw) + return o +} + +// SetColorNisw adds the colorNisw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetColorNisw(colorNisw *string) { + o.ColorNisw = colorNisw +} + +// WithCreated adds the created to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithCreated(created *string) *DcimInventoryItemRolesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithCreatedGte(createdGte *string) *DcimInventoryItemRolesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithCreatedLte(createdLte *string) *DcimInventoryItemRolesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithID adds the id to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithID(id *string) *DcimInventoryItemRolesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithIDGt(iDGt *string) *DcimInventoryItemRolesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithIDGte(iDGte *string) *DcimInventoryItemRolesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithIDLt(iDLt *string) *DcimInventoryItemRolesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithIDLte(iDLte *string) *DcimInventoryItemRolesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithIDn(iDn *string) *DcimInventoryItemRolesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLastUpdated(lastUpdated *string) *DcimInventoryItemRolesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInventoryItemRolesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInventoryItemRolesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithLimit(limit *int64) *DcimInventoryItemRolesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithName(name *string) *DcimInventoryItemRolesListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameIc(nameIc *string) *DcimInventoryItemRolesListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameIe(nameIe *string) *DcimInventoryItemRolesListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameIew(nameIew *string) *DcimInventoryItemRolesListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameIsw(nameIsw *string) *DcimInventoryItemRolesListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNamen(namen *string) *DcimInventoryItemRolesListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameNic(nameNic *string) *DcimInventoryItemRolesListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameNie(nameNie *string) *DcimInventoryItemRolesListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameNiew(nameNiew *string) *DcimInventoryItemRolesListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithNameNisw(nameNisw *string) *DcimInventoryItemRolesListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithOffset(offset *int64) *DcimInventoryItemRolesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithQ(q *string) *DcimInventoryItemRolesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetQ(q *string) { + o.Q = q +} + +// WithSlug adds the slug to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlug(slug *string) *DcimInventoryItemRolesListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlug(slug *string) { + o.Slug = slug +} + +// WithSlugIc adds the slugIc to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugIc(slugIc *string) *DcimInventoryItemRolesListParams { + o.SetSlugIc(slugIc) + return o +} + +// SetSlugIc adds the slugIc to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugIc(slugIc *string) { + o.SlugIc = slugIc +} + +// WithSlugIe adds the slugIe to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugIe(slugIe *string) *DcimInventoryItemRolesListParams { + o.SetSlugIe(slugIe) + return o +} + +// SetSlugIe adds the slugIe to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugIe(slugIe *string) { + o.SlugIe = slugIe +} + +// WithSlugIew adds the slugIew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugIew(slugIew *string) *DcimInventoryItemRolesListParams { + o.SetSlugIew(slugIew) + return o +} + +// SetSlugIew adds the slugIew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugIew(slugIew *string) { + o.SlugIew = slugIew +} + +// WithSlugIsw adds the slugIsw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugIsw(slugIsw *string) *DcimInventoryItemRolesListParams { + o.SetSlugIsw(slugIsw) + return o +} + +// SetSlugIsw adds the slugIsw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugIsw(slugIsw *string) { + o.SlugIsw = slugIsw +} + +// WithSlugn adds the slugn to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugn(slugn *string) *DcimInventoryItemRolesListParams { + o.SetSlugn(slugn) + return o +} + +// SetSlugn adds the slugN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugn(slugn *string) { + o.Slugn = slugn +} + +// WithSlugNic adds the slugNic to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugNic(slugNic *string) *DcimInventoryItemRolesListParams { + o.SetSlugNic(slugNic) + return o +} + +// SetSlugNic adds the slugNic to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugNic(slugNic *string) { + o.SlugNic = slugNic +} + +// WithSlugNie adds the slugNie to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugNie(slugNie *string) *DcimInventoryItemRolesListParams { + o.SetSlugNie(slugNie) + return o +} + +// SetSlugNie adds the slugNie to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugNie(slugNie *string) { + o.SlugNie = slugNie +} + +// WithSlugNiew adds the slugNiew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugNiew(slugNiew *string) *DcimInventoryItemRolesListParams { + o.SetSlugNiew(slugNiew) + return o +} + +// SetSlugNiew adds the slugNiew to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugNiew(slugNiew *string) { + o.SlugNiew = slugNiew +} + +// WithSlugNisw adds the slugNisw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithSlugNisw(slugNisw *string) *DcimInventoryItemRolesListParams { + o.SetSlugNisw(slugNisw) + return o +} + +// SetSlugNisw adds the slugNisw to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetSlugNisw(slugNisw *string) { + o.SlugNisw = slugNisw +} + +// WithTag adds the tag to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithTag(tag *string) *DcimInventoryItemRolesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) WithTagn(tagn *string) *DcimInventoryItemRolesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim inventory item roles list params +func (o *DcimInventoryItemRolesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Color != nil { + + // query param color + var qrColor string + + if o.Color != nil { + qrColor = *o.Color + } + qColor := qrColor + if qColor != "" { + + if err := r.SetQueryParam("color", qColor); err != nil { + return err + } + } + } + + if o.ColorIc != nil { + + // query param color__ic + var qrColorIc string + + if o.ColorIc != nil { + qrColorIc = *o.ColorIc + } + qColorIc := qrColorIc + if qColorIc != "" { + + if err := r.SetQueryParam("color__ic", qColorIc); err != nil { + return err + } + } + } + + if o.ColorIe != nil { + + // query param color__ie + var qrColorIe string + + if o.ColorIe != nil { + qrColorIe = *o.ColorIe + } + qColorIe := qrColorIe + if qColorIe != "" { + + if err := r.SetQueryParam("color__ie", qColorIe); err != nil { + return err + } + } + } + + if o.ColorIew != nil { + + // query param color__iew + var qrColorIew string + + if o.ColorIew != nil { + qrColorIew = *o.ColorIew + } + qColorIew := qrColorIew + if qColorIew != "" { + + if err := r.SetQueryParam("color__iew", qColorIew); err != nil { + return err + } + } + } + + if o.ColorIsw != nil { + + // query param color__isw + var qrColorIsw string + + if o.ColorIsw != nil { + qrColorIsw = *o.ColorIsw + } + qColorIsw := qrColorIsw + if qColorIsw != "" { + + if err := r.SetQueryParam("color__isw", qColorIsw); err != nil { + return err + } + } + } + + if o.Colorn != nil { + + // query param color__n + var qrColorn string + + if o.Colorn != nil { + qrColorn = *o.Colorn + } + qColorn := qrColorn + if qColorn != "" { + + if err := r.SetQueryParam("color__n", qColorn); err != nil { + return err + } + } + } + + if o.ColorNic != nil { + + // query param color__nic + var qrColorNic string + + if o.ColorNic != nil { + qrColorNic = *o.ColorNic + } + qColorNic := qrColorNic + if qColorNic != "" { + + if err := r.SetQueryParam("color__nic", qColorNic); err != nil { + return err + } + } + } + + if o.ColorNie != nil { + + // query param color__nie + var qrColorNie string + + if o.ColorNie != nil { + qrColorNie = *o.ColorNie + } + qColorNie := qrColorNie + if qColorNie != "" { + + if err := r.SetQueryParam("color__nie", qColorNie); err != nil { + return err + } + } + } + + if o.ColorNiew != nil { + + // query param color__niew + var qrColorNiew string + + if o.ColorNiew != nil { + qrColorNiew = *o.ColorNiew + } + qColorNiew := qrColorNiew + if qColorNiew != "" { + + if err := r.SetQueryParam("color__niew", qColorNiew); err != nil { + return err + } + } + } + + if o.ColorNisw != nil { + + // query param color__nisw + var qrColorNisw string + + if o.ColorNisw != nil { + qrColorNisw = *o.ColorNisw + } + qColorNisw := qrColorNisw + if qColorNisw != "" { + + if err := r.SetQueryParam("color__nisw", qColorNisw); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Slug != nil { + + // query param slug + var qrSlug string + + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + } + + if o.SlugIc != nil { + + // query param slug__ic + var qrSlugIc string + + if o.SlugIc != nil { + qrSlugIc = *o.SlugIc + } + qSlugIc := qrSlugIc + if qSlugIc != "" { + + if err := r.SetQueryParam("slug__ic", qSlugIc); err != nil { + return err + } + } + } + + if o.SlugIe != nil { + + // query param slug__ie + var qrSlugIe string + + if o.SlugIe != nil { + qrSlugIe = *o.SlugIe + } + qSlugIe := qrSlugIe + if qSlugIe != "" { + + if err := r.SetQueryParam("slug__ie", qSlugIe); err != nil { + return err + } + } + } + + if o.SlugIew != nil { + + // query param slug__iew + var qrSlugIew string + + if o.SlugIew != nil { + qrSlugIew = *o.SlugIew + } + qSlugIew := qrSlugIew + if qSlugIew != "" { + + if err := r.SetQueryParam("slug__iew", qSlugIew); err != nil { + return err + } + } + } + + if o.SlugIsw != nil { + + // query param slug__isw + var qrSlugIsw string + + if o.SlugIsw != nil { + qrSlugIsw = *o.SlugIsw + } + qSlugIsw := qrSlugIsw + if qSlugIsw != "" { + + if err := r.SetQueryParam("slug__isw", qSlugIsw); err != nil { + return err + } + } + } + + if o.Slugn != nil { + + // query param slug__n + var qrSlugn string + + if o.Slugn != nil { + qrSlugn = *o.Slugn + } + qSlugn := qrSlugn + if qSlugn != "" { + + if err := r.SetQueryParam("slug__n", qSlugn); err != nil { + return err + } + } + } + + if o.SlugNic != nil { + + // query param slug__nic + var qrSlugNic string + + if o.SlugNic != nil { + qrSlugNic = *o.SlugNic + } + qSlugNic := qrSlugNic + if qSlugNic != "" { + + if err := r.SetQueryParam("slug__nic", qSlugNic); err != nil { + return err + } + } + } + + if o.SlugNie != nil { + + // query param slug__nie + var qrSlugNie string + + if o.SlugNie != nil { + qrSlugNie = *o.SlugNie + } + qSlugNie := qrSlugNie + if qSlugNie != "" { + + if err := r.SetQueryParam("slug__nie", qSlugNie); err != nil { + return err + } + } + } + + if o.SlugNiew != nil { + + // query param slug__niew + var qrSlugNiew string + + if o.SlugNiew != nil { + qrSlugNiew = *o.SlugNiew + } + qSlugNiew := qrSlugNiew + if qSlugNiew != "" { + + if err := r.SetQueryParam("slug__niew", qSlugNiew); err != nil { + return err + } + } + } + + if o.SlugNisw != nil { + + // query param slug__nisw + var qrSlugNisw string + + if o.SlugNisw != nil { + qrSlugNisw = *o.SlugNisw + } + qSlugNisw := qrSlugNisw + if qSlugNisw != "" { + + if err := r.SetQueryParam("slug__nisw", qSlugNisw); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_list_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_list_responses.go new file mode 100644 index 000000000..2beba1bc5 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_list_responses.go @@ -0,0 +1,247 @@ +// 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" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesListReader is a Reader for the DcimInventoryItemRolesList structure. +type DcimInventoryItemRolesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemRolesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesListOK creates a DcimInventoryItemRolesListOK with default headers values +func NewDcimInventoryItemRolesListOK() *DcimInventoryItemRolesListOK { + return &DcimInventoryItemRolesListOK{} +} + +/* DcimInventoryItemRolesListOK describes a response with status code 200, with default header values. + +DcimInventoryItemRolesListOK dcim inventory item roles list o k +*/ +type DcimInventoryItemRolesListOK struct { + Payload *DcimInventoryItemRolesListOKBody +} + +func (o *DcimInventoryItemRolesListOK) Error() string { + return fmt.Sprintf("[GET /dcim/inventory-item-roles/][%d] dcimInventoryItemRolesListOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemRolesListOK) GetPayload() *DcimInventoryItemRolesListOKBody { + return o.Payload +} + +func (o *DcimInventoryItemRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimInventoryItemRolesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*DcimInventoryItemRolesListOKBody dcim inventory item roles list o k body +swagger:model DcimInventoryItemRolesListOKBody +*/ +type DcimInventoryItemRolesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.InventoryItemRole `json:"results"` +} + +// Validate validates this dcim inventory item roles list o k body +func (o *DcimInventoryItemRolesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimInventoryItemRolesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimInventoryItemRolesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimInventoryItemRolesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimInventoryItemRolesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimInventoryItemRolesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimInventoryItemRolesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimInventoryItemRolesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimInventoryItemRolesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimInventoryItemRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInventoryItemRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim inventory item roles list o k body based on the context it is used +func (o *DcimInventoryItemRolesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimInventoryItemRolesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimInventoryItemRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInventoryItemRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimInventoryItemRolesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimInventoryItemRolesListOKBody) UnmarshalBinary(b []byte) error { + var res DcimInventoryItemRolesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_partial_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_partial_update_parameters.go new file mode 100644 index 000000000..9ef04b168 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemRolesPartialUpdateParams creates a new DcimInventoryItemRolesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesPartialUpdateParams() *DcimInventoryItemRolesPartialUpdateParams { + return &DcimInventoryItemRolesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesPartialUpdateParamsWithTimeout creates a new DcimInventoryItemRolesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesPartialUpdateParams { + return &DcimInventoryItemRolesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesPartialUpdateParamsWithContext creates a new DcimInventoryItemRolesPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesPartialUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemRolesPartialUpdateParams { + return &DcimInventoryItemRolesPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesPartialUpdateParamsWithHTTPClient creates a new DcimInventoryItemRolesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesPartialUpdateParams { + return &DcimInventoryItemRolesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesPartialUpdateParams struct { + + // Data. + Data *models.InventoryItemRole + + /* ID. + + A unique integer value identifying this inventory item role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesPartialUpdateParams) WithDefaults() *DcimInventoryItemRolesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemRolesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) WithData(data *models.InventoryItemRole) *DcimInventoryItemRolesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) SetData(data *models.InventoryItemRole) { + o.Data = data +} + +// WithID adds the id to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) WithID(id int64) *DcimInventoryItemRolesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item roles partial update params +func (o *DcimInventoryItemRolesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_inventory_item_roles_partial_update_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_partial_update_responses.go new file mode 100644 index 000000000..3c1e74ea0 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesPartialUpdateReader is a Reader for the DcimInventoryItemRolesPartialUpdate structure. +type DcimInventoryItemRolesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemRolesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesPartialUpdateOK creates a DcimInventoryItemRolesPartialUpdateOK with default headers values +func NewDcimInventoryItemRolesPartialUpdateOK() *DcimInventoryItemRolesPartialUpdateOK { + return &DcimInventoryItemRolesPartialUpdateOK{} +} + +/* DcimInventoryItemRolesPartialUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemRolesPartialUpdateOK dcim inventory item roles partial update o k +*/ +type DcimInventoryItemRolesPartialUpdateOK struct { + Payload *models.InventoryItemRole +} + +func (o *DcimInventoryItemRolesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/inventory-item-roles/{id}/][%d] dcimInventoryItemRolesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemRolesPartialUpdateOK) GetPayload() *models.InventoryItemRole { + return o.Payload +} + +func (o *DcimInventoryItemRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_read_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_read_parameters.go new file mode 100644 index 000000000..b8c6da29b --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_read_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimInventoryItemRolesReadParams creates a new DcimInventoryItemRolesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesReadParams() *DcimInventoryItemRolesReadParams { + return &DcimInventoryItemRolesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesReadParamsWithTimeout creates a new DcimInventoryItemRolesReadParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesReadParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesReadParams { + return &DcimInventoryItemRolesReadParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesReadParamsWithContext creates a new DcimInventoryItemRolesReadParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesReadParamsWithContext(ctx context.Context) *DcimInventoryItemRolesReadParams { + return &DcimInventoryItemRolesReadParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesReadParamsWithHTTPClient creates a new DcimInventoryItemRolesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesReadParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesReadParams { + return &DcimInventoryItemRolesReadParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesReadParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles read operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesReadParams struct { + + /* ID. + + A unique integer value identifying this inventory item role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesReadParams) WithDefaults() *DcimInventoryItemRolesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) WithContext(ctx context.Context) *DcimInventoryItemRolesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) WithID(id int64) *DcimInventoryItemRolesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item roles read params +func (o *DcimInventoryItemRolesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesReadParams) 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/netbox/client/dcim/dcim_inventory_item_roles_read_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_read_responses.go new file mode 100644 index 000000000..5d428de4f --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_read_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesReadReader is a Reader for the DcimInventoryItemRolesRead structure. +type DcimInventoryItemRolesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemRolesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesReadOK creates a DcimInventoryItemRolesReadOK with default headers values +func NewDcimInventoryItemRolesReadOK() *DcimInventoryItemRolesReadOK { + return &DcimInventoryItemRolesReadOK{} +} + +/* DcimInventoryItemRolesReadOK describes a response with status code 200, with default header values. + +DcimInventoryItemRolesReadOK dcim inventory item roles read o k +*/ +type DcimInventoryItemRolesReadOK struct { + Payload *models.InventoryItemRole +} + +func (o *DcimInventoryItemRolesReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/inventory-item-roles/{id}/][%d] dcimInventoryItemRolesReadOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemRolesReadOK) GetPayload() *models.InventoryItemRole { + return o.Payload +} + +func (o *DcimInventoryItemRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_roles_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_roles_update_parameters.go new file mode 100644 index 000000000..7a1205579 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemRolesUpdateParams creates a new DcimInventoryItemRolesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemRolesUpdateParams() *DcimInventoryItemRolesUpdateParams { + return &DcimInventoryItemRolesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemRolesUpdateParamsWithTimeout creates a new DcimInventoryItemRolesUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemRolesUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemRolesUpdateParams { + return &DcimInventoryItemRolesUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemRolesUpdateParamsWithContext creates a new DcimInventoryItemRolesUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemRolesUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemRolesUpdateParams { + return &DcimInventoryItemRolesUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemRolesUpdateParamsWithHTTPClient creates a new DcimInventoryItemRolesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemRolesUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemRolesUpdateParams { + return &DcimInventoryItemRolesUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemRolesUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item roles update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemRolesUpdateParams struct { + + // Data. + Data *models.InventoryItemRole + + /* ID. + + A unique integer value identifying this inventory item role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item roles update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesUpdateParams) WithDefaults() *DcimInventoryItemRolesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item roles update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemRolesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemRolesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemRolesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemRolesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) WithData(data *models.InventoryItemRole) *DcimInventoryItemRolesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) SetData(data *models.InventoryItemRole) { + o.Data = data +} + +// WithID adds the id to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) WithID(id int64) *DcimInventoryItemRolesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item roles update params +func (o *DcimInventoryItemRolesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_inventory_item_roles_update_responses.go b/netbox/client/dcim/dcim_inventory_item_roles_update_responses.go new file mode 100644 index 000000000..770204407 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_roles_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemRolesUpdateReader is a Reader for the DcimInventoryItemRolesUpdate structure. +type DcimInventoryItemRolesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemRolesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemRolesUpdateOK creates a DcimInventoryItemRolesUpdateOK with default headers values +func NewDcimInventoryItemRolesUpdateOK() *DcimInventoryItemRolesUpdateOK { + return &DcimInventoryItemRolesUpdateOK{} +} + +/* DcimInventoryItemRolesUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemRolesUpdateOK dcim inventory item roles update o k +*/ +type DcimInventoryItemRolesUpdateOK struct { + Payload *models.InventoryItemRole +} + +func (o *DcimInventoryItemRolesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/inventory-item-roles/{id}/][%d] dcimInventoryItemRolesUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemRolesUpdateOK) GetPayload() *models.InventoryItemRole { + return o.Payload +} + +func (o *DcimInventoryItemRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_parameters.go new file mode 100644 index 000000000..31c81d52c --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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" +) + +// NewDcimInventoryItemTemplatesBulkDeleteParams creates a new DcimInventoryItemTemplatesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesBulkDeleteParams() *DcimInventoryItemTemplatesBulkDeleteParams { + return &DcimInventoryItemTemplatesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesBulkDeleteParamsWithTimeout creates a new DcimInventoryItemTemplatesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesBulkDeleteParams { + return &DcimInventoryItemTemplatesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesBulkDeleteParamsWithContext creates a new DcimInventoryItemTemplatesBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesBulkDeleteParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesBulkDeleteParams { + return &DcimInventoryItemTemplatesBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesBulkDeleteParamsWithHTTPClient creates a new DcimInventoryItemTemplatesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesBulkDeleteParams { + return &DcimInventoryItemTemplatesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesBulkDeleteParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesBulkDeleteParams) WithDefaults() *DcimInventoryItemTemplatesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates bulk delete params +func (o *DcimInventoryItemTemplatesBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates bulk delete params +func (o *DcimInventoryItemTemplatesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates bulk delete params +func (o *DcimInventoryItemTemplatesBulkDeleteParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates bulk delete params +func (o *DcimInventoryItemTemplatesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates bulk delete params +func (o *DcimInventoryItemTemplatesBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates bulk delete params +func (o *DcimInventoryItemTemplatesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesBulkDeleteParams) 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/netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_responses.go new file mode 100644 index 000000000..48b68161b --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimInventoryItemTemplatesBulkDeleteReader is a Reader for the DcimInventoryItemTemplatesBulkDelete structure. +type DcimInventoryItemTemplatesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimInventoryItemTemplatesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesBulkDeleteNoContent creates a DcimInventoryItemTemplatesBulkDeleteNoContent with default headers values +func NewDcimInventoryItemTemplatesBulkDeleteNoContent() *DcimInventoryItemTemplatesBulkDeleteNoContent { + return &DcimInventoryItemTemplatesBulkDeleteNoContent{} +} + +/* DcimInventoryItemTemplatesBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimInventoryItemTemplatesBulkDeleteNoContent dcim inventory item templates bulk delete no content +*/ +type DcimInventoryItemTemplatesBulkDeleteNoContent struct { +} + +func (o *DcimInventoryItemTemplatesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/inventory-item-templates/][%d] dcimInventoryItemTemplatesBulkDeleteNoContent ", 204) +} + +func (o *DcimInventoryItemTemplatesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_parameters.go new file mode 100644 index 000000000..26ab13f22 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemTemplatesBulkPartialUpdateParams creates a new DcimInventoryItemTemplatesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesBulkPartialUpdateParams() *DcimInventoryItemTemplatesBulkPartialUpdateParams { + return &DcimInventoryItemTemplatesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesBulkPartialUpdateParamsWithTimeout creates a new DcimInventoryItemTemplatesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + return &DcimInventoryItemTemplatesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesBulkPartialUpdateParamsWithContext creates a new DcimInventoryItemTemplatesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + return &DcimInventoryItemTemplatesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesBulkPartialUpdateParamsWithHTTPClient creates a new DcimInventoryItemTemplatesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + return &DcimInventoryItemTemplatesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableInventoryItemTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) WithDefaults() *DcimInventoryItemTemplatesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) WithData(data *models.WritableInventoryItemTemplate) *DcimInventoryItemTemplatesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item templates bulk partial update params +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) SetData(data *models.WritableInventoryItemTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_responses.go new file mode 100644 index 000000000..6e390555e --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesBulkPartialUpdateReader is a Reader for the DcimInventoryItemTemplatesBulkPartialUpdate structure. +type DcimInventoryItemTemplatesBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemTemplatesBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesBulkPartialUpdateOK creates a DcimInventoryItemTemplatesBulkPartialUpdateOK with default headers values +func NewDcimInventoryItemTemplatesBulkPartialUpdateOK() *DcimInventoryItemTemplatesBulkPartialUpdateOK { + return &DcimInventoryItemTemplatesBulkPartialUpdateOK{} +} + +/* DcimInventoryItemTemplatesBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemTemplatesBulkPartialUpdateOK dcim inventory item templates bulk partial update o k +*/ +type DcimInventoryItemTemplatesBulkPartialUpdateOK struct { + Payload *models.InventoryItemTemplate +} + +func (o *DcimInventoryItemTemplatesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/inventory-item-templates/][%d] dcimInventoryItemTemplatesBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemTemplatesBulkPartialUpdateOK) GetPayload() *models.InventoryItemTemplate { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_bulk_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_bulk_update_parameters.go new file mode 100644 index 000000000..041e571c3 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemTemplatesBulkUpdateParams creates a new DcimInventoryItemTemplatesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesBulkUpdateParams() *DcimInventoryItemTemplatesBulkUpdateParams { + return &DcimInventoryItemTemplatesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesBulkUpdateParamsWithTimeout creates a new DcimInventoryItemTemplatesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesBulkUpdateParams { + return &DcimInventoryItemTemplatesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesBulkUpdateParamsWithContext creates a new DcimInventoryItemTemplatesBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesBulkUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesBulkUpdateParams { + return &DcimInventoryItemTemplatesBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesBulkUpdateParamsWithHTTPClient creates a new DcimInventoryItemTemplatesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesBulkUpdateParams { + return &DcimInventoryItemTemplatesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesBulkUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesBulkUpdateParams struct { + + // Data. + Data *models.WritableInventoryItemTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesBulkUpdateParams) WithDefaults() *DcimInventoryItemTemplatesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) WithData(data *models.WritableInventoryItemTemplate) *DcimInventoryItemTemplatesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item templates bulk update params +func (o *DcimInventoryItemTemplatesBulkUpdateParams) SetData(data *models.WritableInventoryItemTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_bulk_update_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_bulk_update_responses.go new file mode 100644 index 000000000..002a236f2 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesBulkUpdateReader is a Reader for the DcimInventoryItemTemplatesBulkUpdate structure. +type DcimInventoryItemTemplatesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemTemplatesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesBulkUpdateOK creates a DcimInventoryItemTemplatesBulkUpdateOK with default headers values +func NewDcimInventoryItemTemplatesBulkUpdateOK() *DcimInventoryItemTemplatesBulkUpdateOK { + return &DcimInventoryItemTemplatesBulkUpdateOK{} +} + +/* DcimInventoryItemTemplatesBulkUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemTemplatesBulkUpdateOK dcim inventory item templates bulk update o k +*/ +type DcimInventoryItemTemplatesBulkUpdateOK struct { + Payload *models.InventoryItemTemplate +} + +func (o *DcimInventoryItemTemplatesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/inventory-item-templates/][%d] dcimInventoryItemTemplatesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemTemplatesBulkUpdateOK) GetPayload() *models.InventoryItemTemplate { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_create_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_create_parameters.go new file mode 100644 index 000000000..045ddc454 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_create_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemTemplatesCreateParams creates a new DcimInventoryItemTemplatesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesCreateParams() *DcimInventoryItemTemplatesCreateParams { + return &DcimInventoryItemTemplatesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesCreateParamsWithTimeout creates a new DcimInventoryItemTemplatesCreateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesCreateParams { + return &DcimInventoryItemTemplatesCreateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesCreateParamsWithContext creates a new DcimInventoryItemTemplatesCreateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesCreateParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesCreateParams { + return &DcimInventoryItemTemplatesCreateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesCreateParamsWithHTTPClient creates a new DcimInventoryItemTemplatesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesCreateParams { + return &DcimInventoryItemTemplatesCreateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesCreateParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates create operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesCreateParams struct { + + // Data. + Data *models.WritableInventoryItemTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesCreateParams) WithDefaults() *DcimInventoryItemTemplatesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) WithData(data *models.WritableInventoryItemTemplate) *DcimInventoryItemTemplatesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item templates create params +func (o *DcimInventoryItemTemplatesCreateParams) SetData(data *models.WritableInventoryItemTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_create_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_create_responses.go new file mode 100644 index 000000000..ac5ae96a9 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_create_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesCreateReader is a Reader for the DcimInventoryItemTemplatesCreate structure. +type DcimInventoryItemTemplatesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimInventoryItemTemplatesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesCreateCreated creates a DcimInventoryItemTemplatesCreateCreated with default headers values +func NewDcimInventoryItemTemplatesCreateCreated() *DcimInventoryItemTemplatesCreateCreated { + return &DcimInventoryItemTemplatesCreateCreated{} +} + +/* DcimInventoryItemTemplatesCreateCreated describes a response with status code 201, with default header values. + +DcimInventoryItemTemplatesCreateCreated dcim inventory item templates create created +*/ +type DcimInventoryItemTemplatesCreateCreated struct { + Payload *models.InventoryItemTemplate +} + +func (o *DcimInventoryItemTemplatesCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/inventory-item-templates/][%d] dcimInventoryItemTemplatesCreateCreated %+v", 201, o.Payload) +} +func (o *DcimInventoryItemTemplatesCreateCreated) GetPayload() *models.InventoryItemTemplate { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_delete_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_delete_parameters.go new file mode 100644 index 000000000..0ac0795fd --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_delete_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimInventoryItemTemplatesDeleteParams creates a new DcimInventoryItemTemplatesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesDeleteParams() *DcimInventoryItemTemplatesDeleteParams { + return &DcimInventoryItemTemplatesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesDeleteParamsWithTimeout creates a new DcimInventoryItemTemplatesDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesDeleteParams { + return &DcimInventoryItemTemplatesDeleteParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesDeleteParamsWithContext creates a new DcimInventoryItemTemplatesDeleteParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesDeleteParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesDeleteParams { + return &DcimInventoryItemTemplatesDeleteParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesDeleteParamsWithHTTPClient creates a new DcimInventoryItemTemplatesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesDeleteParams { + return &DcimInventoryItemTemplatesDeleteParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesDeleteParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates delete operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesDeleteParams struct { + + /* ID. + + A unique integer value identifying this inventory item template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesDeleteParams) WithDefaults() *DcimInventoryItemTemplatesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) WithID(id int64) *DcimInventoryItemTemplatesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item templates delete params +func (o *DcimInventoryItemTemplatesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesDeleteParams) 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/netbox/client/dcim/dcim_inventory_item_templates_delete_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_delete_responses.go new file mode 100644 index 000000000..c6998134a --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimInventoryItemTemplatesDeleteReader is a Reader for the DcimInventoryItemTemplatesDelete structure. +type DcimInventoryItemTemplatesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimInventoryItemTemplatesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesDeleteNoContent creates a DcimInventoryItemTemplatesDeleteNoContent with default headers values +func NewDcimInventoryItemTemplatesDeleteNoContent() *DcimInventoryItemTemplatesDeleteNoContent { + return &DcimInventoryItemTemplatesDeleteNoContent{} +} + +/* DcimInventoryItemTemplatesDeleteNoContent describes a response with status code 204, with default header values. + +DcimInventoryItemTemplatesDeleteNoContent dcim inventory item templates delete no content +*/ +type DcimInventoryItemTemplatesDeleteNoContent struct { +} + +func (o *DcimInventoryItemTemplatesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/inventory-item-templates/{id}/][%d] dcimInventoryItemTemplatesDeleteNoContent ", 204) +} + +func (o *DcimInventoryItemTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go new file mode 100644 index 000000000..b05a9bfe4 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_list_parameters.go @@ -0,0 +1,2164 @@ +// 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" +) + +// NewDcimInventoryItemTemplatesListParams creates a new DcimInventoryItemTemplatesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesListParams() *DcimInventoryItemTemplatesListParams { + return &DcimInventoryItemTemplatesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesListParamsWithTimeout creates a new DcimInventoryItemTemplatesListParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesListParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesListParams { + return &DcimInventoryItemTemplatesListParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesListParamsWithContext creates a new DcimInventoryItemTemplatesListParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesListParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesListParams { + return &DcimInventoryItemTemplatesListParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesListParamsWithHTTPClient creates a new DcimInventoryItemTemplatesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesListParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesListParams { + return &DcimInventoryItemTemplatesListParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesListParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates list operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesListParams struct { + + // ComponentID. + ComponentID *string + + // ComponentIDGt. + ComponentIDGt *string + + // ComponentIDGte. + ComponentIDGte *string + + // ComponentIDLt. + ComponentIDLt *string + + // ComponentIDLte. + ComponentIDLte *string + + // ComponentIDn. + ComponentIDn *string + + // ComponentType. + ComponentType *string + + // ComponentTypen. + ComponentTypen *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // DevicetypeID. + DevicetypeID *string + + // DevicetypeIDn. + DevicetypeIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // Label. + Label *string + + // LabelIc. + LabelIc *string + + // LabelIe. + LabelIe *string + + // LabelIew. + LabelIew *string + + // LabelIsw. + LabelIsw *string + + // Labeln. + Labeln *string + + // LabelNic. + LabelNic *string + + // LabelNie. + LabelNie *string + + // LabelNiew. + LabelNiew *string + + // LabelNisw. + LabelNisw *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Manufacturer. + Manufacturer *string + + // Manufacturern. + Manufacturern *string + + // ManufacturerID. + ManufacturerID *string + + // ManufacturerIDn. + ManufacturerIDn *string + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // ParentID. + ParentID *string + + // ParentIDn. + ParentIDn *string + + // PartID. + PartID *string + + // PartIDIc. + PartIDIc *string + + // PartIDIe. + PartIDIe *string + + // PartIDIew. + PartIDIew *string + + // PartIDIsw. + PartIDIsw *string + + // PartIDn. + PartIDn *string + + // PartIDNic. + PartIDNic *string + + // PartIDNie. + PartIDNie *string + + // PartIDNiew. + PartIDNiew *string + + // PartIDNisw. + PartIDNisw *string + + // Q. + Q *string + + // Role. + Role *string + + // Rolen. + Rolen *string + + // RoleID. + RoleID *string + + // RoleIDn. + RoleIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesListParams) WithDefaults() *DcimInventoryItemTemplatesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithComponentID adds the componentID to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentID(componentID *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentID(componentID) + return o +} + +// SetComponentID adds the componentId to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentID(componentID *string) { + o.ComponentID = componentID +} + +// WithComponentIDGt adds the componentIDGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentIDGt(componentIDGt *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentIDGt(componentIDGt) + return o +} + +// SetComponentIDGt adds the componentIdGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentIDGt(componentIDGt *string) { + o.ComponentIDGt = componentIDGt +} + +// WithComponentIDGte adds the componentIDGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentIDGte(componentIDGte *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentIDGte(componentIDGte) + return o +} + +// SetComponentIDGte adds the componentIdGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentIDGte(componentIDGte *string) { + o.ComponentIDGte = componentIDGte +} + +// WithComponentIDLt adds the componentIDLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentIDLt(componentIDLt *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentIDLt(componentIDLt) + return o +} + +// SetComponentIDLt adds the componentIdLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentIDLt(componentIDLt *string) { + o.ComponentIDLt = componentIDLt +} + +// WithComponentIDLte adds the componentIDLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentIDLte(componentIDLte *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentIDLte(componentIDLte) + return o +} + +// SetComponentIDLte adds the componentIdLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentIDLte(componentIDLte *string) { + o.ComponentIDLte = componentIDLte +} + +// WithComponentIDn adds the componentIDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentIDn(componentIDn *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentIDn(componentIDn) + return o +} + +// SetComponentIDn adds the componentIdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentIDn(componentIDn *string) { + o.ComponentIDn = componentIDn +} + +// WithComponentType adds the componentType to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentType(componentType *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentType(componentType) + return o +} + +// SetComponentType adds the componentType to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentType(componentType *string) { + o.ComponentType = componentType +} + +// WithComponentTypen adds the componentTypen to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithComponentTypen(componentTypen *string) *DcimInventoryItemTemplatesListParams { + o.SetComponentTypen(componentTypen) + return o +} + +// SetComponentTypen adds the componentTypeN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetComponentTypen(componentTypen *string) { + o.ComponentTypen = componentTypen +} + +// WithCreated adds the created to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithCreated(created *string) *DcimInventoryItemTemplatesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithCreatedGte(createdGte *string) *DcimInventoryItemTemplatesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithCreatedLte(createdLte *string) *DcimInventoryItemTemplatesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDevicetypeID adds the devicetypeID to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimInventoryItemTemplatesListParams { + o.SetDevicetypeID(devicetypeID) + return o +} + +// SetDevicetypeID adds the devicetypeId to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetDevicetypeID(devicetypeID *string) { + o.DevicetypeID = devicetypeID +} + +// WithDevicetypeIDn adds the devicetypeIDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithDevicetypeIDn(devicetypeIDn *string) *DcimInventoryItemTemplatesListParams { + o.SetDevicetypeIDn(devicetypeIDn) + return o +} + +// SetDevicetypeIDn adds the devicetypeIdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetDevicetypeIDn(devicetypeIDn *string) { + o.DevicetypeIDn = devicetypeIDn +} + +// WithID adds the id to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithID(id *string) *DcimInventoryItemTemplatesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithIDGt(iDGt *string) *DcimInventoryItemTemplatesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithIDGte(iDGte *string) *DcimInventoryItemTemplatesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithIDLt(iDLt *string) *DcimInventoryItemTemplatesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithIDLte(iDLte *string) *DcimInventoryItemTemplatesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithIDn(iDn *string) *DcimInventoryItemTemplatesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLabel adds the label to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabel(label *string) *DcimInventoryItemTemplatesListParams { + o.SetLabel(label) + return o +} + +// SetLabel adds the label to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabel(label *string) { + o.Label = label +} + +// WithLabelIc adds the labelIc to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelIc(labelIc *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelIc(labelIc) + return o +} + +// SetLabelIc adds the labelIc to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelIc(labelIc *string) { + o.LabelIc = labelIc +} + +// WithLabelIe adds the labelIe to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelIe(labelIe *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelIe(labelIe) + return o +} + +// SetLabelIe adds the labelIe to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelIe(labelIe *string) { + o.LabelIe = labelIe +} + +// WithLabelIew adds the labelIew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelIew(labelIew *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelIew(labelIew) + return o +} + +// SetLabelIew adds the labelIew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelIew(labelIew *string) { + o.LabelIew = labelIew +} + +// WithLabelIsw adds the labelIsw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelIsw(labelIsw *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelIsw(labelIsw) + return o +} + +// SetLabelIsw adds the labelIsw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelIsw(labelIsw *string) { + o.LabelIsw = labelIsw +} + +// WithLabeln adds the labeln to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabeln(labeln *string) *DcimInventoryItemTemplatesListParams { + o.SetLabeln(labeln) + return o +} + +// SetLabeln adds the labelN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabeln(labeln *string) { + o.Labeln = labeln +} + +// WithLabelNic adds the labelNic to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelNic(labelNic *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelNic(labelNic) + return o +} + +// SetLabelNic adds the labelNic to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelNic(labelNic *string) { + o.LabelNic = labelNic +} + +// WithLabelNie adds the labelNie to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelNie(labelNie *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelNie(labelNie) + return o +} + +// SetLabelNie adds the labelNie to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelNie(labelNie *string) { + o.LabelNie = labelNie +} + +// WithLabelNiew adds the labelNiew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelNiew(labelNiew *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelNiew(labelNiew) + return o +} + +// SetLabelNiew adds the labelNiew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelNiew(labelNiew *string) { + o.LabelNiew = labelNiew +} + +// WithLabelNisw adds the labelNisw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLabelNisw(labelNisw *string) *DcimInventoryItemTemplatesListParams { + o.SetLabelNisw(labelNisw) + return o +} + +// SetLabelNisw adds the labelNisw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLabelNisw(labelNisw *string) { + o.LabelNisw = labelNisw +} + +// WithLastUpdated adds the lastUpdated to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLastUpdated(lastUpdated *string) *DcimInventoryItemTemplatesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimInventoryItemTemplatesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimInventoryItemTemplatesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithLimit(limit *int64) *DcimInventoryItemTemplatesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithManufacturer adds the manufacturer to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithManufacturer(manufacturer *string) *DcimInventoryItemTemplatesListParams { + o.SetManufacturer(manufacturer) + return o +} + +// SetManufacturer adds the manufacturer to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetManufacturer(manufacturer *string) { + o.Manufacturer = manufacturer +} + +// WithManufacturern adds the manufacturern to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithManufacturern(manufacturern *string) *DcimInventoryItemTemplatesListParams { + o.SetManufacturern(manufacturern) + return o +} + +// SetManufacturern adds the manufacturerN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetManufacturern(manufacturern *string) { + o.Manufacturern = manufacturern +} + +// WithManufacturerID adds the manufacturerID to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithManufacturerID(manufacturerID *string) *DcimInventoryItemTemplatesListParams { + o.SetManufacturerID(manufacturerID) + return o +} + +// SetManufacturerID adds the manufacturerId to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetManufacturerID(manufacturerID *string) { + o.ManufacturerID = manufacturerID +} + +// WithManufacturerIDn adds the manufacturerIDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithManufacturerIDn(manufacturerIDn *string) *DcimInventoryItemTemplatesListParams { + o.SetManufacturerIDn(manufacturerIDn) + return o +} + +// SetManufacturerIDn adds the manufacturerIdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetManufacturerIDn(manufacturerIDn *string) { + o.ManufacturerIDn = manufacturerIDn +} + +// WithName adds the name to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithName(name *string) *DcimInventoryItemTemplatesListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameIc(nameIc *string) *DcimInventoryItemTemplatesListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameIe(nameIe *string) *DcimInventoryItemTemplatesListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameIew(nameIew *string) *DcimInventoryItemTemplatesListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameIsw(nameIsw *string) *DcimInventoryItemTemplatesListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNamen(namen *string) *DcimInventoryItemTemplatesListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameNic(nameNic *string) *DcimInventoryItemTemplatesListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameNie(nameNie *string) *DcimInventoryItemTemplatesListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameNiew(nameNiew *string) *DcimInventoryItemTemplatesListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithNameNisw(nameNisw *string) *DcimInventoryItemTemplatesListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithOffset(offset *int64) *DcimInventoryItemTemplatesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithParentID adds the parentID to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithParentID(parentID *string) *DcimInventoryItemTemplatesListParams { + o.SetParentID(parentID) + return o +} + +// SetParentID adds the parentId to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetParentID(parentID *string) { + o.ParentID = parentID +} + +// WithParentIDn adds the parentIDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithParentIDn(parentIDn *string) *DcimInventoryItemTemplatesListParams { + o.SetParentIDn(parentIDn) + return o +} + +// SetParentIDn adds the parentIdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetParentIDn(parentIDn *string) { + o.ParentIDn = parentIDn +} + +// WithPartID adds the partID to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartID(partID *string) *DcimInventoryItemTemplatesListParams { + o.SetPartID(partID) + return o +} + +// SetPartID adds the partId to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartID(partID *string) { + o.PartID = partID +} + +// WithPartIDIc adds the partIDIc to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDIc(partIDIc *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDIc(partIDIc) + return o +} + +// SetPartIDIc adds the partIdIc to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDIc(partIDIc *string) { + o.PartIDIc = partIDIc +} + +// WithPartIDIe adds the partIDIe to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDIe(partIDIe *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDIe(partIDIe) + return o +} + +// SetPartIDIe adds the partIdIe to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDIe(partIDIe *string) { + o.PartIDIe = partIDIe +} + +// WithPartIDIew adds the partIDIew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDIew(partIDIew *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDIew(partIDIew) + return o +} + +// SetPartIDIew adds the partIdIew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDIew(partIDIew *string) { + o.PartIDIew = partIDIew +} + +// WithPartIDIsw adds the partIDIsw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDIsw(partIDIsw *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDIsw(partIDIsw) + return o +} + +// SetPartIDIsw adds the partIdIsw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDIsw(partIDIsw *string) { + o.PartIDIsw = partIDIsw +} + +// WithPartIDn adds the partIDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDn(partIDn *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDn(partIDn) + return o +} + +// SetPartIDn adds the partIdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDn(partIDn *string) { + o.PartIDn = partIDn +} + +// WithPartIDNic adds the partIDNic to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDNic(partIDNic *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDNic(partIDNic) + return o +} + +// SetPartIDNic adds the partIdNic to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDNic(partIDNic *string) { + o.PartIDNic = partIDNic +} + +// WithPartIDNie adds the partIDNie to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDNie(partIDNie *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDNie(partIDNie) + return o +} + +// SetPartIDNie adds the partIdNie to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDNie(partIDNie *string) { + o.PartIDNie = partIDNie +} + +// WithPartIDNiew adds the partIDNiew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDNiew(partIDNiew *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDNiew(partIDNiew) + return o +} + +// SetPartIDNiew adds the partIdNiew to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDNiew(partIDNiew *string) { + o.PartIDNiew = partIDNiew +} + +// WithPartIDNisw adds the partIDNisw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithPartIDNisw(partIDNisw *string) *DcimInventoryItemTemplatesListParams { + o.SetPartIDNisw(partIDNisw) + return o +} + +// SetPartIDNisw adds the partIdNisw to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetPartIDNisw(partIDNisw *string) { + o.PartIDNisw = partIDNisw +} + +// WithQ adds the q to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithQ(q *string) *DcimInventoryItemTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetQ(q *string) { + o.Q = q +} + +// WithRole adds the role to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithRole(role *string) *DcimInventoryItemTemplatesListParams { + o.SetRole(role) + return o +} + +// SetRole adds the role to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetRole(role *string) { + o.Role = role +} + +// WithRolen adds the rolen to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithRolen(rolen *string) *DcimInventoryItemTemplatesListParams { + o.SetRolen(rolen) + return o +} + +// SetRolen adds the roleN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetRolen(rolen *string) { + o.Rolen = rolen +} + +// WithRoleID adds the roleID to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithRoleID(roleID *string) *DcimInventoryItemTemplatesListParams { + o.SetRoleID(roleID) + return o +} + +// SetRoleID adds the roleId to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetRoleID(roleID *string) { + o.RoleID = roleID +} + +// WithRoleIDn adds the roleIDn to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) WithRoleIDn(roleIDn *string) *DcimInventoryItemTemplatesListParams { + o.SetRoleIDn(roleIDn) + return o +} + +// SetRoleIDn adds the roleIdN to the dcim inventory item templates list params +func (o *DcimInventoryItemTemplatesListParams) SetRoleIDn(roleIDn *string) { + o.RoleIDn = roleIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ComponentID != nil { + + // query param component_id + var qrComponentID string + + if o.ComponentID != nil { + qrComponentID = *o.ComponentID + } + qComponentID := qrComponentID + if qComponentID != "" { + + if err := r.SetQueryParam("component_id", qComponentID); err != nil { + return err + } + } + } + + if o.ComponentIDGt != nil { + + // query param component_id__gt + var qrComponentIDGt string + + if o.ComponentIDGt != nil { + qrComponentIDGt = *o.ComponentIDGt + } + qComponentIDGt := qrComponentIDGt + if qComponentIDGt != "" { + + if err := r.SetQueryParam("component_id__gt", qComponentIDGt); err != nil { + return err + } + } + } + + if o.ComponentIDGte != nil { + + // query param component_id__gte + var qrComponentIDGte string + + if o.ComponentIDGte != nil { + qrComponentIDGte = *o.ComponentIDGte + } + qComponentIDGte := qrComponentIDGte + if qComponentIDGte != "" { + + if err := r.SetQueryParam("component_id__gte", qComponentIDGte); err != nil { + return err + } + } + } + + if o.ComponentIDLt != nil { + + // query param component_id__lt + var qrComponentIDLt string + + if o.ComponentIDLt != nil { + qrComponentIDLt = *o.ComponentIDLt + } + qComponentIDLt := qrComponentIDLt + if qComponentIDLt != "" { + + if err := r.SetQueryParam("component_id__lt", qComponentIDLt); err != nil { + return err + } + } + } + + if o.ComponentIDLte != nil { + + // query param component_id__lte + var qrComponentIDLte string + + if o.ComponentIDLte != nil { + qrComponentIDLte = *o.ComponentIDLte + } + qComponentIDLte := qrComponentIDLte + if qComponentIDLte != "" { + + if err := r.SetQueryParam("component_id__lte", qComponentIDLte); err != nil { + return err + } + } + } + + if o.ComponentIDn != nil { + + // query param component_id__n + var qrComponentIDn string + + if o.ComponentIDn != nil { + qrComponentIDn = *o.ComponentIDn + } + qComponentIDn := qrComponentIDn + if qComponentIDn != "" { + + if err := r.SetQueryParam("component_id__n", qComponentIDn); err != nil { + return err + } + } + } + + if o.ComponentType != nil { + + // query param component_type + var qrComponentType string + + if o.ComponentType != nil { + qrComponentType = *o.ComponentType + } + qComponentType := qrComponentType + if qComponentType != "" { + + if err := r.SetQueryParam("component_type", qComponentType); err != nil { + return err + } + } + } + + if o.ComponentTypen != nil { + + // query param component_type__n + var qrComponentTypen string + + if o.ComponentTypen != nil { + qrComponentTypen = *o.ComponentTypen + } + qComponentTypen := qrComponentTypen + if qComponentTypen != "" { + + if err := r.SetQueryParam("component_type__n", qComponentTypen); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.DevicetypeID != nil { + + // query param devicetype_id + var qrDevicetypeID string + + if o.DevicetypeID != nil { + qrDevicetypeID = *o.DevicetypeID + } + qDevicetypeID := qrDevicetypeID + if qDevicetypeID != "" { + + if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil { + return err + } + } + } + + if o.DevicetypeIDn != nil { + + // query param devicetype_id__n + var qrDevicetypeIDn string + + if o.DevicetypeIDn != nil { + qrDevicetypeIDn = *o.DevicetypeIDn + } + qDevicetypeIDn := qrDevicetypeIDn + if qDevicetypeIDn != "" { + + if err := r.SetQueryParam("devicetype_id__n", qDevicetypeIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Label != nil { + + // query param label + var qrLabel string + + if o.Label != nil { + qrLabel = *o.Label + } + qLabel := qrLabel + if qLabel != "" { + + if err := r.SetQueryParam("label", qLabel); err != nil { + return err + } + } + } + + if o.LabelIc != nil { + + // query param label__ic + var qrLabelIc string + + if o.LabelIc != nil { + qrLabelIc = *o.LabelIc + } + qLabelIc := qrLabelIc + if qLabelIc != "" { + + if err := r.SetQueryParam("label__ic", qLabelIc); err != nil { + return err + } + } + } + + if o.LabelIe != nil { + + // query param label__ie + var qrLabelIe string + + if o.LabelIe != nil { + qrLabelIe = *o.LabelIe + } + qLabelIe := qrLabelIe + if qLabelIe != "" { + + if err := r.SetQueryParam("label__ie", qLabelIe); err != nil { + return err + } + } + } + + if o.LabelIew != nil { + + // query param label__iew + var qrLabelIew string + + if o.LabelIew != nil { + qrLabelIew = *o.LabelIew + } + qLabelIew := qrLabelIew + if qLabelIew != "" { + + if err := r.SetQueryParam("label__iew", qLabelIew); err != nil { + return err + } + } + } + + if o.LabelIsw != nil { + + // query param label__isw + var qrLabelIsw string + + if o.LabelIsw != nil { + qrLabelIsw = *o.LabelIsw + } + qLabelIsw := qrLabelIsw + if qLabelIsw != "" { + + if err := r.SetQueryParam("label__isw", qLabelIsw); err != nil { + return err + } + } + } + + if o.Labeln != nil { + + // query param label__n + var qrLabeln string + + if o.Labeln != nil { + qrLabeln = *o.Labeln + } + qLabeln := qrLabeln + if qLabeln != "" { + + if err := r.SetQueryParam("label__n", qLabeln); err != nil { + return err + } + } + } + + if o.LabelNic != nil { + + // query param label__nic + var qrLabelNic string + + if o.LabelNic != nil { + qrLabelNic = *o.LabelNic + } + qLabelNic := qrLabelNic + if qLabelNic != "" { + + if err := r.SetQueryParam("label__nic", qLabelNic); err != nil { + return err + } + } + } + + if o.LabelNie != nil { + + // query param label__nie + var qrLabelNie string + + if o.LabelNie != nil { + qrLabelNie = *o.LabelNie + } + qLabelNie := qrLabelNie + if qLabelNie != "" { + + if err := r.SetQueryParam("label__nie", qLabelNie); err != nil { + return err + } + } + } + + if o.LabelNiew != nil { + + // query param label__niew + var qrLabelNiew string + + if o.LabelNiew != nil { + qrLabelNiew = *o.LabelNiew + } + qLabelNiew := qrLabelNiew + if qLabelNiew != "" { + + if err := r.SetQueryParam("label__niew", qLabelNiew); err != nil { + return err + } + } + } + + if o.LabelNisw != nil { + + // query param label__nisw + var qrLabelNisw string + + if o.LabelNisw != nil { + qrLabelNisw = *o.LabelNisw + } + qLabelNisw := qrLabelNisw + if qLabelNisw != "" { + + if err := r.SetQueryParam("label__nisw", qLabelNisw); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Manufacturer != nil { + + // query param manufacturer + var qrManufacturer string + + if o.Manufacturer != nil { + qrManufacturer = *o.Manufacturer + } + qManufacturer := qrManufacturer + if qManufacturer != "" { + + if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil { + return err + } + } + } + + if o.Manufacturern != nil { + + // query param manufacturer__n + var qrManufacturern string + + if o.Manufacturern != nil { + qrManufacturern = *o.Manufacturern + } + qManufacturern := qrManufacturern + if qManufacturern != "" { + + if err := r.SetQueryParam("manufacturer__n", qManufacturern); err != nil { + return err + } + } + } + + if o.ManufacturerID != nil { + + // query param manufacturer_id + var qrManufacturerID string + + if o.ManufacturerID != nil { + qrManufacturerID = *o.ManufacturerID + } + qManufacturerID := qrManufacturerID + if qManufacturerID != "" { + + if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil { + return err + } + } + } + + if o.ManufacturerIDn != nil { + + // query param manufacturer_id__n + var qrManufacturerIDn string + + if o.ManufacturerIDn != nil { + qrManufacturerIDn = *o.ManufacturerIDn + } + qManufacturerIDn := qrManufacturerIDn + if qManufacturerIDn != "" { + + if err := r.SetQueryParam("manufacturer_id__n", qManufacturerIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.ParentID != nil { + + // query param parent_id + var qrParentID string + + if o.ParentID != nil { + qrParentID = *o.ParentID + } + qParentID := qrParentID + if qParentID != "" { + + if err := r.SetQueryParam("parent_id", qParentID); err != nil { + return err + } + } + } + + if o.ParentIDn != nil { + + // query param parent_id__n + var qrParentIDn string + + if o.ParentIDn != nil { + qrParentIDn = *o.ParentIDn + } + qParentIDn := qrParentIDn + if qParentIDn != "" { + + if err := r.SetQueryParam("parent_id__n", qParentIDn); err != nil { + return err + } + } + } + + if o.PartID != nil { + + // query param part_id + var qrPartID string + + if o.PartID != nil { + qrPartID = *o.PartID + } + qPartID := qrPartID + if qPartID != "" { + + if err := r.SetQueryParam("part_id", qPartID); err != nil { + return err + } + } + } + + if o.PartIDIc != nil { + + // query param part_id__ic + var qrPartIDIc string + + if o.PartIDIc != nil { + qrPartIDIc = *o.PartIDIc + } + qPartIDIc := qrPartIDIc + if qPartIDIc != "" { + + if err := r.SetQueryParam("part_id__ic", qPartIDIc); err != nil { + return err + } + } + } + + if o.PartIDIe != nil { + + // query param part_id__ie + var qrPartIDIe string + + if o.PartIDIe != nil { + qrPartIDIe = *o.PartIDIe + } + qPartIDIe := qrPartIDIe + if qPartIDIe != "" { + + if err := r.SetQueryParam("part_id__ie", qPartIDIe); err != nil { + return err + } + } + } + + if o.PartIDIew != nil { + + // query param part_id__iew + var qrPartIDIew string + + if o.PartIDIew != nil { + qrPartIDIew = *o.PartIDIew + } + qPartIDIew := qrPartIDIew + if qPartIDIew != "" { + + if err := r.SetQueryParam("part_id__iew", qPartIDIew); err != nil { + return err + } + } + } + + if o.PartIDIsw != nil { + + // query param part_id__isw + var qrPartIDIsw string + + if o.PartIDIsw != nil { + qrPartIDIsw = *o.PartIDIsw + } + qPartIDIsw := qrPartIDIsw + if qPartIDIsw != "" { + + if err := r.SetQueryParam("part_id__isw", qPartIDIsw); err != nil { + return err + } + } + } + + if o.PartIDn != nil { + + // query param part_id__n + var qrPartIDn string + + if o.PartIDn != nil { + qrPartIDn = *o.PartIDn + } + qPartIDn := qrPartIDn + if qPartIDn != "" { + + if err := r.SetQueryParam("part_id__n", qPartIDn); err != nil { + return err + } + } + } + + if o.PartIDNic != nil { + + // query param part_id__nic + var qrPartIDNic string + + if o.PartIDNic != nil { + qrPartIDNic = *o.PartIDNic + } + qPartIDNic := qrPartIDNic + if qPartIDNic != "" { + + if err := r.SetQueryParam("part_id__nic", qPartIDNic); err != nil { + return err + } + } + } + + if o.PartIDNie != nil { + + // query param part_id__nie + var qrPartIDNie string + + if o.PartIDNie != nil { + qrPartIDNie = *o.PartIDNie + } + qPartIDNie := qrPartIDNie + if qPartIDNie != "" { + + if err := r.SetQueryParam("part_id__nie", qPartIDNie); err != nil { + return err + } + } + } + + if o.PartIDNiew != nil { + + // query param part_id__niew + var qrPartIDNiew string + + if o.PartIDNiew != nil { + qrPartIDNiew = *o.PartIDNiew + } + qPartIDNiew := qrPartIDNiew + if qPartIDNiew != "" { + + if err := r.SetQueryParam("part_id__niew", qPartIDNiew); err != nil { + return err + } + } + } + + if o.PartIDNisw != nil { + + // query param part_id__nisw + var qrPartIDNisw string + + if o.PartIDNisw != nil { + qrPartIDNisw = *o.PartIDNisw + } + qPartIDNisw := qrPartIDNisw + if qPartIDNisw != "" { + + if err := r.SetQueryParam("part_id__nisw", qPartIDNisw); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Role != nil { + + // query param role + var qrRole string + + if o.Role != nil { + qrRole = *o.Role + } + qRole := qrRole + if qRole != "" { + + if err := r.SetQueryParam("role", qRole); err != nil { + return err + } + } + } + + if o.Rolen != nil { + + // query param role__n + var qrRolen string + + if o.Rolen != nil { + qrRolen = *o.Rolen + } + qRolen := qrRolen + if qRolen != "" { + + if err := r.SetQueryParam("role__n", qRolen); err != nil { + return err + } + } + } + + if o.RoleID != nil { + + // query param role_id + var qrRoleID string + + if o.RoleID != nil { + qrRoleID = *o.RoleID + } + qRoleID := qrRoleID + if qRoleID != "" { + + if err := r.SetQueryParam("role_id", qRoleID); err != nil { + return err + } + } + } + + if o.RoleIDn != nil { + + // query param role_id__n + var qrRoleIDn string + + if o.RoleIDn != nil { + qrRoleIDn = *o.RoleIDn + } + qRoleIDn := qrRoleIDn + if qRoleIDn != "" { + + if err := r.SetQueryParam("role_id__n", qRoleIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_list_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_list_responses.go new file mode 100644 index 000000000..e740a32bb --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_list_responses.go @@ -0,0 +1,247 @@ +// 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" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesListReader is a Reader for the DcimInventoryItemTemplatesList structure. +type DcimInventoryItemTemplatesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemTemplatesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesListOK creates a DcimInventoryItemTemplatesListOK with default headers values +func NewDcimInventoryItemTemplatesListOK() *DcimInventoryItemTemplatesListOK { + return &DcimInventoryItemTemplatesListOK{} +} + +/* DcimInventoryItemTemplatesListOK describes a response with status code 200, with default header values. + +DcimInventoryItemTemplatesListOK dcim inventory item templates list o k +*/ +type DcimInventoryItemTemplatesListOK struct { + Payload *DcimInventoryItemTemplatesListOKBody +} + +func (o *DcimInventoryItemTemplatesListOK) Error() string { + return fmt.Sprintf("[GET /dcim/inventory-item-templates/][%d] dcimInventoryItemTemplatesListOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemTemplatesListOK) GetPayload() *DcimInventoryItemTemplatesListOKBody { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimInventoryItemTemplatesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*DcimInventoryItemTemplatesListOKBody dcim inventory item templates list o k body +swagger:model DcimInventoryItemTemplatesListOKBody +*/ +type DcimInventoryItemTemplatesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.InventoryItemTemplate `json:"results"` +} + +// Validate validates this dcim inventory item templates list o k body +func (o *DcimInventoryItemTemplatesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimInventoryItemTemplatesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimInventoryItemTemplatesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimInventoryItemTemplatesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimInventoryItemTemplatesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimInventoryItemTemplatesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimInventoryItemTemplatesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimInventoryItemTemplatesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimInventoryItemTemplatesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimInventoryItemTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInventoryItemTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim inventory item templates list o k body based on the context it is used +func (o *DcimInventoryItemTemplatesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimInventoryItemTemplatesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimInventoryItemTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInventoryItemTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimInventoryItemTemplatesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimInventoryItemTemplatesListOKBody) UnmarshalBinary(b []byte) error { + var res DcimInventoryItemTemplatesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_partial_update_parameters.go new file mode 100644 index 000000000..a1a7eb88d --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemTemplatesPartialUpdateParams creates a new DcimInventoryItemTemplatesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesPartialUpdateParams() *DcimInventoryItemTemplatesPartialUpdateParams { + return &DcimInventoryItemTemplatesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesPartialUpdateParamsWithTimeout creates a new DcimInventoryItemTemplatesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesPartialUpdateParams { + return &DcimInventoryItemTemplatesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesPartialUpdateParamsWithContext creates a new DcimInventoryItemTemplatesPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesPartialUpdateParams { + return &DcimInventoryItemTemplatesPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimInventoryItemTemplatesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesPartialUpdateParams { + return &DcimInventoryItemTemplatesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesPartialUpdateParams struct { + + // Data. + Data *models.WritableInventoryItemTemplate + + /* ID. + + A unique integer value identifying this inventory item template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WithDefaults() *DcimInventoryItemTemplatesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WithData(data *models.WritableInventoryItemTemplate) *DcimInventoryItemTemplatesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) SetData(data *models.WritableInventoryItemTemplate) { + o.Data = data +} + +// WithID adds the id to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WithID(id int64) *DcimInventoryItemTemplatesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item templates partial update params +func (o *DcimInventoryItemTemplatesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_inventory_item_templates_partial_update_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_partial_update_responses.go new file mode 100644 index 000000000..62a2fec54 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesPartialUpdateReader is a Reader for the DcimInventoryItemTemplatesPartialUpdate structure. +type DcimInventoryItemTemplatesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemTemplatesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesPartialUpdateOK creates a DcimInventoryItemTemplatesPartialUpdateOK with default headers values +func NewDcimInventoryItemTemplatesPartialUpdateOK() *DcimInventoryItemTemplatesPartialUpdateOK { + return &DcimInventoryItemTemplatesPartialUpdateOK{} +} + +/* DcimInventoryItemTemplatesPartialUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemTemplatesPartialUpdateOK dcim inventory item templates partial update o k +*/ +type DcimInventoryItemTemplatesPartialUpdateOK struct { + Payload *models.InventoryItemTemplate +} + +func (o *DcimInventoryItemTemplatesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/inventory-item-templates/{id}/][%d] dcimInventoryItemTemplatesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemTemplatesPartialUpdateOK) GetPayload() *models.InventoryItemTemplate { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_read_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_read_parameters.go new file mode 100644 index 000000000..23b4dc604 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_read_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimInventoryItemTemplatesReadParams creates a new DcimInventoryItemTemplatesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesReadParams() *DcimInventoryItemTemplatesReadParams { + return &DcimInventoryItemTemplatesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesReadParamsWithTimeout creates a new DcimInventoryItemTemplatesReadParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesReadParams { + return &DcimInventoryItemTemplatesReadParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesReadParamsWithContext creates a new DcimInventoryItemTemplatesReadParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesReadParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesReadParams { + return &DcimInventoryItemTemplatesReadParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesReadParamsWithHTTPClient creates a new DcimInventoryItemTemplatesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesReadParams { + return &DcimInventoryItemTemplatesReadParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesReadParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates read operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesReadParams struct { + + /* ID. + + A unique integer value identifying this inventory item template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesReadParams) WithDefaults() *DcimInventoryItemTemplatesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) WithID(id int64) *DcimInventoryItemTemplatesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item templates read params +func (o *DcimInventoryItemTemplatesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesReadParams) 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/netbox/client/dcim/dcim_inventory_item_templates_read_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_read_responses.go new file mode 100644 index 000000000..163380f76 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_read_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesReadReader is a Reader for the DcimInventoryItemTemplatesRead structure. +type DcimInventoryItemTemplatesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemTemplatesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesReadOK creates a DcimInventoryItemTemplatesReadOK with default headers values +func NewDcimInventoryItemTemplatesReadOK() *DcimInventoryItemTemplatesReadOK { + return &DcimInventoryItemTemplatesReadOK{} +} + +/* DcimInventoryItemTemplatesReadOK describes a response with status code 200, with default header values. + +DcimInventoryItemTemplatesReadOK dcim inventory item templates read o k +*/ +type DcimInventoryItemTemplatesReadOK struct { + Payload *models.InventoryItemTemplate +} + +func (o *DcimInventoryItemTemplatesReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/inventory-item-templates/{id}/][%d] dcimInventoryItemTemplatesReadOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemTemplatesReadOK) GetPayload() *models.InventoryItemTemplate { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_item_templates_update_parameters.go b/netbox/client/dcim/dcim_inventory_item_templates_update_parameters.go new file mode 100644 index 000000000..66afdf10c --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimInventoryItemTemplatesUpdateParams creates a new DcimInventoryItemTemplatesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimInventoryItemTemplatesUpdateParams() *DcimInventoryItemTemplatesUpdateParams { + return &DcimInventoryItemTemplatesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimInventoryItemTemplatesUpdateParamsWithTimeout creates a new DcimInventoryItemTemplatesUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimInventoryItemTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesUpdateParams { + return &DcimInventoryItemTemplatesUpdateParams{ + timeout: timeout, + } +} + +// NewDcimInventoryItemTemplatesUpdateParamsWithContext creates a new DcimInventoryItemTemplatesUpdateParams object +// with the ability to set a context for a request. +func NewDcimInventoryItemTemplatesUpdateParamsWithContext(ctx context.Context) *DcimInventoryItemTemplatesUpdateParams { + return &DcimInventoryItemTemplatesUpdateParams{ + Context: ctx, + } +} + +// NewDcimInventoryItemTemplatesUpdateParamsWithHTTPClient creates a new DcimInventoryItemTemplatesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimInventoryItemTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesUpdateParams { + return &DcimInventoryItemTemplatesUpdateParams{ + HTTPClient: client, + } +} + +/* DcimInventoryItemTemplatesUpdateParams contains all the parameters to send to the API endpoint + for the dcim inventory item templates update operation. + + Typically these are written to a http.Request. +*/ +type DcimInventoryItemTemplatesUpdateParams struct { + + // Data. + Data *models.WritableInventoryItemTemplate + + /* ID. + + A unique integer value identifying this inventory item template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim inventory item templates update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesUpdateParams) WithDefaults() *DcimInventoryItemTemplatesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim inventory item templates update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimInventoryItemTemplatesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimInventoryItemTemplatesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) WithContext(ctx context.Context) *DcimInventoryItemTemplatesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimInventoryItemTemplatesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) WithData(data *models.WritableInventoryItemTemplate) *DcimInventoryItemTemplatesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) SetData(data *models.WritableInventoryItemTemplate) { + o.Data = data +} + +// WithID adds the id to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) WithID(id int64) *DcimInventoryItemTemplatesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim inventory item templates update params +func (o *DcimInventoryItemTemplatesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimInventoryItemTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_inventory_item_templates_update_responses.go b/netbox/client/dcim/dcim_inventory_item_templates_update_responses.go new file mode 100644 index 000000000..94be3b780 --- /dev/null +++ b/netbox/client/dcim/dcim_inventory_item_templates_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimInventoryItemTemplatesUpdateReader is a Reader for the DcimInventoryItemTemplatesUpdate structure. +type DcimInventoryItemTemplatesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimInventoryItemTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimInventoryItemTemplatesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimInventoryItemTemplatesUpdateOK creates a DcimInventoryItemTemplatesUpdateOK with default headers values +func NewDcimInventoryItemTemplatesUpdateOK() *DcimInventoryItemTemplatesUpdateOK { + return &DcimInventoryItemTemplatesUpdateOK{} +} + +/* DcimInventoryItemTemplatesUpdateOK describes a response with status code 200, with default header values. + +DcimInventoryItemTemplatesUpdateOK dcim inventory item templates update o k +*/ +type DcimInventoryItemTemplatesUpdateOK struct { + Payload *models.InventoryItemTemplate +} + +func (o *DcimInventoryItemTemplatesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/inventory-item-templates/{id}/][%d] dcimInventoryItemTemplatesUpdateOK %+v", 200, o.Payload) +} +func (o *DcimInventoryItemTemplatesUpdateOK) GetPayload() *models.InventoryItemTemplate { + return o.Payload +} + +func (o *DcimInventoryItemTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.InventoryItemTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_inventory_items_list_parameters.go b/netbox/client/dcim/dcim_inventory_items_list_parameters.go index bc2b0fd83..97dcd8698 100644 --- a/netbox/client/dcim/dcim_inventory_items_list_parameters.go +++ b/netbox/client/dcim/dcim_inventory_items_list_parameters.go @@ -78,9 +78,6 @@ type DcimInventoryItemsListParams struct { // AssetTag. AssetTag *string - // AssetTagEmpty. - AssetTagEmpty *string - // AssetTagIc. AssetTagIc *string @@ -108,6 +105,30 @@ type DcimInventoryItemsListParams struct { // AssetTagNisw. AssetTagNisw *string + // ComponentID. + ComponentID *string + + // ComponentIDGt. + ComponentIDGt *string + + // ComponentIDGte. + ComponentIDGte *string + + // ComponentIDLt. + ComponentIDLt *string + + // ComponentIDLte. + ComponentIDLte *string + + // ComponentIDn. + ComponentIDn *string + + // ComponentType. + ComponentType *string + + // ComponentTypen. + ComponentTypen *string + // Created. Created *string @@ -153,9 +174,6 @@ type DcimInventoryItemsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -225,9 +243,6 @@ type DcimInventoryItemsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -270,9 +285,6 @@ type DcimInventoryItemsListParams struct { // PartID. PartID *string - // PartIDEmpty. - PartIDEmpty *string - // PartIDIc. PartIDIc *string @@ -315,6 +327,18 @@ type DcimInventoryItemsListParams struct { // RegionIDn. RegionIDn *string + // Role. + Role *string + + // Rolen. + Rolen *string + + // RoleID. + RoleID *string + + // RoleIDn. + RoleIDn *string + // Serial. Serial *string @@ -348,6 +372,18 @@ type DcimInventoryItemsListParams struct { // Tagn. Tagn *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -412,17 +448,6 @@ func (o *DcimInventoryItemsListParams) SetAssetTag(assetTag *string) { o.AssetTag = assetTag } -// WithAssetTagEmpty adds the assetTagEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) WithAssetTagEmpty(assetTagEmpty *string) *DcimInventoryItemsListParams { - o.SetAssetTagEmpty(assetTagEmpty) - return o -} - -// SetAssetTagEmpty adds the assetTagEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) SetAssetTagEmpty(assetTagEmpty *string) { - o.AssetTagEmpty = assetTagEmpty -} - // WithAssetTagIc adds the assetTagIc to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithAssetTagIc(assetTagIc *string) *DcimInventoryItemsListParams { o.SetAssetTagIc(assetTagIc) @@ -522,6 +547,94 @@ func (o *DcimInventoryItemsListParams) SetAssetTagNisw(assetTagNisw *string) { o.AssetTagNisw = assetTagNisw } +// WithComponentID adds the componentID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentID(componentID *string) *DcimInventoryItemsListParams { + o.SetComponentID(componentID) + return o +} + +// SetComponentID adds the componentId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentID(componentID *string) { + o.ComponentID = componentID +} + +// WithComponentIDGt adds the componentIDGt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentIDGt(componentIDGt *string) *DcimInventoryItemsListParams { + o.SetComponentIDGt(componentIDGt) + return o +} + +// SetComponentIDGt adds the componentIdGt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentIDGt(componentIDGt *string) { + o.ComponentIDGt = componentIDGt +} + +// WithComponentIDGte adds the componentIDGte to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentIDGte(componentIDGte *string) *DcimInventoryItemsListParams { + o.SetComponentIDGte(componentIDGte) + return o +} + +// SetComponentIDGte adds the componentIdGte to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentIDGte(componentIDGte *string) { + o.ComponentIDGte = componentIDGte +} + +// WithComponentIDLt adds the componentIDLt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentIDLt(componentIDLt *string) *DcimInventoryItemsListParams { + o.SetComponentIDLt(componentIDLt) + return o +} + +// SetComponentIDLt adds the componentIdLt to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentIDLt(componentIDLt *string) { + o.ComponentIDLt = componentIDLt +} + +// WithComponentIDLte adds the componentIDLte to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentIDLte(componentIDLte *string) *DcimInventoryItemsListParams { + o.SetComponentIDLte(componentIDLte) + return o +} + +// SetComponentIDLte adds the componentIdLte to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentIDLte(componentIDLte *string) { + o.ComponentIDLte = componentIDLte +} + +// WithComponentIDn adds the componentIDn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentIDn(componentIDn *string) *DcimInventoryItemsListParams { + o.SetComponentIDn(componentIDn) + return o +} + +// SetComponentIDn adds the componentIdN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentIDn(componentIDn *string) { + o.ComponentIDn = componentIDn +} + +// WithComponentType adds the componentType to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentType(componentType *string) *DcimInventoryItemsListParams { + o.SetComponentType(componentType) + return o +} + +// SetComponentType adds the componentType to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentType(componentType *string) { + o.ComponentType = componentType +} + +// WithComponentTypen adds the componentTypen to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithComponentTypen(componentTypen *string) *DcimInventoryItemsListParams { + o.SetComponentTypen(componentTypen) + return o +} + +// SetComponentTypen adds the componentTypeN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetComponentTypen(componentTypen *string) { + o.ComponentTypen = componentTypen +} + // WithCreated adds the created to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithCreated(created *string) *DcimInventoryItemsListParams { o.SetCreated(created) @@ -687,17 +800,6 @@ func (o *DcimInventoryItemsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) WithLabelEmpty(labelEmpty *string) *DcimInventoryItemsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithLabelIc(labelIc *string) *DcimInventoryItemsListParams { o.SetLabelIc(labelIc) @@ -940,17 +1042,6 @@ func (o *DcimInventoryItemsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) WithNameEmpty(nameEmpty *string) *DcimInventoryItemsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithNameIc(nameIc *string) *DcimInventoryItemsListParams { o.SetNameIc(nameIc) @@ -1094,17 +1185,6 @@ func (o *DcimInventoryItemsListParams) SetPartID(partID *string) { o.PartID = partID } -// WithPartIDEmpty adds the partIDEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) WithPartIDEmpty(partIDEmpty *string) *DcimInventoryItemsListParams { - o.SetPartIDEmpty(partIDEmpty) - return o -} - -// SetPartIDEmpty adds the partIdEmpty to the dcim inventory items list params -func (o *DcimInventoryItemsListParams) SetPartIDEmpty(partIDEmpty *string) { - o.PartIDEmpty = partIDEmpty -} - // WithPartIDIc adds the partIDIc to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithPartIDIc(partIDIc *string) *DcimInventoryItemsListParams { o.SetPartIDIc(partIDIc) @@ -1259,6 +1339,50 @@ func (o *DcimInventoryItemsListParams) SetRegionIDn(regionIDn *string) { o.RegionIDn = regionIDn } +// WithRole adds the role to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRole(role *string) *DcimInventoryItemsListParams { + o.SetRole(role) + return o +} + +// SetRole adds the role to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRole(role *string) { + o.Role = role +} + +// WithRolen adds the rolen to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRolen(rolen *string) *DcimInventoryItemsListParams { + o.SetRolen(rolen) + return o +} + +// SetRolen adds the roleN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRolen(rolen *string) { + o.Rolen = rolen +} + +// WithRoleID adds the roleID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRoleID(roleID *string) *DcimInventoryItemsListParams { + o.SetRoleID(roleID) + return o +} + +// SetRoleID adds the roleId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRoleID(roleID *string) { + o.RoleID = roleID +} + +// WithRoleIDn adds the roleIDn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithRoleIDn(roleIDn *string) *DcimInventoryItemsListParams { + o.SetRoleIDn(roleIDn) + return o +} + +// SetRoleIDn adds the roleIdN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetRoleIDn(roleIDn *string) { + o.RoleIDn = roleIDn +} + // WithSerial adds the serial to the dcim inventory items list params func (o *DcimInventoryItemsListParams) WithSerial(serial *string) *DcimInventoryItemsListParams { o.SetSerial(serial) @@ -1380,6 +1504,50 @@ func (o *DcimInventoryItemsListParams) SetTagn(tagn *string) { o.Tagn = tagn } +// WithVirtualChassis adds the virtualChassis to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithVirtualChassis(virtualChassis *string) *DcimInventoryItemsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimInventoryItemsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimInventoryItemsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimInventoryItemsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim inventory items list params +func (o *DcimInventoryItemsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1405,23 +1573,6 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.AssetTagEmpty != nil { - - // query param asset_tag__empty - var qrAssetTagEmpty string - - if o.AssetTagEmpty != nil { - qrAssetTagEmpty = *o.AssetTagEmpty - } - qAssetTagEmpty := qrAssetTagEmpty - if qAssetTagEmpty != "" { - - if err := r.SetQueryParam("asset_tag__empty", qAssetTagEmpty); err != nil { - return err - } - } - } - if o.AssetTagIc != nil { // query param asset_tag__ic @@ -1575,6 +1726,142 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.ComponentID != nil { + + // query param component_id + var qrComponentID string + + if o.ComponentID != nil { + qrComponentID = *o.ComponentID + } + qComponentID := qrComponentID + if qComponentID != "" { + + if err := r.SetQueryParam("component_id", qComponentID); err != nil { + return err + } + } + } + + if o.ComponentIDGt != nil { + + // query param component_id__gt + var qrComponentIDGt string + + if o.ComponentIDGt != nil { + qrComponentIDGt = *o.ComponentIDGt + } + qComponentIDGt := qrComponentIDGt + if qComponentIDGt != "" { + + if err := r.SetQueryParam("component_id__gt", qComponentIDGt); err != nil { + return err + } + } + } + + if o.ComponentIDGte != nil { + + // query param component_id__gte + var qrComponentIDGte string + + if o.ComponentIDGte != nil { + qrComponentIDGte = *o.ComponentIDGte + } + qComponentIDGte := qrComponentIDGte + if qComponentIDGte != "" { + + if err := r.SetQueryParam("component_id__gte", qComponentIDGte); err != nil { + return err + } + } + } + + if o.ComponentIDLt != nil { + + // query param component_id__lt + var qrComponentIDLt string + + if o.ComponentIDLt != nil { + qrComponentIDLt = *o.ComponentIDLt + } + qComponentIDLt := qrComponentIDLt + if qComponentIDLt != "" { + + if err := r.SetQueryParam("component_id__lt", qComponentIDLt); err != nil { + return err + } + } + } + + if o.ComponentIDLte != nil { + + // query param component_id__lte + var qrComponentIDLte string + + if o.ComponentIDLte != nil { + qrComponentIDLte = *o.ComponentIDLte + } + qComponentIDLte := qrComponentIDLte + if qComponentIDLte != "" { + + if err := r.SetQueryParam("component_id__lte", qComponentIDLte); err != nil { + return err + } + } + } + + if o.ComponentIDn != nil { + + // query param component_id__n + var qrComponentIDn string + + if o.ComponentIDn != nil { + qrComponentIDn = *o.ComponentIDn + } + qComponentIDn := qrComponentIDn + if qComponentIDn != "" { + + if err := r.SetQueryParam("component_id__n", qComponentIDn); err != nil { + return err + } + } + } + + if o.ComponentType != nil { + + // query param component_type + var qrComponentType string + + if o.ComponentType != nil { + qrComponentType = *o.ComponentType + } + qComponentType := qrComponentType + if qComponentType != "" { + + if err := r.SetQueryParam("component_type", qComponentType); err != nil { + return err + } + } + } + + if o.ComponentTypen != nil { + + // query param component_type__n + var qrComponentTypen string + + if o.ComponentTypen != nil { + qrComponentTypen = *o.ComponentTypen + } + qComponentTypen := qrComponentTypen + if qComponentTypen != "" { + + if err := r.SetQueryParam("component_type__n", qComponentTypen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1830,23 +2117,6 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -2221,23 +2491,6 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -2459,23 +2712,6 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.PartIDEmpty != nil { - - // query param part_id__empty - var qrPartIDEmpty string - - if o.PartIDEmpty != nil { - qrPartIDEmpty = *o.PartIDEmpty - } - qPartIDEmpty := qrPartIDEmpty - if qPartIDEmpty != "" { - - if err := r.SetQueryParam("part_id__empty", qPartIDEmpty); err != nil { - return err - } - } - } - if o.PartIDIc != nil { // query param part_id__ic @@ -2714,6 +2950,74 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Role != nil { + + // query param role + var qrRole string + + if o.Role != nil { + qrRole = *o.Role + } + qRole := qrRole + if qRole != "" { + + if err := r.SetQueryParam("role", qRole); err != nil { + return err + } + } + } + + if o.Rolen != nil { + + // query param role__n + var qrRolen string + + if o.Rolen != nil { + qrRolen = *o.Rolen + } + qRolen := qrRolen + if qRolen != "" { + + if err := r.SetQueryParam("role__n", qRolen); err != nil { + return err + } + } + } + + if o.RoleID != nil { + + // query param role_id + var qrRoleID string + + if o.RoleID != nil { + qrRoleID = *o.RoleID + } + qRoleID := qrRoleID + if qRoleID != "" { + + if err := r.SetQueryParam("role_id", qRoleID); err != nil { + return err + } + } + } + + if o.RoleIDn != nil { + + // query param role_id__n + var qrRoleIDn string + + if o.RoleIDn != nil { + qrRoleIDn = *o.RoleIDn + } + qRoleIDn := qrRoleIDn + if qRoleIDn != "" { + + if err := r.SetQueryParam("role_id__n", qRoleIDn); err != nil { + return err + } + } + } + if o.Serial != nil { // query param serial @@ -2901,6 +3205,74 @@ func (o *DcimInventoryItemsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_inventory_items_list_responses.go b/netbox/client/dcim/dcim_inventory_items_list_responses.go index 71c05ce9b..a52149fcb 100644 --- a/netbox/client/dcim/dcim_inventory_items_list_responses.go +++ b/netbox/client/dcim/dcim_inventory_items_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimInventoryItemsListOKBody) validateResults(formats strfmt.Registry) if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimInventoryItemsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInventoryItemsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimInventoryItemsListOKBody) contextValidateResults(ctx context.Contex if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimInventoryItemsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimInventoryItemsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_locations_list_parameters.go b/netbox/client/dcim/dcim_locations_list_parameters.go index 29b3fa19c..7cd16508f 100644 --- a/netbox/client/dcim/dcim_locations_list_parameters.go +++ b/netbox/client/dcim/dcim_locations_list_parameters.go @@ -75,6 +75,18 @@ func NewDcimLocationsListParamsWithHTTPClient(client *http.Client) *DcimLocation */ type DcimLocationsListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -87,9 +99,6 @@ type DcimLocationsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +162,6 @@ type DcimLocationsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -243,9 +249,6 @@ type DcimLocationsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -273,6 +276,36 @@ type DcimLocationsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // Tenant. + Tenant *string + + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + + // TenantID. + TenantID *string + + // TenantIDn. + TenantIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -326,6 +359,50 @@ func (o *DcimLocationsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the dcim locations list params +func (o *DcimLocationsListParams) WithContact(contact *string) *DcimLocationsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim locations list params +func (o *DcimLocationsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim locations list params +func (o *DcimLocationsListParams) WithContactn(contactn *string) *DcimLocationsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim locations list params +func (o *DcimLocationsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim locations list params +func (o *DcimLocationsListParams) WithContactRole(contactRole *string) *DcimLocationsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim locations list params +func (o *DcimLocationsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim locations list params +func (o *DcimLocationsListParams) WithContactRolen(contactRolen *string) *DcimLocationsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim locations list params +func (o *DcimLocationsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim locations list params func (o *DcimLocationsListParams) WithCreated(created *string) *DcimLocationsListParams { o.SetCreated(created) @@ -370,17 +447,6 @@ func (o *DcimLocationsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim locations list params -func (o *DcimLocationsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimLocationsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim locations list params -func (o *DcimLocationsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim locations list params func (o *DcimLocationsListParams) WithDescriptionIc(descriptionIc *string) *DcimLocationsListParams { o.SetDescriptionIc(descriptionIc) @@ -601,17 +667,6 @@ func (o *DcimLocationsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim locations list params -func (o *DcimLocationsListParams) WithNameEmpty(nameEmpty *string) *DcimLocationsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim locations list params -func (o *DcimLocationsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim locations list params func (o *DcimLocationsListParams) WithNameIc(nameIc *string) *DcimLocationsListParams { o.SetNameIc(nameIc) @@ -920,17 +975,6 @@ func (o *DcimLocationsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim locations list params -func (o *DcimLocationsListParams) WithSlugEmpty(slugEmpty *string) *DcimLocationsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim locations list params -func (o *DcimLocationsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim locations list params func (o *DcimLocationsListParams) WithSlugIc(slugIc *string) *DcimLocationsListParams { o.SetSlugIc(slugIc) @@ -1030,6 +1074,116 @@ func (o *DcimLocationsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim locations list params +func (o *DcimLocationsListParams) WithTag(tag *string) *DcimLocationsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim locations list params +func (o *DcimLocationsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim locations list params +func (o *DcimLocationsListParams) WithTagn(tagn *string) *DcimLocationsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim locations list params +func (o *DcimLocationsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithTenant adds the tenant to the dcim locations list params +func (o *DcimLocationsListParams) WithTenant(tenant *string) *DcimLocationsListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the dcim locations list params +func (o *DcimLocationsListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantn adds the tenantn to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantn(tenantn *string) *DcimLocationsListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantGroup(tenantGroup *string) *DcimLocationsListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantGroupn(tenantGroupn *string) *DcimLocationsListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantGroupID(tenantGroupID *string) *DcimLocationsListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantGroupIDn(tenantGroupIDn *string) *DcimLocationsListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + +// WithTenantID adds the tenantID to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantID(tenantID *string) *DcimLocationsListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WithTenantIDn adds the tenantIDn to the dcim locations list params +func (o *DcimLocationsListParams) WithTenantIDn(tenantIDn *string) *DcimLocationsListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the dcim locations list params +func (o *DcimLocationsListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1038,6 +1192,74 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1106,23 +1328,6 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1463,23 +1668,6 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1956,23 +2144,6 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -2126,6 +2297,176 @@ func (o *DcimLocationsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + 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 + var qrTenant string + + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + } + + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + } + + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_locations_list_responses.go b/netbox/client/dcim/dcim_locations_list_responses.go index e43720c74..7765cb68e 100644 --- a/netbox/client/dcim/dcim_locations_list_responses.go +++ b/netbox/client/dcim/dcim_locations_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimLocationsListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimLocationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimLocationsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimLocationsListOKBody) contextValidateResults(ctx context.Context, fo if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimLocationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimLocationsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_manufacturers_list_parameters.go b/netbox/client/dcim/dcim_manufacturers_list_parameters.go index f8e2d2f9c..83bc9cc8a 100644 --- a/netbox/client/dcim/dcim_manufacturers_list_parameters.go +++ b/netbox/client/dcim/dcim_manufacturers_list_parameters.go @@ -75,6 +75,18 @@ func NewDcimManufacturersListParamsWithHTTPClient(client *http.Client) *DcimManu */ type DcimManufacturersListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -87,9 +99,6 @@ type DcimManufacturersListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +162,6 @@ type DcimManufacturersListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -195,9 +201,6 @@ type DcimManufacturersListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -225,6 +228,12 @@ type DcimManufacturersListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -278,6 +287,50 @@ func (o *DcimManufacturersListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithContact(contact *string) *DcimManufacturersListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithContactn(contactn *string) *DcimManufacturersListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithContactRole(contactRole *string) *DcimManufacturersListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithContactRolen(contactRolen *string) *DcimManufacturersListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithCreated(created *string) *DcimManufacturersListParams { o.SetCreated(created) @@ -322,17 +375,6 @@ func (o *DcimManufacturersListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim manufacturers list params -func (o *DcimManufacturersListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimManufacturersListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim manufacturers list params -func (o *DcimManufacturersListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithDescriptionIc(descriptionIc *string) *DcimManufacturersListParams { o.SetDescriptionIc(descriptionIc) @@ -553,17 +595,6 @@ func (o *DcimManufacturersListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim manufacturers list params -func (o *DcimManufacturersListParams) WithNameEmpty(nameEmpty *string) *DcimManufacturersListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim manufacturers list params -func (o *DcimManufacturersListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithNameIc(nameIc *string) *DcimManufacturersListParams { o.SetNameIc(nameIc) @@ -696,17 +727,6 @@ func (o *DcimManufacturersListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim manufacturers list params -func (o *DcimManufacturersListParams) WithSlugEmpty(slugEmpty *string) *DcimManufacturersListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim manufacturers list params -func (o *DcimManufacturersListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim manufacturers list params func (o *DcimManufacturersListParams) WithSlugIc(slugIc *string) *DcimManufacturersListParams { o.SetSlugIc(slugIc) @@ -806,6 +826,28 @@ func (o *DcimManufacturersListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithTag(tag *string) *DcimManufacturersListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim manufacturers list params +func (o *DcimManufacturersListParams) WithTagn(tagn *string) *DcimManufacturersListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim manufacturers list params +func (o *DcimManufacturersListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -814,6 +856,74 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -882,23 +992,6 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1239,23 +1332,6 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1460,23 +1536,6 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1630,6 +1689,40 @@ func (o *DcimManufacturersListParams) WriteToRequest(r runtime.ClientRequest, re } } + 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/netbox/client/dcim/dcim_manufacturers_list_responses.go b/netbox/client/dcim/dcim_manufacturers_list_responses.go index 3b1a0b14c..c063da540 100644 --- a/netbox/client/dcim/dcim_manufacturers_list_responses.go +++ b/netbox/client/dcim/dcim_manufacturers_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimManufacturersListOKBody) validateResults(formats strfmt.Registry) e if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimManufacturersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimManufacturersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimManufacturersListOKBody) contextValidateResults(ctx context.Context if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimManufacturersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimManufacturersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_module_bay_templates_bulk_delete_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_bulk_delete_parameters.go new file mode 100644 index 000000000..75fbaac20 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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" +) + +// NewDcimModuleBayTemplatesBulkDeleteParams creates a new DcimModuleBayTemplatesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesBulkDeleteParams() *DcimModuleBayTemplatesBulkDeleteParams { + return &DcimModuleBayTemplatesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesBulkDeleteParamsWithTimeout creates a new DcimModuleBayTemplatesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesBulkDeleteParams { + return &DcimModuleBayTemplatesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesBulkDeleteParamsWithContext creates a new DcimModuleBayTemplatesBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesBulkDeleteParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesBulkDeleteParams { + return &DcimModuleBayTemplatesBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesBulkDeleteParamsWithHTTPClient creates a new DcimModuleBayTemplatesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesBulkDeleteParams { + return &DcimModuleBayTemplatesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesBulkDeleteParams contains all the parameters to send to the API endpoint + for the dcim module bay templates bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesBulkDeleteParams) WithDefaults() *DcimModuleBayTemplatesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates bulk delete params +func (o *DcimModuleBayTemplatesBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates bulk delete params +func (o *DcimModuleBayTemplatesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates bulk delete params +func (o *DcimModuleBayTemplatesBulkDeleteParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates bulk delete params +func (o *DcimModuleBayTemplatesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates bulk delete params +func (o *DcimModuleBayTemplatesBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates bulk delete params +func (o *DcimModuleBayTemplatesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesBulkDeleteParams) 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/netbox/client/dcim/dcim_module_bay_templates_bulk_delete_responses.go b/netbox/client/dcim/dcim_module_bay_templates_bulk_delete_responses.go new file mode 100644 index 000000000..2ecdac81d --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModuleBayTemplatesBulkDeleteReader is a Reader for the DcimModuleBayTemplatesBulkDelete structure. +type DcimModuleBayTemplatesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModuleBayTemplatesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesBulkDeleteNoContent creates a DcimModuleBayTemplatesBulkDeleteNoContent with default headers values +func NewDcimModuleBayTemplatesBulkDeleteNoContent() *DcimModuleBayTemplatesBulkDeleteNoContent { + return &DcimModuleBayTemplatesBulkDeleteNoContent{} +} + +/* DcimModuleBayTemplatesBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimModuleBayTemplatesBulkDeleteNoContent dcim module bay templates bulk delete no content +*/ +type DcimModuleBayTemplatesBulkDeleteNoContent struct { +} + +func (o *DcimModuleBayTemplatesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/module-bay-templates/][%d] dcimModuleBayTemplatesBulkDeleteNoContent ", 204) +} + +func (o *DcimModuleBayTemplatesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_parameters.go new file mode 100644 index 000000000..831db356e --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBayTemplatesBulkPartialUpdateParams creates a new DcimModuleBayTemplatesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesBulkPartialUpdateParams() *DcimModuleBayTemplatesBulkPartialUpdateParams { + return &DcimModuleBayTemplatesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesBulkPartialUpdateParamsWithTimeout creates a new DcimModuleBayTemplatesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesBulkPartialUpdateParams { + return &DcimModuleBayTemplatesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesBulkPartialUpdateParamsWithContext creates a new DcimModuleBayTemplatesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesBulkPartialUpdateParams { + return &DcimModuleBayTemplatesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesBulkPartialUpdateParamsWithHTTPClient creates a new DcimModuleBayTemplatesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesBulkPartialUpdateParams { + return &DcimModuleBayTemplatesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bay templates bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableModuleBayTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) WithDefaults() *DcimModuleBayTemplatesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) WithData(data *models.WritableModuleBayTemplate) *DcimModuleBayTemplatesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bay templates bulk partial update params +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) SetData(data *models.WritableModuleBayTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_responses.go b/netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_responses.go new file mode 100644 index 000000000..f0f0b3694 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesBulkPartialUpdateReader is a Reader for the DcimModuleBayTemplatesBulkPartialUpdate structure. +type DcimModuleBayTemplatesBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBayTemplatesBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesBulkPartialUpdateOK creates a DcimModuleBayTemplatesBulkPartialUpdateOK with default headers values +func NewDcimModuleBayTemplatesBulkPartialUpdateOK() *DcimModuleBayTemplatesBulkPartialUpdateOK { + return &DcimModuleBayTemplatesBulkPartialUpdateOK{} +} + +/* DcimModuleBayTemplatesBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBayTemplatesBulkPartialUpdateOK dcim module bay templates bulk partial update o k +*/ +type DcimModuleBayTemplatesBulkPartialUpdateOK struct { + Payload *models.ModuleBayTemplate +} + +func (o *DcimModuleBayTemplatesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/module-bay-templates/][%d] dcimModuleBayTemplatesBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBayTemplatesBulkPartialUpdateOK) GetPayload() *models.ModuleBayTemplate { + return o.Payload +} + +func (o *DcimModuleBayTemplatesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBayTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_bulk_update_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_bulk_update_parameters.go new file mode 100644 index 000000000..809055001 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBayTemplatesBulkUpdateParams creates a new DcimModuleBayTemplatesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesBulkUpdateParams() *DcimModuleBayTemplatesBulkUpdateParams { + return &DcimModuleBayTemplatesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesBulkUpdateParamsWithTimeout creates a new DcimModuleBayTemplatesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesBulkUpdateParams { + return &DcimModuleBayTemplatesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesBulkUpdateParamsWithContext creates a new DcimModuleBayTemplatesBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesBulkUpdateParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesBulkUpdateParams { + return &DcimModuleBayTemplatesBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesBulkUpdateParamsWithHTTPClient creates a new DcimModuleBayTemplatesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesBulkUpdateParams { + return &DcimModuleBayTemplatesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesBulkUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bay templates bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesBulkUpdateParams struct { + + // Data. + Data *models.WritableModuleBayTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesBulkUpdateParams) WithDefaults() *DcimModuleBayTemplatesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) WithData(data *models.WritableModuleBayTemplate) *DcimModuleBayTemplatesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bay templates bulk update params +func (o *DcimModuleBayTemplatesBulkUpdateParams) SetData(data *models.WritableModuleBayTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_bulk_update_responses.go b/netbox/client/dcim/dcim_module_bay_templates_bulk_update_responses.go new file mode 100644 index 000000000..c95af432a --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesBulkUpdateReader is a Reader for the DcimModuleBayTemplatesBulkUpdate structure. +type DcimModuleBayTemplatesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBayTemplatesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesBulkUpdateOK creates a DcimModuleBayTemplatesBulkUpdateOK with default headers values +func NewDcimModuleBayTemplatesBulkUpdateOK() *DcimModuleBayTemplatesBulkUpdateOK { + return &DcimModuleBayTemplatesBulkUpdateOK{} +} + +/* DcimModuleBayTemplatesBulkUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBayTemplatesBulkUpdateOK dcim module bay templates bulk update o k +*/ +type DcimModuleBayTemplatesBulkUpdateOK struct { + Payload *models.ModuleBayTemplate +} + +func (o *DcimModuleBayTemplatesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/module-bay-templates/][%d] dcimModuleBayTemplatesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBayTemplatesBulkUpdateOK) GetPayload() *models.ModuleBayTemplate { + return o.Payload +} + +func (o *DcimModuleBayTemplatesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBayTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_create_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_create_parameters.go new file mode 100644 index 000000000..ecab83a3d --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_create_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBayTemplatesCreateParams creates a new DcimModuleBayTemplatesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesCreateParams() *DcimModuleBayTemplatesCreateParams { + return &DcimModuleBayTemplatesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesCreateParamsWithTimeout creates a new DcimModuleBayTemplatesCreateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesCreateParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesCreateParams { + return &DcimModuleBayTemplatesCreateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesCreateParamsWithContext creates a new DcimModuleBayTemplatesCreateParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesCreateParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesCreateParams { + return &DcimModuleBayTemplatesCreateParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesCreateParamsWithHTTPClient creates a new DcimModuleBayTemplatesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesCreateParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesCreateParams { + return &DcimModuleBayTemplatesCreateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesCreateParams contains all the parameters to send to the API endpoint + for the dcim module bay templates create operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesCreateParams struct { + + // Data. + Data *models.WritableModuleBayTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesCreateParams) WithDefaults() *DcimModuleBayTemplatesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) WithData(data *models.WritableModuleBayTemplate) *DcimModuleBayTemplatesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bay templates create params +func (o *DcimModuleBayTemplatesCreateParams) SetData(data *models.WritableModuleBayTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_create_responses.go b/netbox/client/dcim/dcim_module_bay_templates_create_responses.go new file mode 100644 index 000000000..f1d4430cc --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_create_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesCreateReader is a Reader for the DcimModuleBayTemplatesCreate structure. +type DcimModuleBayTemplatesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimModuleBayTemplatesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesCreateCreated creates a DcimModuleBayTemplatesCreateCreated with default headers values +func NewDcimModuleBayTemplatesCreateCreated() *DcimModuleBayTemplatesCreateCreated { + return &DcimModuleBayTemplatesCreateCreated{} +} + +/* DcimModuleBayTemplatesCreateCreated describes a response with status code 201, with default header values. + +DcimModuleBayTemplatesCreateCreated dcim module bay templates create created +*/ +type DcimModuleBayTemplatesCreateCreated struct { + Payload *models.ModuleBayTemplate +} + +func (o *DcimModuleBayTemplatesCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/module-bay-templates/][%d] dcimModuleBayTemplatesCreateCreated %+v", 201, o.Payload) +} +func (o *DcimModuleBayTemplatesCreateCreated) GetPayload() *models.ModuleBayTemplate { + return o.Payload +} + +func (o *DcimModuleBayTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBayTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_delete_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_delete_parameters.go new file mode 100644 index 000000000..298d9635d --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_delete_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModuleBayTemplatesDeleteParams creates a new DcimModuleBayTemplatesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesDeleteParams() *DcimModuleBayTemplatesDeleteParams { + return &DcimModuleBayTemplatesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesDeleteParamsWithTimeout creates a new DcimModuleBayTemplatesDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesDeleteParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesDeleteParams { + return &DcimModuleBayTemplatesDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesDeleteParamsWithContext creates a new DcimModuleBayTemplatesDeleteParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesDeleteParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesDeleteParams { + return &DcimModuleBayTemplatesDeleteParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesDeleteParamsWithHTTPClient creates a new DcimModuleBayTemplatesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesDeleteParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesDeleteParams { + return &DcimModuleBayTemplatesDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesDeleteParams contains all the parameters to send to the API endpoint + for the dcim module bay templates delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesDeleteParams struct { + + /* ID. + + A unique integer value identifying this module bay template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesDeleteParams) WithDefaults() *DcimModuleBayTemplatesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) WithID(id int64) *DcimModuleBayTemplatesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bay templates delete params +func (o *DcimModuleBayTemplatesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesDeleteParams) 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/netbox/client/dcim/dcim_module_bay_templates_delete_responses.go b/netbox/client/dcim/dcim_module_bay_templates_delete_responses.go new file mode 100644 index 000000000..7403a0037 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModuleBayTemplatesDeleteReader is a Reader for the DcimModuleBayTemplatesDelete structure. +type DcimModuleBayTemplatesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModuleBayTemplatesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesDeleteNoContent creates a DcimModuleBayTemplatesDeleteNoContent with default headers values +func NewDcimModuleBayTemplatesDeleteNoContent() *DcimModuleBayTemplatesDeleteNoContent { + return &DcimModuleBayTemplatesDeleteNoContent{} +} + +/* DcimModuleBayTemplatesDeleteNoContent describes a response with status code 204, with default header values. + +DcimModuleBayTemplatesDeleteNoContent dcim module bay templates delete no content +*/ +type DcimModuleBayTemplatesDeleteNoContent struct { +} + +func (o *DcimModuleBayTemplatesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/module-bay-templates/{id}/][%d] dcimModuleBayTemplatesDeleteNoContent ", 204) +} + +func (o *DcimModuleBayTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go new file mode 100644 index 000000000..0f4e0edd7 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_list_parameters.go @@ -0,0 +1,986 @@ +// 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" +) + +// NewDcimModuleBayTemplatesListParams creates a new DcimModuleBayTemplatesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesListParams() *DcimModuleBayTemplatesListParams { + return &DcimModuleBayTemplatesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesListParamsWithTimeout creates a new DcimModuleBayTemplatesListParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesListParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesListParams { + return &DcimModuleBayTemplatesListParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesListParamsWithContext creates a new DcimModuleBayTemplatesListParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesListParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesListParams { + return &DcimModuleBayTemplatesListParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesListParamsWithHTTPClient creates a new DcimModuleBayTemplatesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesListParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesListParams { + return &DcimModuleBayTemplatesListParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesListParams contains all the parameters to send to the API endpoint + for the dcim module bay templates list operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // DevicetypeID. + DevicetypeID *string + + // DevicetypeIDn. + DevicetypeIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesListParams) WithDefaults() *DcimModuleBayTemplatesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithCreated(created *string) *DcimModuleBayTemplatesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithCreatedGte(createdGte *string) *DcimModuleBayTemplatesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithCreatedLte(createdLte *string) *DcimModuleBayTemplatesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDevicetypeID adds the devicetypeID to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithDevicetypeID(devicetypeID *string) *DcimModuleBayTemplatesListParams { + o.SetDevicetypeID(devicetypeID) + return o +} + +// SetDevicetypeID adds the devicetypeId to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetDevicetypeID(devicetypeID *string) { + o.DevicetypeID = devicetypeID +} + +// WithDevicetypeIDn adds the devicetypeIDn to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithDevicetypeIDn(devicetypeIDn *string) *DcimModuleBayTemplatesListParams { + o.SetDevicetypeIDn(devicetypeIDn) + return o +} + +// SetDevicetypeIDn adds the devicetypeIdN to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetDevicetypeIDn(devicetypeIDn *string) { + o.DevicetypeIDn = devicetypeIDn +} + +// WithID adds the id to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithID(id *string) *DcimModuleBayTemplatesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithIDGt(iDGt *string) *DcimModuleBayTemplatesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithIDGte(iDGte *string) *DcimModuleBayTemplatesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithIDLt(iDLt *string) *DcimModuleBayTemplatesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithIDLte(iDLte *string) *DcimModuleBayTemplatesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithIDn(iDn *string) *DcimModuleBayTemplatesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLastUpdated(lastUpdated *string) *DcimModuleBayTemplatesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModuleBayTemplatesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModuleBayTemplatesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithLimit(limit *int64) *DcimModuleBayTemplatesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithName(name *string) *DcimModuleBayTemplatesListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameIc(nameIc *string) *DcimModuleBayTemplatesListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameIe(nameIe *string) *DcimModuleBayTemplatesListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameIew(nameIew *string) *DcimModuleBayTemplatesListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameIsw(nameIsw *string) *DcimModuleBayTemplatesListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNamen(namen *string) *DcimModuleBayTemplatesListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameNic(nameNic *string) *DcimModuleBayTemplatesListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameNie(nameNie *string) *DcimModuleBayTemplatesListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameNiew(nameNiew *string) *DcimModuleBayTemplatesListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithNameNisw(nameNisw *string) *DcimModuleBayTemplatesListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithOffset(offset *int64) *DcimModuleBayTemplatesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) WithQ(q *string) *DcimModuleBayTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim module bay templates list params +func (o *DcimModuleBayTemplatesListParams) SetQ(q *string) { + o.Q = q +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.DevicetypeID != nil { + + // query param devicetype_id + var qrDevicetypeID string + + if o.DevicetypeID != nil { + qrDevicetypeID = *o.DevicetypeID + } + qDevicetypeID := qrDevicetypeID + if qDevicetypeID != "" { + + if err := r.SetQueryParam("devicetype_id", qDevicetypeID); err != nil { + return err + } + } + } + + if o.DevicetypeIDn != nil { + + // query param devicetype_id__n + var qrDevicetypeIDn string + + if o.DevicetypeIDn != nil { + qrDevicetypeIDn = *o.DevicetypeIDn + } + qDevicetypeIDn := qrDevicetypeIDn + if qDevicetypeIDn != "" { + + if err := r.SetQueryParam("devicetype_id__n", qDevicetypeIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_list_responses.go b/netbox/client/dcim/dcim_module_bay_templates_list_responses.go new file mode 100644 index 000000000..269c7f38b --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_list_responses.go @@ -0,0 +1,247 @@ +// 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" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesListReader is a Reader for the DcimModuleBayTemplatesList structure. +type DcimModuleBayTemplatesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBayTemplatesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesListOK creates a DcimModuleBayTemplatesListOK with default headers values +func NewDcimModuleBayTemplatesListOK() *DcimModuleBayTemplatesListOK { + return &DcimModuleBayTemplatesListOK{} +} + +/* DcimModuleBayTemplatesListOK describes a response with status code 200, with default header values. + +DcimModuleBayTemplatesListOK dcim module bay templates list o k +*/ +type DcimModuleBayTemplatesListOK struct { + Payload *DcimModuleBayTemplatesListOKBody +} + +func (o *DcimModuleBayTemplatesListOK) Error() string { + return fmt.Sprintf("[GET /dcim/module-bay-templates/][%d] dcimModuleBayTemplatesListOK %+v", 200, o.Payload) +} +func (o *DcimModuleBayTemplatesListOK) GetPayload() *DcimModuleBayTemplatesListOKBody { + return o.Payload +} + +func (o *DcimModuleBayTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimModuleBayTemplatesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*DcimModuleBayTemplatesListOKBody dcim module bay templates list o k body +swagger:model DcimModuleBayTemplatesListOKBody +*/ +type DcimModuleBayTemplatesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ModuleBayTemplate `json:"results"` +} + +// Validate validates this dcim module bay templates list o k body +func (o *DcimModuleBayTemplatesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModuleBayTemplatesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimModuleBayTemplatesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleBayTemplatesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimModuleBayTemplatesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleBayTemplatesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimModuleBayTemplatesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleBayTemplatesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimModuleBayTemplatesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModuleBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModuleBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim module bay templates list o k body based on the context it is used +func (o *DcimModuleBayTemplatesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModuleBayTemplatesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModuleBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModuleBayTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimModuleBayTemplatesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimModuleBayTemplatesListOKBody) UnmarshalBinary(b []byte) error { + var res DcimModuleBayTemplatesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_partial_update_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_partial_update_parameters.go new file mode 100644 index 000000000..96bf37c54 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBayTemplatesPartialUpdateParams creates a new DcimModuleBayTemplatesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesPartialUpdateParams() *DcimModuleBayTemplatesPartialUpdateParams { + return &DcimModuleBayTemplatesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesPartialUpdateParamsWithTimeout creates a new DcimModuleBayTemplatesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesPartialUpdateParams { + return &DcimModuleBayTemplatesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesPartialUpdateParamsWithContext creates a new DcimModuleBayTemplatesPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesPartialUpdateParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesPartialUpdateParams { + return &DcimModuleBayTemplatesPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesPartialUpdateParamsWithHTTPClient creates a new DcimModuleBayTemplatesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesPartialUpdateParams { + return &DcimModuleBayTemplatesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bay templates partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesPartialUpdateParams struct { + + // Data. + Data *models.WritableModuleBayTemplate + + /* ID. + + A unique integer value identifying this module bay template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesPartialUpdateParams) WithDefaults() *DcimModuleBayTemplatesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) WithData(data *models.WritableModuleBayTemplate) *DcimModuleBayTemplatesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) SetData(data *models.WritableModuleBayTemplate) { + o.Data = data +} + +// WithID adds the id to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) WithID(id int64) *DcimModuleBayTemplatesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bay templates partial update params +func (o *DcimModuleBayTemplatesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_module_bay_templates_partial_update_responses.go b/netbox/client/dcim/dcim_module_bay_templates_partial_update_responses.go new file mode 100644 index 000000000..edf32d9ab --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesPartialUpdateReader is a Reader for the DcimModuleBayTemplatesPartialUpdate structure. +type DcimModuleBayTemplatesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBayTemplatesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesPartialUpdateOK creates a DcimModuleBayTemplatesPartialUpdateOK with default headers values +func NewDcimModuleBayTemplatesPartialUpdateOK() *DcimModuleBayTemplatesPartialUpdateOK { + return &DcimModuleBayTemplatesPartialUpdateOK{} +} + +/* DcimModuleBayTemplatesPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBayTemplatesPartialUpdateOK dcim module bay templates partial update o k +*/ +type DcimModuleBayTemplatesPartialUpdateOK struct { + Payload *models.ModuleBayTemplate +} + +func (o *DcimModuleBayTemplatesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/module-bay-templates/{id}/][%d] dcimModuleBayTemplatesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBayTemplatesPartialUpdateOK) GetPayload() *models.ModuleBayTemplate { + return o.Payload +} + +func (o *DcimModuleBayTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBayTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_read_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_read_parameters.go new file mode 100644 index 000000000..b2cdaa92b --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_read_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModuleBayTemplatesReadParams creates a new DcimModuleBayTemplatesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesReadParams() *DcimModuleBayTemplatesReadParams { + return &DcimModuleBayTemplatesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesReadParamsWithTimeout creates a new DcimModuleBayTemplatesReadParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesReadParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesReadParams { + return &DcimModuleBayTemplatesReadParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesReadParamsWithContext creates a new DcimModuleBayTemplatesReadParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesReadParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesReadParams { + return &DcimModuleBayTemplatesReadParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesReadParamsWithHTTPClient creates a new DcimModuleBayTemplatesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesReadParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesReadParams { + return &DcimModuleBayTemplatesReadParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesReadParams contains all the parameters to send to the API endpoint + for the dcim module bay templates read operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesReadParams struct { + + /* ID. + + A unique integer value identifying this module bay template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesReadParams) WithDefaults() *DcimModuleBayTemplatesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) WithID(id int64) *DcimModuleBayTemplatesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bay templates read params +func (o *DcimModuleBayTemplatesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesReadParams) 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/netbox/client/dcim/dcim_module_bay_templates_read_responses.go b/netbox/client/dcim/dcim_module_bay_templates_read_responses.go new file mode 100644 index 000000000..a0709be46 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_read_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesReadReader is a Reader for the DcimModuleBayTemplatesRead structure. +type DcimModuleBayTemplatesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBayTemplatesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesReadOK creates a DcimModuleBayTemplatesReadOK with default headers values +func NewDcimModuleBayTemplatesReadOK() *DcimModuleBayTemplatesReadOK { + return &DcimModuleBayTemplatesReadOK{} +} + +/* DcimModuleBayTemplatesReadOK describes a response with status code 200, with default header values. + +DcimModuleBayTemplatesReadOK dcim module bay templates read o k +*/ +type DcimModuleBayTemplatesReadOK struct { + Payload *models.ModuleBayTemplate +} + +func (o *DcimModuleBayTemplatesReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/module-bay-templates/{id}/][%d] dcimModuleBayTemplatesReadOK %+v", 200, o.Payload) +} +func (o *DcimModuleBayTemplatesReadOK) GetPayload() *models.ModuleBayTemplate { + return o.Payload +} + +func (o *DcimModuleBayTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBayTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bay_templates_update_parameters.go b/netbox/client/dcim/dcim_module_bay_templates_update_parameters.go new file mode 100644 index 000000000..29469c456 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBayTemplatesUpdateParams creates a new DcimModuleBayTemplatesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBayTemplatesUpdateParams() *DcimModuleBayTemplatesUpdateParams { + return &DcimModuleBayTemplatesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBayTemplatesUpdateParamsWithTimeout creates a new DcimModuleBayTemplatesUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBayTemplatesUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBayTemplatesUpdateParams { + return &DcimModuleBayTemplatesUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBayTemplatesUpdateParamsWithContext creates a new DcimModuleBayTemplatesUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBayTemplatesUpdateParamsWithContext(ctx context.Context) *DcimModuleBayTemplatesUpdateParams { + return &DcimModuleBayTemplatesUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBayTemplatesUpdateParamsWithHTTPClient creates a new DcimModuleBayTemplatesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBayTemplatesUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBayTemplatesUpdateParams { + return &DcimModuleBayTemplatesUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBayTemplatesUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bay templates update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBayTemplatesUpdateParams struct { + + // Data. + Data *models.WritableModuleBayTemplate + + /* ID. + + A unique integer value identifying this module bay template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bay templates update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesUpdateParams) WithDefaults() *DcimModuleBayTemplatesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bay templates update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBayTemplatesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBayTemplatesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) WithContext(ctx context.Context) *DcimModuleBayTemplatesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBayTemplatesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) WithData(data *models.WritableModuleBayTemplate) *DcimModuleBayTemplatesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) SetData(data *models.WritableModuleBayTemplate) { + o.Data = data +} + +// WithID adds the id to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) WithID(id int64) *DcimModuleBayTemplatesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bay templates update params +func (o *DcimModuleBayTemplatesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBayTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_module_bay_templates_update_responses.go b/netbox/client/dcim/dcim_module_bay_templates_update_responses.go new file mode 100644 index 000000000..234180c2b --- /dev/null +++ b/netbox/client/dcim/dcim_module_bay_templates_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBayTemplatesUpdateReader is a Reader for the DcimModuleBayTemplatesUpdate structure. +type DcimModuleBayTemplatesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBayTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBayTemplatesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBayTemplatesUpdateOK creates a DcimModuleBayTemplatesUpdateOK with default headers values +func NewDcimModuleBayTemplatesUpdateOK() *DcimModuleBayTemplatesUpdateOK { + return &DcimModuleBayTemplatesUpdateOK{} +} + +/* DcimModuleBayTemplatesUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBayTemplatesUpdateOK dcim module bay templates update o k +*/ +type DcimModuleBayTemplatesUpdateOK struct { + Payload *models.ModuleBayTemplate +} + +func (o *DcimModuleBayTemplatesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/module-bay-templates/{id}/][%d] dcimModuleBayTemplatesUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBayTemplatesUpdateOK) GetPayload() *models.ModuleBayTemplate { + return o.Payload +} + +func (o *DcimModuleBayTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBayTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_bulk_delete_parameters.go b/netbox/client/dcim/dcim_module_bays_bulk_delete_parameters.go new file mode 100644 index 000000000..cb795fd36 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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" +) + +// NewDcimModuleBaysBulkDeleteParams creates a new DcimModuleBaysBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysBulkDeleteParams() *DcimModuleBaysBulkDeleteParams { + return &DcimModuleBaysBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysBulkDeleteParamsWithTimeout creates a new DcimModuleBaysBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimModuleBaysBulkDeleteParams { + return &DcimModuleBaysBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysBulkDeleteParamsWithContext creates a new DcimModuleBaysBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysBulkDeleteParamsWithContext(ctx context.Context) *DcimModuleBaysBulkDeleteParams { + return &DcimModuleBaysBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysBulkDeleteParamsWithHTTPClient creates a new DcimModuleBaysBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimModuleBaysBulkDeleteParams { + return &DcimModuleBaysBulkDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysBulkDeleteParams contains all the parameters to send to the API endpoint + for the dcim module bays bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysBulkDeleteParams) WithDefaults() *DcimModuleBaysBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays bulk delete params +func (o *DcimModuleBaysBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimModuleBaysBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays bulk delete params +func (o *DcimModuleBaysBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays bulk delete params +func (o *DcimModuleBaysBulkDeleteParams) WithContext(ctx context.Context) *DcimModuleBaysBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays bulk delete params +func (o *DcimModuleBaysBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays bulk delete params +func (o *DcimModuleBaysBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimModuleBaysBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays bulk delete params +func (o *DcimModuleBaysBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysBulkDeleteParams) 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/netbox/client/dcim/dcim_module_bays_bulk_delete_responses.go b/netbox/client/dcim/dcim_module_bays_bulk_delete_responses.go new file mode 100644 index 000000000..5dd470459 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModuleBaysBulkDeleteReader is a Reader for the DcimModuleBaysBulkDelete structure. +type DcimModuleBaysBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModuleBaysBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysBulkDeleteNoContent creates a DcimModuleBaysBulkDeleteNoContent with default headers values +func NewDcimModuleBaysBulkDeleteNoContent() *DcimModuleBaysBulkDeleteNoContent { + return &DcimModuleBaysBulkDeleteNoContent{} +} + +/* DcimModuleBaysBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimModuleBaysBulkDeleteNoContent dcim module bays bulk delete no content +*/ +type DcimModuleBaysBulkDeleteNoContent struct { +} + +func (o *DcimModuleBaysBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/module-bays/][%d] dcimModuleBaysBulkDeleteNoContent ", 204) +} + +func (o *DcimModuleBaysBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_bulk_partial_update_parameters.go b/netbox/client/dcim/dcim_module_bays_bulk_partial_update_parameters.go new file mode 100644 index 000000000..8b21544f1 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBaysBulkPartialUpdateParams creates a new DcimModuleBaysBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysBulkPartialUpdateParams() *DcimModuleBaysBulkPartialUpdateParams { + return &DcimModuleBaysBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysBulkPartialUpdateParamsWithTimeout creates a new DcimModuleBaysBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBaysBulkPartialUpdateParams { + return &DcimModuleBaysBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysBulkPartialUpdateParamsWithContext creates a new DcimModuleBaysBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimModuleBaysBulkPartialUpdateParams { + return &DcimModuleBaysBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysBulkPartialUpdateParamsWithHTTPClient creates a new DcimModuleBaysBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBaysBulkPartialUpdateParams { + return &DcimModuleBaysBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bays bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableModuleBay + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysBulkPartialUpdateParams) WithDefaults() *DcimModuleBaysBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBaysBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimModuleBaysBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBaysBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) WithData(data *models.WritableModuleBay) *DcimModuleBaysBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bays bulk partial update params +func (o *DcimModuleBaysBulkPartialUpdateParams) SetData(data *models.WritableModuleBay) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_bulk_partial_update_responses.go b/netbox/client/dcim/dcim_module_bays_bulk_partial_update_responses.go new file mode 100644 index 000000000..76881a9bd --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysBulkPartialUpdateReader is a Reader for the DcimModuleBaysBulkPartialUpdate structure. +type DcimModuleBaysBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBaysBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysBulkPartialUpdateOK creates a DcimModuleBaysBulkPartialUpdateOK with default headers values +func NewDcimModuleBaysBulkPartialUpdateOK() *DcimModuleBaysBulkPartialUpdateOK { + return &DcimModuleBaysBulkPartialUpdateOK{} +} + +/* DcimModuleBaysBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBaysBulkPartialUpdateOK dcim module bays bulk partial update o k +*/ +type DcimModuleBaysBulkPartialUpdateOK struct { + Payload *models.ModuleBay +} + +func (o *DcimModuleBaysBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/module-bays/][%d] dcimModuleBaysBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBaysBulkPartialUpdateOK) GetPayload() *models.ModuleBay { + return o.Payload +} + +func (o *DcimModuleBaysBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBay) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_bulk_update_parameters.go b/netbox/client/dcim/dcim_module_bays_bulk_update_parameters.go new file mode 100644 index 000000000..b8efdacda --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBaysBulkUpdateParams creates a new DcimModuleBaysBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysBulkUpdateParams() *DcimModuleBaysBulkUpdateParams { + return &DcimModuleBaysBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysBulkUpdateParamsWithTimeout creates a new DcimModuleBaysBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBaysBulkUpdateParams { + return &DcimModuleBaysBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysBulkUpdateParamsWithContext creates a new DcimModuleBaysBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysBulkUpdateParamsWithContext(ctx context.Context) *DcimModuleBaysBulkUpdateParams { + return &DcimModuleBaysBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysBulkUpdateParamsWithHTTPClient creates a new DcimModuleBaysBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBaysBulkUpdateParams { + return &DcimModuleBaysBulkUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysBulkUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bays bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysBulkUpdateParams struct { + + // Data. + Data *models.WritableModuleBay + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysBulkUpdateParams) WithDefaults() *DcimModuleBaysBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBaysBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) WithContext(ctx context.Context) *DcimModuleBaysBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBaysBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) WithData(data *models.WritableModuleBay) *DcimModuleBaysBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bays bulk update params +func (o *DcimModuleBaysBulkUpdateParams) SetData(data *models.WritableModuleBay) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_bulk_update_responses.go b/netbox/client/dcim/dcim_module_bays_bulk_update_responses.go new file mode 100644 index 000000000..d87370257 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysBulkUpdateReader is a Reader for the DcimModuleBaysBulkUpdate structure. +type DcimModuleBaysBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBaysBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysBulkUpdateOK creates a DcimModuleBaysBulkUpdateOK with default headers values +func NewDcimModuleBaysBulkUpdateOK() *DcimModuleBaysBulkUpdateOK { + return &DcimModuleBaysBulkUpdateOK{} +} + +/* DcimModuleBaysBulkUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBaysBulkUpdateOK dcim module bays bulk update o k +*/ +type DcimModuleBaysBulkUpdateOK struct { + Payload *models.ModuleBay +} + +func (o *DcimModuleBaysBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/module-bays/][%d] dcimModuleBaysBulkUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBaysBulkUpdateOK) GetPayload() *models.ModuleBay { + return o.Payload +} + +func (o *DcimModuleBaysBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBay) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_create_parameters.go b/netbox/client/dcim/dcim_module_bays_create_parameters.go new file mode 100644 index 000000000..618563689 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_create_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBaysCreateParams creates a new DcimModuleBaysCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysCreateParams() *DcimModuleBaysCreateParams { + return &DcimModuleBaysCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysCreateParamsWithTimeout creates a new DcimModuleBaysCreateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysCreateParamsWithTimeout(timeout time.Duration) *DcimModuleBaysCreateParams { + return &DcimModuleBaysCreateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysCreateParamsWithContext creates a new DcimModuleBaysCreateParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysCreateParamsWithContext(ctx context.Context) *DcimModuleBaysCreateParams { + return &DcimModuleBaysCreateParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysCreateParamsWithHTTPClient creates a new DcimModuleBaysCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysCreateParamsWithHTTPClient(client *http.Client) *DcimModuleBaysCreateParams { + return &DcimModuleBaysCreateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysCreateParams contains all the parameters to send to the API endpoint + for the dcim module bays create operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysCreateParams struct { + + // Data. + Data *models.WritableModuleBay + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysCreateParams) WithDefaults() *DcimModuleBaysCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) WithTimeout(timeout time.Duration) *DcimModuleBaysCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) WithContext(ctx context.Context) *DcimModuleBaysCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) WithHTTPClient(client *http.Client) *DcimModuleBaysCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) WithData(data *models.WritableModuleBay) *DcimModuleBaysCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bays create params +func (o *DcimModuleBaysCreateParams) SetData(data *models.WritableModuleBay) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_create_responses.go b/netbox/client/dcim/dcim_module_bays_create_responses.go new file mode 100644 index 000000000..6507d0865 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_create_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysCreateReader is a Reader for the DcimModuleBaysCreate structure. +type DcimModuleBaysCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimModuleBaysCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysCreateCreated creates a DcimModuleBaysCreateCreated with default headers values +func NewDcimModuleBaysCreateCreated() *DcimModuleBaysCreateCreated { + return &DcimModuleBaysCreateCreated{} +} + +/* DcimModuleBaysCreateCreated describes a response with status code 201, with default header values. + +DcimModuleBaysCreateCreated dcim module bays create created +*/ +type DcimModuleBaysCreateCreated struct { + Payload *models.ModuleBay +} + +func (o *DcimModuleBaysCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/module-bays/][%d] dcimModuleBaysCreateCreated %+v", 201, o.Payload) +} +func (o *DcimModuleBaysCreateCreated) GetPayload() *models.ModuleBay { + return o.Payload +} + +func (o *DcimModuleBaysCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBay) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_delete_parameters.go b/netbox/client/dcim/dcim_module_bays_delete_parameters.go new file mode 100644 index 000000000..08a21c4ba --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_delete_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModuleBaysDeleteParams creates a new DcimModuleBaysDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysDeleteParams() *DcimModuleBaysDeleteParams { + return &DcimModuleBaysDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysDeleteParamsWithTimeout creates a new DcimModuleBaysDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysDeleteParamsWithTimeout(timeout time.Duration) *DcimModuleBaysDeleteParams { + return &DcimModuleBaysDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysDeleteParamsWithContext creates a new DcimModuleBaysDeleteParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysDeleteParamsWithContext(ctx context.Context) *DcimModuleBaysDeleteParams { + return &DcimModuleBaysDeleteParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysDeleteParamsWithHTTPClient creates a new DcimModuleBaysDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysDeleteParamsWithHTTPClient(client *http.Client) *DcimModuleBaysDeleteParams { + return &DcimModuleBaysDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysDeleteParams contains all the parameters to send to the API endpoint + for the dcim module bays delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysDeleteParams struct { + + /* ID. + + A unique integer value identifying this module bay. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysDeleteParams) WithDefaults() *DcimModuleBaysDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) WithTimeout(timeout time.Duration) *DcimModuleBaysDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) WithContext(ctx context.Context) *DcimModuleBaysDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) WithHTTPClient(client *http.Client) *DcimModuleBaysDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) WithID(id int64) *DcimModuleBaysDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bays delete params +func (o *DcimModuleBaysDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysDeleteParams) 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/netbox/client/dcim/dcim_module_bays_delete_responses.go b/netbox/client/dcim/dcim_module_bays_delete_responses.go new file mode 100644 index 000000000..b01b2876a --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModuleBaysDeleteReader is a Reader for the DcimModuleBaysDelete structure. +type DcimModuleBaysDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModuleBaysDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysDeleteNoContent creates a DcimModuleBaysDeleteNoContent with default headers values +func NewDcimModuleBaysDeleteNoContent() *DcimModuleBaysDeleteNoContent { + return &DcimModuleBaysDeleteNoContent{} +} + +/* DcimModuleBaysDeleteNoContent describes a response with status code 204, with default header values. + +DcimModuleBaysDeleteNoContent dcim module bays delete no content +*/ +type DcimModuleBaysDeleteNoContent struct { +} + +func (o *DcimModuleBaysDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/module-bays/{id}/][%d] dcimModuleBaysDeleteNoContent ", 204) +} + +func (o *DcimModuleBaysDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_list_parameters.go b/netbox/client/dcim/dcim_module_bays_list_parameters.go new file mode 100644 index 000000000..444eeaec7 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_list_parameters.go @@ -0,0 +1,2350 @@ +// 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" +) + +// NewDcimModuleBaysListParams creates a new DcimModuleBaysListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysListParams() *DcimModuleBaysListParams { + return &DcimModuleBaysListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysListParamsWithTimeout creates a new DcimModuleBaysListParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysListParamsWithTimeout(timeout time.Duration) *DcimModuleBaysListParams { + return &DcimModuleBaysListParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysListParamsWithContext creates a new DcimModuleBaysListParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysListParamsWithContext(ctx context.Context) *DcimModuleBaysListParams { + return &DcimModuleBaysListParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysListParamsWithHTTPClient creates a new DcimModuleBaysListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysListParamsWithHTTPClient(client *http.Client) *DcimModuleBaysListParams { + return &DcimModuleBaysListParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysListParams contains all the parameters to send to the API endpoint + for the dcim module bays list operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // Device. + Device *string + + // Devicen. + Devicen *string + + // DeviceID. + DeviceID *string + + // DeviceIDn. + DeviceIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // Label. + Label *string + + // LabelIc. + LabelIc *string + + // LabelIe. + LabelIe *string + + // LabelIew. + LabelIew *string + + // LabelIsw. + LabelIsw *string + + // Labeln. + Labeln *string + + // LabelNic. + LabelNic *string + + // LabelNie. + LabelNie *string + + // LabelNiew. + LabelNiew *string + + // LabelNisw. + LabelNisw *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Location. + Location *string + + // Locationn. + Locationn *string + + // LocationID. + LocationID *string + + // LocationIDn. + LocationIDn *string + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Region. + Region *string + + // Regionn. + Regionn *string + + // RegionID. + RegionID *string + + // RegionIDn. + RegionIDn *string + + // Site. + Site *string + + // Siten. + Siten *string + + // SiteGroup. + SiteGroup *string + + // SiteGroupn. + SiteGroupn *string + + // SiteGroupID. + SiteGroupID *string + + // SiteGroupIDn. + SiteGroupIDn *string + + // SiteID. + SiteID *string + + // SiteIDn. + SiteIDn *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysListParams) WithDefaults() *DcimModuleBaysListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithTimeout(timeout time.Duration) *DcimModuleBaysListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithContext(ctx context.Context) *DcimModuleBaysListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithHTTPClient(client *http.Client) *DcimModuleBaysListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithCreated(created *string) *DcimModuleBaysListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithCreatedGte(createdGte *string) *DcimModuleBaysListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithCreatedLte(createdLte *string) *DcimModuleBaysListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescription(description *string) *DcimModuleBaysListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionIc(descriptionIc *string) *DcimModuleBaysListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionIe(descriptionIe *string) *DcimModuleBaysListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionIew(descriptionIew *string) *DcimModuleBaysListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionIsw(descriptionIsw *string) *DcimModuleBaysListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionn(descriptionn *string) *DcimModuleBaysListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionNic(descriptionNic *string) *DcimModuleBaysListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionNie(descriptionNie *string) *DcimModuleBaysListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionNiew(descriptionNiew *string) *DcimModuleBaysListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDescriptionNisw(descriptionNisw *string) *DcimModuleBaysListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithDevice adds the device to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDevice(device *string) *DcimModuleBaysListParams { + o.SetDevice(device) + return o +} + +// SetDevice adds the device to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDevice(device *string) { + o.Device = device +} + +// WithDevicen adds the devicen to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDevicen(devicen *string) *DcimModuleBaysListParams { + o.SetDevicen(devicen) + return o +} + +// SetDevicen adds the deviceN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDevicen(devicen *string) { + o.Devicen = devicen +} + +// WithDeviceID adds the deviceID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDeviceID(deviceID *string) *DcimModuleBaysListParams { + o.SetDeviceID(deviceID) + return o +} + +// SetDeviceID adds the deviceId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDeviceID(deviceID *string) { + o.DeviceID = deviceID +} + +// WithDeviceIDn adds the deviceIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithDeviceIDn(deviceIDn *string) *DcimModuleBaysListParams { + o.SetDeviceIDn(deviceIDn) + return o +} + +// SetDeviceIDn adds the deviceIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetDeviceIDn(deviceIDn *string) { + o.DeviceIDn = deviceIDn +} + +// WithID adds the id to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithID(id *string) *DcimModuleBaysListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithIDGt(iDGt *string) *DcimModuleBaysListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithIDGte(iDGte *string) *DcimModuleBaysListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithIDLt(iDLt *string) *DcimModuleBaysListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithIDLte(iDLte *string) *DcimModuleBaysListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithIDn(iDn *string) *DcimModuleBaysListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLabel adds the label to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabel(label *string) *DcimModuleBaysListParams { + o.SetLabel(label) + return o +} + +// SetLabel adds the label to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabel(label *string) { + o.Label = label +} + +// WithLabelIc adds the labelIc to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelIc(labelIc *string) *DcimModuleBaysListParams { + o.SetLabelIc(labelIc) + return o +} + +// SetLabelIc adds the labelIc to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelIc(labelIc *string) { + o.LabelIc = labelIc +} + +// WithLabelIe adds the labelIe to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelIe(labelIe *string) *DcimModuleBaysListParams { + o.SetLabelIe(labelIe) + return o +} + +// SetLabelIe adds the labelIe to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelIe(labelIe *string) { + o.LabelIe = labelIe +} + +// WithLabelIew adds the labelIew to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelIew(labelIew *string) *DcimModuleBaysListParams { + o.SetLabelIew(labelIew) + return o +} + +// SetLabelIew adds the labelIew to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelIew(labelIew *string) { + o.LabelIew = labelIew +} + +// WithLabelIsw adds the labelIsw to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelIsw(labelIsw *string) *DcimModuleBaysListParams { + o.SetLabelIsw(labelIsw) + return o +} + +// SetLabelIsw adds the labelIsw to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelIsw(labelIsw *string) { + o.LabelIsw = labelIsw +} + +// WithLabeln adds the labeln to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabeln(labeln *string) *DcimModuleBaysListParams { + o.SetLabeln(labeln) + return o +} + +// SetLabeln adds the labelN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabeln(labeln *string) { + o.Labeln = labeln +} + +// WithLabelNic adds the labelNic to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelNic(labelNic *string) *DcimModuleBaysListParams { + o.SetLabelNic(labelNic) + return o +} + +// SetLabelNic adds the labelNic to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelNic(labelNic *string) { + o.LabelNic = labelNic +} + +// WithLabelNie adds the labelNie to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelNie(labelNie *string) *DcimModuleBaysListParams { + o.SetLabelNie(labelNie) + return o +} + +// SetLabelNie adds the labelNie to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelNie(labelNie *string) { + o.LabelNie = labelNie +} + +// WithLabelNiew adds the labelNiew to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelNiew(labelNiew *string) *DcimModuleBaysListParams { + o.SetLabelNiew(labelNiew) + return o +} + +// SetLabelNiew adds the labelNiew to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelNiew(labelNiew *string) { + o.LabelNiew = labelNiew +} + +// WithLabelNisw adds the labelNisw to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLabelNisw(labelNisw *string) *DcimModuleBaysListParams { + o.SetLabelNisw(labelNisw) + return o +} + +// SetLabelNisw adds the labelNisw to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLabelNisw(labelNisw *string) { + o.LabelNisw = labelNisw +} + +// WithLastUpdated adds the lastUpdated to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLastUpdated(lastUpdated *string) *DcimModuleBaysListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModuleBaysListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModuleBaysListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLimit(limit *int64) *DcimModuleBaysListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithLocation adds the location to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLocation(location *string) *DcimModuleBaysListParams { + o.SetLocation(location) + return o +} + +// SetLocation adds the location to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLocation(location *string) { + o.Location = location +} + +// WithLocationn adds the locationn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLocationn(locationn *string) *DcimModuleBaysListParams { + o.SetLocationn(locationn) + return o +} + +// SetLocationn adds the locationN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLocationn(locationn *string) { + o.Locationn = locationn +} + +// WithLocationID adds the locationID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLocationID(locationID *string) *DcimModuleBaysListParams { + o.SetLocationID(locationID) + return o +} + +// SetLocationID adds the locationId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLocationID(locationID *string) { + o.LocationID = locationID +} + +// WithLocationIDn adds the locationIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithLocationIDn(locationIDn *string) *DcimModuleBaysListParams { + o.SetLocationIDn(locationIDn) + return o +} + +// SetLocationIDn adds the locationIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetLocationIDn(locationIDn *string) { + o.LocationIDn = locationIDn +} + +// WithName adds the name to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithName(name *string) *DcimModuleBaysListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameIc(nameIc *string) *DcimModuleBaysListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameIe(nameIe *string) *DcimModuleBaysListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameIew(nameIew *string) *DcimModuleBaysListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameIsw(nameIsw *string) *DcimModuleBaysListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNamen(namen *string) *DcimModuleBaysListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameNic(nameNic *string) *DcimModuleBaysListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameNie(nameNie *string) *DcimModuleBaysListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameNiew(nameNiew *string) *DcimModuleBaysListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithNameNisw(nameNisw *string) *DcimModuleBaysListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithOffset(offset *int64) *DcimModuleBaysListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithQ(q *string) *DcimModuleBaysListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetQ(q *string) { + o.Q = q +} + +// WithRegion adds the region to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRegion(region *string) *DcimModuleBaysListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRegion(region *string) { + o.Region = region +} + +// WithRegionn adds the regionn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRegionn(regionn *string) *DcimModuleBaysListParams { + o.SetRegionn(regionn) + return o +} + +// SetRegionn adds the regionN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRegionn(regionn *string) { + o.Regionn = regionn +} + +// WithRegionID adds the regionID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRegionID(regionID *string) *DcimModuleBaysListParams { + o.SetRegionID(regionID) + return o +} + +// SetRegionID adds the regionId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRegionID(regionID *string) { + o.RegionID = regionID +} + +// WithRegionIDn adds the regionIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithRegionIDn(regionIDn *string) *DcimModuleBaysListParams { + o.SetRegionIDn(regionIDn) + return o +} + +// SetRegionIDn adds the regionIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetRegionIDn(regionIDn *string) { + o.RegionIDn = regionIDn +} + +// WithSite adds the site to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSite(site *string) *DcimModuleBaysListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiten adds the siten to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiten(siten *string) *DcimModuleBaysListParams { + o.SetSiten(siten) + return o +} + +// SetSiten adds the siteN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiten(siten *string) { + o.Siten = siten +} + +// WithSiteGroup adds the siteGroup to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiteGroup(siteGroup *string) *DcimModuleBaysListParams { + o.SetSiteGroup(siteGroup) + return o +} + +// SetSiteGroup adds the siteGroup to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiteGroup(siteGroup *string) { + o.SiteGroup = siteGroup +} + +// WithSiteGroupn adds the siteGroupn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiteGroupn(siteGroupn *string) *DcimModuleBaysListParams { + o.SetSiteGroupn(siteGroupn) + return o +} + +// SetSiteGroupn adds the siteGroupN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiteGroupn(siteGroupn *string) { + o.SiteGroupn = siteGroupn +} + +// WithSiteGroupID adds the siteGroupID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiteGroupID(siteGroupID *string) *DcimModuleBaysListParams { + o.SetSiteGroupID(siteGroupID) + return o +} + +// SetSiteGroupID adds the siteGroupId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiteGroupID(siteGroupID *string) { + o.SiteGroupID = siteGroupID +} + +// WithSiteGroupIDn adds the siteGroupIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiteGroupIDn(siteGroupIDn *string) *DcimModuleBaysListParams { + o.SetSiteGroupIDn(siteGroupIDn) + return o +} + +// SetSiteGroupIDn adds the siteGroupIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiteGroupIDn(siteGroupIDn *string) { + o.SiteGroupIDn = siteGroupIDn +} + +// WithSiteID adds the siteID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiteID(siteID *string) *DcimModuleBaysListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + +// WithSiteIDn adds the siteIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithSiteIDn(siteIDn *string) *DcimModuleBaysListParams { + o.SetSiteIDn(siteIDn) + return o +} + +// SetSiteIDn adds the siteIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetSiteIDn(siteIDn *string) { + o.SiteIDn = siteIDn +} + +// WithTag adds the tag to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithTag(tag *string) *DcimModuleBaysListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithTagn(tagn *string) *DcimModuleBaysListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithVirtualChassis adds the virtualChassis to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithVirtualChassis(virtualChassis *string) *DcimModuleBaysListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithVirtualChassisn(virtualChassisn *string) *DcimModuleBaysListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithVirtualChassisID(virtualChassisID *string) *DcimModuleBaysListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim module bays list params +func (o *DcimModuleBaysListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimModuleBaysListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim module bays list params +func (o *DcimModuleBaysListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.Device != nil { + + // query param device + var qrDevice string + + if o.Device != nil { + qrDevice = *o.Device + } + qDevice := qrDevice + if qDevice != "" { + + if err := r.SetQueryParam("device", qDevice); err != nil { + return err + } + } + } + + if o.Devicen != nil { + + // query param device__n + var qrDevicen string + + if o.Devicen != nil { + qrDevicen = *o.Devicen + } + qDevicen := qrDevicen + if qDevicen != "" { + + if err := r.SetQueryParam("device__n", qDevicen); err != nil { + return err + } + } + } + + if o.DeviceID != nil { + + // query param device_id + var qrDeviceID string + + if o.DeviceID != nil { + qrDeviceID = *o.DeviceID + } + qDeviceID := qrDeviceID + if qDeviceID != "" { + + if err := r.SetQueryParam("device_id", qDeviceID); err != nil { + return err + } + } + } + + if o.DeviceIDn != nil { + + // query param device_id__n + var qrDeviceIDn string + + if o.DeviceIDn != nil { + qrDeviceIDn = *o.DeviceIDn + } + qDeviceIDn := qrDeviceIDn + if qDeviceIDn != "" { + + if err := r.SetQueryParam("device_id__n", qDeviceIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Label != nil { + + // query param label + var qrLabel string + + if o.Label != nil { + qrLabel = *o.Label + } + qLabel := qrLabel + if qLabel != "" { + + if err := r.SetQueryParam("label", qLabel); err != nil { + return err + } + } + } + + if o.LabelIc != nil { + + // query param label__ic + var qrLabelIc string + + if o.LabelIc != nil { + qrLabelIc = *o.LabelIc + } + qLabelIc := qrLabelIc + if qLabelIc != "" { + + if err := r.SetQueryParam("label__ic", qLabelIc); err != nil { + return err + } + } + } + + if o.LabelIe != nil { + + // query param label__ie + var qrLabelIe string + + if o.LabelIe != nil { + qrLabelIe = *o.LabelIe + } + qLabelIe := qrLabelIe + if qLabelIe != "" { + + if err := r.SetQueryParam("label__ie", qLabelIe); err != nil { + return err + } + } + } + + if o.LabelIew != nil { + + // query param label__iew + var qrLabelIew string + + if o.LabelIew != nil { + qrLabelIew = *o.LabelIew + } + qLabelIew := qrLabelIew + if qLabelIew != "" { + + if err := r.SetQueryParam("label__iew", qLabelIew); err != nil { + return err + } + } + } + + if o.LabelIsw != nil { + + // query param label__isw + var qrLabelIsw string + + if o.LabelIsw != nil { + qrLabelIsw = *o.LabelIsw + } + qLabelIsw := qrLabelIsw + if qLabelIsw != "" { + + if err := r.SetQueryParam("label__isw", qLabelIsw); err != nil { + return err + } + } + } + + if o.Labeln != nil { + + // query param label__n + var qrLabeln string + + if o.Labeln != nil { + qrLabeln = *o.Labeln + } + qLabeln := qrLabeln + if qLabeln != "" { + + if err := r.SetQueryParam("label__n", qLabeln); err != nil { + return err + } + } + } + + if o.LabelNic != nil { + + // query param label__nic + var qrLabelNic string + + if o.LabelNic != nil { + qrLabelNic = *o.LabelNic + } + qLabelNic := qrLabelNic + if qLabelNic != "" { + + if err := r.SetQueryParam("label__nic", qLabelNic); err != nil { + return err + } + } + } + + if o.LabelNie != nil { + + // query param label__nie + var qrLabelNie string + + if o.LabelNie != nil { + qrLabelNie = *o.LabelNie + } + qLabelNie := qrLabelNie + if qLabelNie != "" { + + if err := r.SetQueryParam("label__nie", qLabelNie); err != nil { + return err + } + } + } + + if o.LabelNiew != nil { + + // query param label__niew + var qrLabelNiew string + + if o.LabelNiew != nil { + qrLabelNiew = *o.LabelNiew + } + qLabelNiew := qrLabelNiew + if qLabelNiew != "" { + + if err := r.SetQueryParam("label__niew", qLabelNiew); err != nil { + return err + } + } + } + + if o.LabelNisw != nil { + + // query param label__nisw + var qrLabelNisw string + + if o.LabelNisw != nil { + qrLabelNisw = *o.LabelNisw + } + qLabelNisw := qrLabelNisw + if qLabelNisw != "" { + + if err := r.SetQueryParam("label__nisw", qLabelNisw); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Location != nil { + + // query param location + var qrLocation string + + if o.Location != nil { + qrLocation = *o.Location + } + qLocation := qrLocation + if qLocation != "" { + + if err := r.SetQueryParam("location", qLocation); err != nil { + return err + } + } + } + + if o.Locationn != nil { + + // query param location__n + var qrLocationn string + + if o.Locationn != nil { + qrLocationn = *o.Locationn + } + qLocationn := qrLocationn + if qLocationn != "" { + + if err := r.SetQueryParam("location__n", qLocationn); err != nil { + return err + } + } + } + + if o.LocationID != nil { + + // query param location_id + var qrLocationID string + + if o.LocationID != nil { + qrLocationID = *o.LocationID + } + qLocationID := qrLocationID + if qLocationID != "" { + + if err := r.SetQueryParam("location_id", qLocationID); err != nil { + return err + } + } + } + + if o.LocationIDn != nil { + + // query param location_id__n + var qrLocationIDn string + + if o.LocationIDn != nil { + qrLocationIDn = *o.LocationIDn + } + qLocationIDn := qrLocationIDn + if qLocationIDn != "" { + + if err := r.SetQueryParam("location_id__n", qLocationIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Region != nil { + + // query param region + var qrRegion string + + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + } + + if o.Regionn != nil { + + // query param region__n + var qrRegionn string + + if o.Regionn != nil { + qrRegionn = *o.Regionn + } + qRegionn := qrRegionn + if qRegionn != "" { + + if err := r.SetQueryParam("region__n", qRegionn); err != nil { + return err + } + } + } + + if o.RegionID != nil { + + // query param region_id + var qrRegionID string + + if o.RegionID != nil { + qrRegionID = *o.RegionID + } + qRegionID := qrRegionID + if qRegionID != "" { + + if err := r.SetQueryParam("region_id", qRegionID); err != nil { + return err + } + } + } + + if o.RegionIDn != nil { + + // query param region_id__n + var qrRegionIDn string + + if o.RegionIDn != nil { + qrRegionIDn = *o.RegionIDn + } + qRegionIDn := qrRegionIDn + if qRegionIDn != "" { + + if err := r.SetQueryParam("region_id__n", qRegionIDn); err != nil { + return err + } + } + } + + if o.Site != nil { + + // query param site + var qrSite string + + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + } + + if o.Siten != nil { + + // query param site__n + var qrSiten string + + if o.Siten != nil { + qrSiten = *o.Siten + } + qSiten := qrSiten + if qSiten != "" { + + if err := r.SetQueryParam("site__n", qSiten); err != nil { + return err + } + } + } + + if o.SiteGroup != nil { + + // query param site_group + var qrSiteGroup string + + if o.SiteGroup != nil { + qrSiteGroup = *o.SiteGroup + } + qSiteGroup := qrSiteGroup + if qSiteGroup != "" { + + if err := r.SetQueryParam("site_group", qSiteGroup); err != nil { + return err + } + } + } + + if o.SiteGroupn != nil { + + // query param site_group__n + var qrSiteGroupn string + + if o.SiteGroupn != nil { + qrSiteGroupn = *o.SiteGroupn + } + qSiteGroupn := qrSiteGroupn + if qSiteGroupn != "" { + + if err := r.SetQueryParam("site_group__n", qSiteGroupn); err != nil { + return err + } + } + } + + if o.SiteGroupID != nil { + + // query param site_group_id + var qrSiteGroupID string + + if o.SiteGroupID != nil { + qrSiteGroupID = *o.SiteGroupID + } + qSiteGroupID := qrSiteGroupID + if qSiteGroupID != "" { + + if err := r.SetQueryParam("site_group_id", qSiteGroupID); err != nil { + return err + } + } + } + + if o.SiteGroupIDn != nil { + + // query param site_group_id__n + var qrSiteGroupIDn string + + if o.SiteGroupIDn != nil { + qrSiteGroupIDn = *o.SiteGroupIDn + } + qSiteGroupIDn := qrSiteGroupIDn + if qSiteGroupIDn != "" { + + if err := r.SetQueryParam("site_group_id__n", qSiteGroupIDn); err != nil { + return err + } + } + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + } + + if o.SiteIDn != nil { + + // query param site_id__n + var qrSiteIDn string + + if o.SiteIDn != nil { + qrSiteIDn = *o.SiteIDn + } + qSiteIDn := qrSiteIDn + if qSiteIDn != "" { + + if err := r.SetQueryParam("site_id__n", qSiteIDn); err != nil { + return err + } + } + } + + 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.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_list_responses.go b/netbox/client/dcim/dcim_module_bays_list_responses.go new file mode 100644 index 000000000..7c984806e --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_list_responses.go @@ -0,0 +1,247 @@ +// 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" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysListReader is a Reader for the DcimModuleBaysList structure. +type DcimModuleBaysListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBaysListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysListOK creates a DcimModuleBaysListOK with default headers values +func NewDcimModuleBaysListOK() *DcimModuleBaysListOK { + return &DcimModuleBaysListOK{} +} + +/* DcimModuleBaysListOK describes a response with status code 200, with default header values. + +DcimModuleBaysListOK dcim module bays list o k +*/ +type DcimModuleBaysListOK struct { + Payload *DcimModuleBaysListOKBody +} + +func (o *DcimModuleBaysListOK) Error() string { + return fmt.Sprintf("[GET /dcim/module-bays/][%d] dcimModuleBaysListOK %+v", 200, o.Payload) +} +func (o *DcimModuleBaysListOK) GetPayload() *DcimModuleBaysListOKBody { + return o.Payload +} + +func (o *DcimModuleBaysListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimModuleBaysListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*DcimModuleBaysListOKBody dcim module bays list o k body +swagger:model DcimModuleBaysListOKBody +*/ +type DcimModuleBaysListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ModuleBay `json:"results"` +} + +// Validate validates this dcim module bays list o k body +func (o *DcimModuleBaysListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModuleBaysListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimModuleBaysListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleBaysListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimModuleBaysListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleBaysListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimModuleBaysListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleBaysListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimModuleBaysListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModuleBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModuleBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim module bays list o k body based on the context it is used +func (o *DcimModuleBaysListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModuleBaysListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModuleBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModuleBaysListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimModuleBaysListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimModuleBaysListOKBody) UnmarshalBinary(b []byte) error { + var res DcimModuleBaysListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_partial_update_parameters.go b/netbox/client/dcim/dcim_module_bays_partial_update_parameters.go new file mode 100644 index 000000000..4e56e4390 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBaysPartialUpdateParams creates a new DcimModuleBaysPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysPartialUpdateParams() *DcimModuleBaysPartialUpdateParams { + return &DcimModuleBaysPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysPartialUpdateParamsWithTimeout creates a new DcimModuleBaysPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBaysPartialUpdateParams { + return &DcimModuleBaysPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysPartialUpdateParamsWithContext creates a new DcimModuleBaysPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysPartialUpdateParamsWithContext(ctx context.Context) *DcimModuleBaysPartialUpdateParams { + return &DcimModuleBaysPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysPartialUpdateParamsWithHTTPClient creates a new DcimModuleBaysPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBaysPartialUpdateParams { + return &DcimModuleBaysPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bays partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysPartialUpdateParams struct { + + // Data. + Data *models.WritableModuleBay + + /* ID. + + A unique integer value identifying this module bay. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysPartialUpdateParams) WithDefaults() *DcimModuleBaysPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBaysPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) WithContext(ctx context.Context) *DcimModuleBaysPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBaysPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) WithData(data *models.WritableModuleBay) *DcimModuleBaysPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) SetData(data *models.WritableModuleBay) { + o.Data = data +} + +// WithID adds the id to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) WithID(id int64) *DcimModuleBaysPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bays partial update params +func (o *DcimModuleBaysPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_module_bays_partial_update_responses.go b/netbox/client/dcim/dcim_module_bays_partial_update_responses.go new file mode 100644 index 000000000..594acb61e --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysPartialUpdateReader is a Reader for the DcimModuleBaysPartialUpdate structure. +type DcimModuleBaysPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBaysPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysPartialUpdateOK creates a DcimModuleBaysPartialUpdateOK with default headers values +func NewDcimModuleBaysPartialUpdateOK() *DcimModuleBaysPartialUpdateOK { + return &DcimModuleBaysPartialUpdateOK{} +} + +/* DcimModuleBaysPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBaysPartialUpdateOK dcim module bays partial update o k +*/ +type DcimModuleBaysPartialUpdateOK struct { + Payload *models.ModuleBay +} + +func (o *DcimModuleBaysPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/module-bays/{id}/][%d] dcimModuleBaysPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBaysPartialUpdateOK) GetPayload() *models.ModuleBay { + return o.Payload +} + +func (o *DcimModuleBaysPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBay) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_read_parameters.go b/netbox/client/dcim/dcim_module_bays_read_parameters.go new file mode 100644 index 000000000..e83473000 --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_read_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModuleBaysReadParams creates a new DcimModuleBaysReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysReadParams() *DcimModuleBaysReadParams { + return &DcimModuleBaysReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysReadParamsWithTimeout creates a new DcimModuleBaysReadParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysReadParamsWithTimeout(timeout time.Duration) *DcimModuleBaysReadParams { + return &DcimModuleBaysReadParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysReadParamsWithContext creates a new DcimModuleBaysReadParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysReadParamsWithContext(ctx context.Context) *DcimModuleBaysReadParams { + return &DcimModuleBaysReadParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysReadParamsWithHTTPClient creates a new DcimModuleBaysReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysReadParamsWithHTTPClient(client *http.Client) *DcimModuleBaysReadParams { + return &DcimModuleBaysReadParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysReadParams contains all the parameters to send to the API endpoint + for the dcim module bays read operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysReadParams struct { + + /* ID. + + A unique integer value identifying this module bay. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysReadParams) WithDefaults() *DcimModuleBaysReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays read params +func (o *DcimModuleBaysReadParams) WithTimeout(timeout time.Duration) *DcimModuleBaysReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays read params +func (o *DcimModuleBaysReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays read params +func (o *DcimModuleBaysReadParams) WithContext(ctx context.Context) *DcimModuleBaysReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays read params +func (o *DcimModuleBaysReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays read params +func (o *DcimModuleBaysReadParams) WithHTTPClient(client *http.Client) *DcimModuleBaysReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays read params +func (o *DcimModuleBaysReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim module bays read params +func (o *DcimModuleBaysReadParams) WithID(id int64) *DcimModuleBaysReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bays read params +func (o *DcimModuleBaysReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysReadParams) 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/netbox/client/dcim/dcim_module_bays_read_responses.go b/netbox/client/dcim/dcim_module_bays_read_responses.go new file mode 100644 index 000000000..a98081f4b --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_read_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysReadReader is a Reader for the DcimModuleBaysRead structure. +type DcimModuleBaysReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBaysReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysReadOK creates a DcimModuleBaysReadOK with default headers values +func NewDcimModuleBaysReadOK() *DcimModuleBaysReadOK { + return &DcimModuleBaysReadOK{} +} + +/* DcimModuleBaysReadOK describes a response with status code 200, with default header values. + +DcimModuleBaysReadOK dcim module bays read o k +*/ +type DcimModuleBaysReadOK struct { + Payload *models.ModuleBay +} + +func (o *DcimModuleBaysReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/module-bays/{id}/][%d] dcimModuleBaysReadOK %+v", 200, o.Payload) +} +func (o *DcimModuleBaysReadOK) GetPayload() *models.ModuleBay { + return o.Payload +} + +func (o *DcimModuleBaysReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBay) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_bays_update_parameters.go b/netbox/client/dcim/dcim_module_bays_update_parameters.go new file mode 100644 index 000000000..9d788e25b --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleBaysUpdateParams creates a new DcimModuleBaysUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleBaysUpdateParams() *DcimModuleBaysUpdateParams { + return &DcimModuleBaysUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleBaysUpdateParamsWithTimeout creates a new DcimModuleBaysUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleBaysUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleBaysUpdateParams { + return &DcimModuleBaysUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleBaysUpdateParamsWithContext creates a new DcimModuleBaysUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleBaysUpdateParamsWithContext(ctx context.Context) *DcimModuleBaysUpdateParams { + return &DcimModuleBaysUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleBaysUpdateParamsWithHTTPClient creates a new DcimModuleBaysUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleBaysUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleBaysUpdateParams { + return &DcimModuleBaysUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleBaysUpdateParams contains all the parameters to send to the API endpoint + for the dcim module bays update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleBaysUpdateParams struct { + + // Data. + Data *models.WritableModuleBay + + /* ID. + + A unique integer value identifying this module bay. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module bays update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysUpdateParams) WithDefaults() *DcimModuleBaysUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module bays update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleBaysUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleBaysUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) WithContext(ctx context.Context) *DcimModuleBaysUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleBaysUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) WithData(data *models.WritableModuleBay) *DcimModuleBaysUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) SetData(data *models.WritableModuleBay) { + o.Data = data +} + +// WithID adds the id to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) WithID(id int64) *DcimModuleBaysUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module bays update params +func (o *DcimModuleBaysUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleBaysUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_module_bays_update_responses.go b/netbox/client/dcim/dcim_module_bays_update_responses.go new file mode 100644 index 000000000..ae3c489ef --- /dev/null +++ b/netbox/client/dcim/dcim_module_bays_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleBaysUpdateReader is a Reader for the DcimModuleBaysUpdate structure. +type DcimModuleBaysUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleBaysUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleBaysUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleBaysUpdateOK creates a DcimModuleBaysUpdateOK with default headers values +func NewDcimModuleBaysUpdateOK() *DcimModuleBaysUpdateOK { + return &DcimModuleBaysUpdateOK{} +} + +/* DcimModuleBaysUpdateOK describes a response with status code 200, with default header values. + +DcimModuleBaysUpdateOK dcim module bays update o k +*/ +type DcimModuleBaysUpdateOK struct { + Payload *models.ModuleBay +} + +func (o *DcimModuleBaysUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/module-bays/{id}/][%d] dcimModuleBaysUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleBaysUpdateOK) GetPayload() *models.ModuleBay { + return o.Payload +} + +func (o *DcimModuleBaysUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleBay) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_bulk_delete_parameters.go b/netbox/client/dcim/dcim_module_types_bulk_delete_parameters.go new file mode 100644 index 000000000..68b67f007 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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" +) + +// NewDcimModuleTypesBulkDeleteParams creates a new DcimModuleTypesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesBulkDeleteParams() *DcimModuleTypesBulkDeleteParams { + return &DcimModuleTypesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesBulkDeleteParamsWithTimeout creates a new DcimModuleTypesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimModuleTypesBulkDeleteParams { + return &DcimModuleTypesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesBulkDeleteParamsWithContext creates a new DcimModuleTypesBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesBulkDeleteParamsWithContext(ctx context.Context) *DcimModuleTypesBulkDeleteParams { + return &DcimModuleTypesBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesBulkDeleteParamsWithHTTPClient creates a new DcimModuleTypesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimModuleTypesBulkDeleteParams { + return &DcimModuleTypesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesBulkDeleteParams contains all the parameters to send to the API endpoint + for the dcim module types bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesBulkDeleteParams) WithDefaults() *DcimModuleTypesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types bulk delete params +func (o *DcimModuleTypesBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimModuleTypesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types bulk delete params +func (o *DcimModuleTypesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types bulk delete params +func (o *DcimModuleTypesBulkDeleteParams) WithContext(ctx context.Context) *DcimModuleTypesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types bulk delete params +func (o *DcimModuleTypesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types bulk delete params +func (o *DcimModuleTypesBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimModuleTypesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types bulk delete params +func (o *DcimModuleTypesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesBulkDeleteParams) 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/netbox/client/dcim/dcim_module_types_bulk_delete_responses.go b/netbox/client/dcim/dcim_module_types_bulk_delete_responses.go new file mode 100644 index 000000000..dadff82bc --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModuleTypesBulkDeleteReader is a Reader for the DcimModuleTypesBulkDelete structure. +type DcimModuleTypesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModuleTypesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesBulkDeleteNoContent creates a DcimModuleTypesBulkDeleteNoContent with default headers values +func NewDcimModuleTypesBulkDeleteNoContent() *DcimModuleTypesBulkDeleteNoContent { + return &DcimModuleTypesBulkDeleteNoContent{} +} + +/* DcimModuleTypesBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimModuleTypesBulkDeleteNoContent dcim module types bulk delete no content +*/ +type DcimModuleTypesBulkDeleteNoContent struct { +} + +func (o *DcimModuleTypesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/module-types/][%d] dcimModuleTypesBulkDeleteNoContent ", 204) +} + +func (o *DcimModuleTypesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_bulk_partial_update_parameters.go b/netbox/client/dcim/dcim_module_types_bulk_partial_update_parameters.go new file mode 100644 index 000000000..e5ed43552 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleTypesBulkPartialUpdateParams creates a new DcimModuleTypesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesBulkPartialUpdateParams() *DcimModuleTypesBulkPartialUpdateParams { + return &DcimModuleTypesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesBulkPartialUpdateParamsWithTimeout creates a new DcimModuleTypesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleTypesBulkPartialUpdateParams { + return &DcimModuleTypesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesBulkPartialUpdateParamsWithContext creates a new DcimModuleTypesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimModuleTypesBulkPartialUpdateParams { + return &DcimModuleTypesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesBulkPartialUpdateParamsWithHTTPClient creates a new DcimModuleTypesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleTypesBulkPartialUpdateParams { + return &DcimModuleTypesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim module types bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableModuleType + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesBulkPartialUpdateParams) WithDefaults() *DcimModuleTypesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleTypesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimModuleTypesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleTypesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) WithData(data *models.WritableModuleType) *DcimModuleTypesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module types bulk partial update params +func (o *DcimModuleTypesBulkPartialUpdateParams) SetData(data *models.WritableModuleType) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_bulk_partial_update_responses.go b/netbox/client/dcim/dcim_module_types_bulk_partial_update_responses.go new file mode 100644 index 000000000..404b6c0c5 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesBulkPartialUpdateReader is a Reader for the DcimModuleTypesBulkPartialUpdate structure. +type DcimModuleTypesBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleTypesBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesBulkPartialUpdateOK creates a DcimModuleTypesBulkPartialUpdateOK with default headers values +func NewDcimModuleTypesBulkPartialUpdateOK() *DcimModuleTypesBulkPartialUpdateOK { + return &DcimModuleTypesBulkPartialUpdateOK{} +} + +/* DcimModuleTypesBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModuleTypesBulkPartialUpdateOK dcim module types bulk partial update o k +*/ +type DcimModuleTypesBulkPartialUpdateOK struct { + Payload *models.ModuleType +} + +func (o *DcimModuleTypesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/module-types/][%d] dcimModuleTypesBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleTypesBulkPartialUpdateOK) GetPayload() *models.ModuleType { + return o.Payload +} + +func (o *DcimModuleTypesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_bulk_update_parameters.go b/netbox/client/dcim/dcim_module_types_bulk_update_parameters.go new file mode 100644 index 000000000..9be91575c --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleTypesBulkUpdateParams creates a new DcimModuleTypesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesBulkUpdateParams() *DcimModuleTypesBulkUpdateParams { + return &DcimModuleTypesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesBulkUpdateParamsWithTimeout creates a new DcimModuleTypesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleTypesBulkUpdateParams { + return &DcimModuleTypesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesBulkUpdateParamsWithContext creates a new DcimModuleTypesBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesBulkUpdateParamsWithContext(ctx context.Context) *DcimModuleTypesBulkUpdateParams { + return &DcimModuleTypesBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesBulkUpdateParamsWithHTTPClient creates a new DcimModuleTypesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleTypesBulkUpdateParams { + return &DcimModuleTypesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesBulkUpdateParams contains all the parameters to send to the API endpoint + for the dcim module types bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesBulkUpdateParams struct { + + // Data. + Data *models.WritableModuleType + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesBulkUpdateParams) WithDefaults() *DcimModuleTypesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleTypesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) WithContext(ctx context.Context) *DcimModuleTypesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleTypesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) WithData(data *models.WritableModuleType) *DcimModuleTypesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module types bulk update params +func (o *DcimModuleTypesBulkUpdateParams) SetData(data *models.WritableModuleType) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_bulk_update_responses.go b/netbox/client/dcim/dcim_module_types_bulk_update_responses.go new file mode 100644 index 000000000..9d2a5030d --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesBulkUpdateReader is a Reader for the DcimModuleTypesBulkUpdate structure. +type DcimModuleTypesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleTypesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesBulkUpdateOK creates a DcimModuleTypesBulkUpdateOK with default headers values +func NewDcimModuleTypesBulkUpdateOK() *DcimModuleTypesBulkUpdateOK { + return &DcimModuleTypesBulkUpdateOK{} +} + +/* DcimModuleTypesBulkUpdateOK describes a response with status code 200, with default header values. + +DcimModuleTypesBulkUpdateOK dcim module types bulk update o k +*/ +type DcimModuleTypesBulkUpdateOK struct { + Payload *models.ModuleType +} + +func (o *DcimModuleTypesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/module-types/][%d] dcimModuleTypesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleTypesBulkUpdateOK) GetPayload() *models.ModuleType { + return o.Payload +} + +func (o *DcimModuleTypesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_create_parameters.go b/netbox/client/dcim/dcim_module_types_create_parameters.go new file mode 100644 index 000000000..9db8e3765 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_create_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleTypesCreateParams creates a new DcimModuleTypesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesCreateParams() *DcimModuleTypesCreateParams { + return &DcimModuleTypesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesCreateParamsWithTimeout creates a new DcimModuleTypesCreateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesCreateParamsWithTimeout(timeout time.Duration) *DcimModuleTypesCreateParams { + return &DcimModuleTypesCreateParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesCreateParamsWithContext creates a new DcimModuleTypesCreateParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesCreateParamsWithContext(ctx context.Context) *DcimModuleTypesCreateParams { + return &DcimModuleTypesCreateParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesCreateParamsWithHTTPClient creates a new DcimModuleTypesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesCreateParamsWithHTTPClient(client *http.Client) *DcimModuleTypesCreateParams { + return &DcimModuleTypesCreateParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesCreateParams contains all the parameters to send to the API endpoint + for the dcim module types create operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesCreateParams struct { + + // Data. + Data *models.WritableModuleType + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesCreateParams) WithDefaults() *DcimModuleTypesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types create params +func (o *DcimModuleTypesCreateParams) WithTimeout(timeout time.Duration) *DcimModuleTypesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types create params +func (o *DcimModuleTypesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types create params +func (o *DcimModuleTypesCreateParams) WithContext(ctx context.Context) *DcimModuleTypesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types create params +func (o *DcimModuleTypesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types create params +func (o *DcimModuleTypesCreateParams) WithHTTPClient(client *http.Client) *DcimModuleTypesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types create params +func (o *DcimModuleTypesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module types create params +func (o *DcimModuleTypesCreateParams) WithData(data *models.WritableModuleType) *DcimModuleTypesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module types create params +func (o *DcimModuleTypesCreateParams) SetData(data *models.WritableModuleType) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_create_responses.go b/netbox/client/dcim/dcim_module_types_create_responses.go new file mode 100644 index 000000000..813a3f890 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_create_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesCreateReader is a Reader for the DcimModuleTypesCreate structure. +type DcimModuleTypesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimModuleTypesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesCreateCreated creates a DcimModuleTypesCreateCreated with default headers values +func NewDcimModuleTypesCreateCreated() *DcimModuleTypesCreateCreated { + return &DcimModuleTypesCreateCreated{} +} + +/* DcimModuleTypesCreateCreated describes a response with status code 201, with default header values. + +DcimModuleTypesCreateCreated dcim module types create created +*/ +type DcimModuleTypesCreateCreated struct { + Payload *models.ModuleType +} + +func (o *DcimModuleTypesCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/module-types/][%d] dcimModuleTypesCreateCreated %+v", 201, o.Payload) +} +func (o *DcimModuleTypesCreateCreated) GetPayload() *models.ModuleType { + return o.Payload +} + +func (o *DcimModuleTypesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_delete_parameters.go b/netbox/client/dcim/dcim_module_types_delete_parameters.go new file mode 100644 index 000000000..97a6852b4 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_delete_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModuleTypesDeleteParams creates a new DcimModuleTypesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesDeleteParams() *DcimModuleTypesDeleteParams { + return &DcimModuleTypesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesDeleteParamsWithTimeout creates a new DcimModuleTypesDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesDeleteParamsWithTimeout(timeout time.Duration) *DcimModuleTypesDeleteParams { + return &DcimModuleTypesDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesDeleteParamsWithContext creates a new DcimModuleTypesDeleteParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesDeleteParamsWithContext(ctx context.Context) *DcimModuleTypesDeleteParams { + return &DcimModuleTypesDeleteParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesDeleteParamsWithHTTPClient creates a new DcimModuleTypesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesDeleteParamsWithHTTPClient(client *http.Client) *DcimModuleTypesDeleteParams { + return &DcimModuleTypesDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesDeleteParams contains all the parameters to send to the API endpoint + for the dcim module types delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesDeleteParams struct { + + /* ID. + + A unique integer value identifying this module type. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesDeleteParams) WithDefaults() *DcimModuleTypesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) WithTimeout(timeout time.Duration) *DcimModuleTypesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) WithContext(ctx context.Context) *DcimModuleTypesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) WithHTTPClient(client *http.Client) *DcimModuleTypesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) WithID(id int64) *DcimModuleTypesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module types delete params +func (o *DcimModuleTypesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesDeleteParams) 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/netbox/client/dcim/dcim_module_types_delete_responses.go b/netbox/client/dcim/dcim_module_types_delete_responses.go new file mode 100644 index 000000000..ccc16ee8b --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModuleTypesDeleteReader is a Reader for the DcimModuleTypesDelete structure. +type DcimModuleTypesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModuleTypesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesDeleteNoContent creates a DcimModuleTypesDeleteNoContent with default headers values +func NewDcimModuleTypesDeleteNoContent() *DcimModuleTypesDeleteNoContent { + return &DcimModuleTypesDeleteNoContent{} +} + +/* DcimModuleTypesDeleteNoContent describes a response with status code 204, with default header values. + +DcimModuleTypesDeleteNoContent dcim module types delete no content +*/ +type DcimModuleTypesDeleteNoContent struct { +} + +func (o *DcimModuleTypesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/module-types/{id}/][%d] dcimModuleTypesDeleteNoContent ", 204) +} + +func (o *DcimModuleTypesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_list_parameters.go b/netbox/client/dcim/dcim_module_types_list_parameters.go new file mode 100644 index 000000000..a475f346f --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_list_parameters.go @@ -0,0 +1,1606 @@ +// 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" +) + +// NewDcimModuleTypesListParams creates a new DcimModuleTypesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesListParams() *DcimModuleTypesListParams { + return &DcimModuleTypesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesListParamsWithTimeout creates a new DcimModuleTypesListParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesListParamsWithTimeout(timeout time.Duration) *DcimModuleTypesListParams { + return &DcimModuleTypesListParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesListParamsWithContext creates a new DcimModuleTypesListParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesListParamsWithContext(ctx context.Context) *DcimModuleTypesListParams { + return &DcimModuleTypesListParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesListParamsWithHTTPClient creates a new DcimModuleTypesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesListParamsWithHTTPClient(client *http.Client) *DcimModuleTypesListParams { + return &DcimModuleTypesListParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesListParams contains all the parameters to send to the API endpoint + for the dcim module types list operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesListParams struct { + + // ConsolePorts. + ConsolePorts *string + + // ConsoleServerPorts. + ConsoleServerPorts *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // Interfaces. + Interfaces *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Manufacturer. + Manufacturer *string + + // Manufacturern. + Manufacturern *string + + // ManufacturerID. + ManufacturerID *string + + // ManufacturerIDn. + ManufacturerIDn *string + + // Model. + Model *string + + // ModelIc. + ModelIc *string + + // ModelIe. + ModelIe *string + + // ModelIew. + ModelIew *string + + // ModelIsw. + ModelIsw *string + + // Modeln. + Modeln *string + + // ModelNic. + ModelNic *string + + // ModelNie. + ModelNie *string + + // ModelNiew. + ModelNiew *string + + // ModelNisw. + ModelNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // PartNumber. + PartNumber *string + + // PartNumberIc. + PartNumberIc *string + + // PartNumberIe. + PartNumberIe *string + + // PartNumberIew. + PartNumberIew *string + + // PartNumberIsw. + PartNumberIsw *string + + // PartNumbern. + PartNumbern *string + + // PartNumberNic. + PartNumberNic *string + + // PartNumberNie. + PartNumberNie *string + + // PartNumberNiew. + PartNumberNiew *string + + // PartNumberNisw. + PartNumberNisw *string + + // PassThroughPorts. + PassThroughPorts *string + + // PowerOutlets. + PowerOutlets *string + + // PowerPorts. + PowerPorts *string + + // Q. + Q *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesListParams) WithDefaults() *DcimModuleTypesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types list params +func (o *DcimModuleTypesListParams) WithTimeout(timeout time.Duration) *DcimModuleTypesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types list params +func (o *DcimModuleTypesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types list params +func (o *DcimModuleTypesListParams) WithContext(ctx context.Context) *DcimModuleTypesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types list params +func (o *DcimModuleTypesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types list params +func (o *DcimModuleTypesListParams) WithHTTPClient(client *http.Client) *DcimModuleTypesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types list params +func (o *DcimModuleTypesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConsolePorts adds the consolePorts to the dcim module types list params +func (o *DcimModuleTypesListParams) WithConsolePorts(consolePorts *string) *DcimModuleTypesListParams { + o.SetConsolePorts(consolePorts) + return o +} + +// SetConsolePorts adds the consolePorts to the dcim module types list params +func (o *DcimModuleTypesListParams) SetConsolePorts(consolePorts *string) { + o.ConsolePorts = consolePorts +} + +// WithConsoleServerPorts adds the consoleServerPorts to the dcim module types list params +func (o *DcimModuleTypesListParams) WithConsoleServerPorts(consoleServerPorts *string) *DcimModuleTypesListParams { + o.SetConsoleServerPorts(consoleServerPorts) + return o +} + +// SetConsoleServerPorts adds the consoleServerPorts to the dcim module types list params +func (o *DcimModuleTypesListParams) SetConsoleServerPorts(consoleServerPorts *string) { + o.ConsoleServerPorts = consoleServerPorts +} + +// WithCreated adds the created to the dcim module types list params +func (o *DcimModuleTypesListParams) WithCreated(created *string) *DcimModuleTypesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim module types list params +func (o *DcimModuleTypesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim module types list params +func (o *DcimModuleTypesListParams) WithCreatedGte(createdGte *string) *DcimModuleTypesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim module types list params +func (o *DcimModuleTypesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim module types list params +func (o *DcimModuleTypesListParams) WithCreatedLte(createdLte *string) *DcimModuleTypesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim module types list params +func (o *DcimModuleTypesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithID adds the id to the dcim module types list params +func (o *DcimModuleTypesListParams) WithID(id *string) *DcimModuleTypesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module types list params +func (o *DcimModuleTypesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim module types list params +func (o *DcimModuleTypesListParams) WithIDGt(iDGt *string) *DcimModuleTypesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim module types list params +func (o *DcimModuleTypesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim module types list params +func (o *DcimModuleTypesListParams) WithIDGte(iDGte *string) *DcimModuleTypesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim module types list params +func (o *DcimModuleTypesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim module types list params +func (o *DcimModuleTypesListParams) WithIDLt(iDLt *string) *DcimModuleTypesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim module types list params +func (o *DcimModuleTypesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim module types list params +func (o *DcimModuleTypesListParams) WithIDLte(iDLte *string) *DcimModuleTypesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim module types list params +func (o *DcimModuleTypesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim module types list params +func (o *DcimModuleTypesListParams) WithIDn(iDn *string) *DcimModuleTypesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithInterfaces adds the interfaces to the dcim module types list params +func (o *DcimModuleTypesListParams) WithInterfaces(interfaces *string) *DcimModuleTypesListParams { + o.SetInterfaces(interfaces) + return o +} + +// SetInterfaces adds the interfaces to the dcim module types list params +func (o *DcimModuleTypesListParams) SetInterfaces(interfaces *string) { + o.Interfaces = interfaces +} + +// WithLastUpdated adds the lastUpdated to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLastUpdated(lastUpdated *string) *DcimModuleTypesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModuleTypesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModuleTypesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the dcim module types list params +func (o *DcimModuleTypesListParams) WithLimit(limit *int64) *DcimModuleTypesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim module types list params +func (o *DcimModuleTypesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithManufacturer adds the manufacturer to the dcim module types list params +func (o *DcimModuleTypesListParams) WithManufacturer(manufacturer *string) *DcimModuleTypesListParams { + o.SetManufacturer(manufacturer) + return o +} + +// SetManufacturer adds the manufacturer to the dcim module types list params +func (o *DcimModuleTypesListParams) SetManufacturer(manufacturer *string) { + o.Manufacturer = manufacturer +} + +// WithManufacturern adds the manufacturern to the dcim module types list params +func (o *DcimModuleTypesListParams) WithManufacturern(manufacturern *string) *DcimModuleTypesListParams { + o.SetManufacturern(manufacturern) + return o +} + +// SetManufacturern adds the manufacturerN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetManufacturern(manufacturern *string) { + o.Manufacturern = manufacturern +} + +// WithManufacturerID adds the manufacturerID to the dcim module types list params +func (o *DcimModuleTypesListParams) WithManufacturerID(manufacturerID *string) *DcimModuleTypesListParams { + o.SetManufacturerID(manufacturerID) + return o +} + +// SetManufacturerID adds the manufacturerId to the dcim module types list params +func (o *DcimModuleTypesListParams) SetManufacturerID(manufacturerID *string) { + o.ManufacturerID = manufacturerID +} + +// WithManufacturerIDn adds the manufacturerIDn to the dcim module types list params +func (o *DcimModuleTypesListParams) WithManufacturerIDn(manufacturerIDn *string) *DcimModuleTypesListParams { + o.SetManufacturerIDn(manufacturerIDn) + return o +} + +// SetManufacturerIDn adds the manufacturerIdN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetManufacturerIDn(manufacturerIDn *string) { + o.ManufacturerIDn = manufacturerIDn +} + +// WithModel adds the model to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModel(model *string) *DcimModuleTypesListParams { + o.SetModel(model) + return o +} + +// SetModel adds the model to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModel(model *string) { + o.Model = model +} + +// WithModelIc adds the modelIc to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelIc(modelIc *string) *DcimModuleTypesListParams { + o.SetModelIc(modelIc) + return o +} + +// SetModelIc adds the modelIc to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelIc(modelIc *string) { + o.ModelIc = modelIc +} + +// WithModelIe adds the modelIe to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelIe(modelIe *string) *DcimModuleTypesListParams { + o.SetModelIe(modelIe) + return o +} + +// SetModelIe adds the modelIe to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelIe(modelIe *string) { + o.ModelIe = modelIe +} + +// WithModelIew adds the modelIew to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelIew(modelIew *string) *DcimModuleTypesListParams { + o.SetModelIew(modelIew) + return o +} + +// SetModelIew adds the modelIew to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelIew(modelIew *string) { + o.ModelIew = modelIew +} + +// WithModelIsw adds the modelIsw to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelIsw(modelIsw *string) *DcimModuleTypesListParams { + o.SetModelIsw(modelIsw) + return o +} + +// SetModelIsw adds the modelIsw to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelIsw(modelIsw *string) { + o.ModelIsw = modelIsw +} + +// WithModeln adds the modeln to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModeln(modeln *string) *DcimModuleTypesListParams { + o.SetModeln(modeln) + return o +} + +// SetModeln adds the modelN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModeln(modeln *string) { + o.Modeln = modeln +} + +// WithModelNic adds the modelNic to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelNic(modelNic *string) *DcimModuleTypesListParams { + o.SetModelNic(modelNic) + return o +} + +// SetModelNic adds the modelNic to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelNic(modelNic *string) { + o.ModelNic = modelNic +} + +// WithModelNie adds the modelNie to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelNie(modelNie *string) *DcimModuleTypesListParams { + o.SetModelNie(modelNie) + return o +} + +// SetModelNie adds the modelNie to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelNie(modelNie *string) { + o.ModelNie = modelNie +} + +// WithModelNiew adds the modelNiew to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelNiew(modelNiew *string) *DcimModuleTypesListParams { + o.SetModelNiew(modelNiew) + return o +} + +// SetModelNiew adds the modelNiew to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelNiew(modelNiew *string) { + o.ModelNiew = modelNiew +} + +// WithModelNisw adds the modelNisw to the dcim module types list params +func (o *DcimModuleTypesListParams) WithModelNisw(modelNisw *string) *DcimModuleTypesListParams { + o.SetModelNisw(modelNisw) + return o +} + +// SetModelNisw adds the modelNisw to the dcim module types list params +func (o *DcimModuleTypesListParams) SetModelNisw(modelNisw *string) { + o.ModelNisw = modelNisw +} + +// WithOffset adds the offset to the dcim module types list params +func (o *DcimModuleTypesListParams) WithOffset(offset *int64) *DcimModuleTypesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim module types list params +func (o *DcimModuleTypesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPartNumber adds the partNumber to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumber(partNumber *string) *DcimModuleTypesListParams { + o.SetPartNumber(partNumber) + return o +} + +// SetPartNumber adds the partNumber to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumber(partNumber *string) { + o.PartNumber = partNumber +} + +// WithPartNumberIc adds the partNumberIc to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberIc(partNumberIc *string) *DcimModuleTypesListParams { + o.SetPartNumberIc(partNumberIc) + return o +} + +// SetPartNumberIc adds the partNumberIc to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberIc(partNumberIc *string) { + o.PartNumberIc = partNumberIc +} + +// WithPartNumberIe adds the partNumberIe to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberIe(partNumberIe *string) *DcimModuleTypesListParams { + o.SetPartNumberIe(partNumberIe) + return o +} + +// SetPartNumberIe adds the partNumberIe to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberIe(partNumberIe *string) { + o.PartNumberIe = partNumberIe +} + +// WithPartNumberIew adds the partNumberIew to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberIew(partNumberIew *string) *DcimModuleTypesListParams { + o.SetPartNumberIew(partNumberIew) + return o +} + +// SetPartNumberIew adds the partNumberIew to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberIew(partNumberIew *string) { + o.PartNumberIew = partNumberIew +} + +// WithPartNumberIsw adds the partNumberIsw to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberIsw(partNumberIsw *string) *DcimModuleTypesListParams { + o.SetPartNumberIsw(partNumberIsw) + return o +} + +// SetPartNumberIsw adds the partNumberIsw to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberIsw(partNumberIsw *string) { + o.PartNumberIsw = partNumberIsw +} + +// WithPartNumbern adds the partNumbern to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumbern(partNumbern *string) *DcimModuleTypesListParams { + o.SetPartNumbern(partNumbern) + return o +} + +// SetPartNumbern adds the partNumberN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumbern(partNumbern *string) { + o.PartNumbern = partNumbern +} + +// WithPartNumberNic adds the partNumberNic to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberNic(partNumberNic *string) *DcimModuleTypesListParams { + o.SetPartNumberNic(partNumberNic) + return o +} + +// SetPartNumberNic adds the partNumberNic to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberNic(partNumberNic *string) { + o.PartNumberNic = partNumberNic +} + +// WithPartNumberNie adds the partNumberNie to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberNie(partNumberNie *string) *DcimModuleTypesListParams { + o.SetPartNumberNie(partNumberNie) + return o +} + +// SetPartNumberNie adds the partNumberNie to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberNie(partNumberNie *string) { + o.PartNumberNie = partNumberNie +} + +// WithPartNumberNiew adds the partNumberNiew to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberNiew(partNumberNiew *string) *DcimModuleTypesListParams { + o.SetPartNumberNiew(partNumberNiew) + return o +} + +// SetPartNumberNiew adds the partNumberNiew to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberNiew(partNumberNiew *string) { + o.PartNumberNiew = partNumberNiew +} + +// WithPartNumberNisw adds the partNumberNisw to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPartNumberNisw(partNumberNisw *string) *DcimModuleTypesListParams { + o.SetPartNumberNisw(partNumberNisw) + return o +} + +// SetPartNumberNisw adds the partNumberNisw to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPartNumberNisw(partNumberNisw *string) { + o.PartNumberNisw = partNumberNisw +} + +// WithPassThroughPorts adds the passThroughPorts to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPassThroughPorts(passThroughPorts *string) *DcimModuleTypesListParams { + o.SetPassThroughPorts(passThroughPorts) + return o +} + +// SetPassThroughPorts adds the passThroughPorts to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPassThroughPorts(passThroughPorts *string) { + o.PassThroughPorts = passThroughPorts +} + +// WithPowerOutlets adds the powerOutlets to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPowerOutlets(powerOutlets *string) *DcimModuleTypesListParams { + o.SetPowerOutlets(powerOutlets) + return o +} + +// SetPowerOutlets adds the powerOutlets to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPowerOutlets(powerOutlets *string) { + o.PowerOutlets = powerOutlets +} + +// WithPowerPorts adds the powerPorts to the dcim module types list params +func (o *DcimModuleTypesListParams) WithPowerPorts(powerPorts *string) *DcimModuleTypesListParams { + o.SetPowerPorts(powerPorts) + return o +} + +// SetPowerPorts adds the powerPorts to the dcim module types list params +func (o *DcimModuleTypesListParams) SetPowerPorts(powerPorts *string) { + o.PowerPorts = powerPorts +} + +// WithQ adds the q to the dcim module types list params +func (o *DcimModuleTypesListParams) WithQ(q *string) *DcimModuleTypesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim module types list params +func (o *DcimModuleTypesListParams) SetQ(q *string) { + o.Q = q +} + +// WithTag adds the tag to the dcim module types list params +func (o *DcimModuleTypesListParams) WithTag(tag *string) *DcimModuleTypesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim module types list params +func (o *DcimModuleTypesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim module types list params +func (o *DcimModuleTypesListParams) WithTagn(tagn *string) *DcimModuleTypesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim module types list params +func (o *DcimModuleTypesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ConsolePorts != nil { + + // query param console_ports + var qrConsolePorts string + + if o.ConsolePorts != nil { + qrConsolePorts = *o.ConsolePorts + } + qConsolePorts := qrConsolePorts + if qConsolePorts != "" { + + if err := r.SetQueryParam("console_ports", qConsolePorts); err != nil { + return err + } + } + } + + if o.ConsoleServerPorts != nil { + + // query param console_server_ports + var qrConsoleServerPorts string + + if o.ConsoleServerPorts != nil { + qrConsoleServerPorts = *o.ConsoleServerPorts + } + qConsoleServerPorts := qrConsoleServerPorts + if qConsoleServerPorts != "" { + + if err := r.SetQueryParam("console_server_ports", qConsoleServerPorts); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Interfaces != nil { + + // query param interfaces + var qrInterfaces string + + if o.Interfaces != nil { + qrInterfaces = *o.Interfaces + } + qInterfaces := qrInterfaces + if qInterfaces != "" { + + if err := r.SetQueryParam("interfaces", qInterfaces); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Manufacturer != nil { + + // query param manufacturer + var qrManufacturer string + + if o.Manufacturer != nil { + qrManufacturer = *o.Manufacturer + } + qManufacturer := qrManufacturer + if qManufacturer != "" { + + if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil { + return err + } + } + } + + if o.Manufacturern != nil { + + // query param manufacturer__n + var qrManufacturern string + + if o.Manufacturern != nil { + qrManufacturern = *o.Manufacturern + } + qManufacturern := qrManufacturern + if qManufacturern != "" { + + if err := r.SetQueryParam("manufacturer__n", qManufacturern); err != nil { + return err + } + } + } + + if o.ManufacturerID != nil { + + // query param manufacturer_id + var qrManufacturerID string + + if o.ManufacturerID != nil { + qrManufacturerID = *o.ManufacturerID + } + qManufacturerID := qrManufacturerID + if qManufacturerID != "" { + + if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil { + return err + } + } + } + + if o.ManufacturerIDn != nil { + + // query param manufacturer_id__n + var qrManufacturerIDn string + + if o.ManufacturerIDn != nil { + qrManufacturerIDn = *o.ManufacturerIDn + } + qManufacturerIDn := qrManufacturerIDn + if qManufacturerIDn != "" { + + if err := r.SetQueryParam("manufacturer_id__n", qManufacturerIDn); err != nil { + return err + } + } + } + + if o.Model != nil { + + // query param model + var qrModel string + + if o.Model != nil { + qrModel = *o.Model + } + qModel := qrModel + if qModel != "" { + + if err := r.SetQueryParam("model", qModel); err != nil { + return err + } + } + } + + if o.ModelIc != nil { + + // query param model__ic + var qrModelIc string + + if o.ModelIc != nil { + qrModelIc = *o.ModelIc + } + qModelIc := qrModelIc + if qModelIc != "" { + + if err := r.SetQueryParam("model__ic", qModelIc); err != nil { + return err + } + } + } + + if o.ModelIe != nil { + + // query param model__ie + var qrModelIe string + + if o.ModelIe != nil { + qrModelIe = *o.ModelIe + } + qModelIe := qrModelIe + if qModelIe != "" { + + if err := r.SetQueryParam("model__ie", qModelIe); err != nil { + return err + } + } + } + + if o.ModelIew != nil { + + // query param model__iew + var qrModelIew string + + if o.ModelIew != nil { + qrModelIew = *o.ModelIew + } + qModelIew := qrModelIew + if qModelIew != "" { + + if err := r.SetQueryParam("model__iew", qModelIew); err != nil { + return err + } + } + } + + if o.ModelIsw != nil { + + // query param model__isw + var qrModelIsw string + + if o.ModelIsw != nil { + qrModelIsw = *o.ModelIsw + } + qModelIsw := qrModelIsw + if qModelIsw != "" { + + if err := r.SetQueryParam("model__isw", qModelIsw); err != nil { + return err + } + } + } + + if o.Modeln != nil { + + // query param model__n + var qrModeln string + + if o.Modeln != nil { + qrModeln = *o.Modeln + } + qModeln := qrModeln + if qModeln != "" { + + if err := r.SetQueryParam("model__n", qModeln); err != nil { + return err + } + } + } + + if o.ModelNic != nil { + + // query param model__nic + var qrModelNic string + + if o.ModelNic != nil { + qrModelNic = *o.ModelNic + } + qModelNic := qrModelNic + if qModelNic != "" { + + if err := r.SetQueryParam("model__nic", qModelNic); err != nil { + return err + } + } + } + + if o.ModelNie != nil { + + // query param model__nie + var qrModelNie string + + if o.ModelNie != nil { + qrModelNie = *o.ModelNie + } + qModelNie := qrModelNie + if qModelNie != "" { + + if err := r.SetQueryParam("model__nie", qModelNie); err != nil { + return err + } + } + } + + if o.ModelNiew != nil { + + // query param model__niew + var qrModelNiew string + + if o.ModelNiew != nil { + qrModelNiew = *o.ModelNiew + } + qModelNiew := qrModelNiew + if qModelNiew != "" { + + if err := r.SetQueryParam("model__niew", qModelNiew); err != nil { + return err + } + } + } + + if o.ModelNisw != nil { + + // query param model__nisw + var qrModelNisw string + + if o.ModelNisw != nil { + qrModelNisw = *o.ModelNisw + } + qModelNisw := qrModelNisw + if qModelNisw != "" { + + if err := r.SetQueryParam("model__nisw", qModelNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.PartNumber != nil { + + // query param part_number + var qrPartNumber string + + if o.PartNumber != nil { + qrPartNumber = *o.PartNumber + } + qPartNumber := qrPartNumber + if qPartNumber != "" { + + if err := r.SetQueryParam("part_number", qPartNumber); err != nil { + return err + } + } + } + + if o.PartNumberIc != nil { + + // query param part_number__ic + var qrPartNumberIc string + + if o.PartNumberIc != nil { + qrPartNumberIc = *o.PartNumberIc + } + qPartNumberIc := qrPartNumberIc + if qPartNumberIc != "" { + + if err := r.SetQueryParam("part_number__ic", qPartNumberIc); err != nil { + return err + } + } + } + + if o.PartNumberIe != nil { + + // query param part_number__ie + var qrPartNumberIe string + + if o.PartNumberIe != nil { + qrPartNumberIe = *o.PartNumberIe + } + qPartNumberIe := qrPartNumberIe + if qPartNumberIe != "" { + + if err := r.SetQueryParam("part_number__ie", qPartNumberIe); err != nil { + return err + } + } + } + + if o.PartNumberIew != nil { + + // query param part_number__iew + var qrPartNumberIew string + + if o.PartNumberIew != nil { + qrPartNumberIew = *o.PartNumberIew + } + qPartNumberIew := qrPartNumberIew + if qPartNumberIew != "" { + + if err := r.SetQueryParam("part_number__iew", qPartNumberIew); err != nil { + return err + } + } + } + + if o.PartNumberIsw != nil { + + // query param part_number__isw + var qrPartNumberIsw string + + if o.PartNumberIsw != nil { + qrPartNumberIsw = *o.PartNumberIsw + } + qPartNumberIsw := qrPartNumberIsw + if qPartNumberIsw != "" { + + if err := r.SetQueryParam("part_number__isw", qPartNumberIsw); err != nil { + return err + } + } + } + + if o.PartNumbern != nil { + + // query param part_number__n + var qrPartNumbern string + + if o.PartNumbern != nil { + qrPartNumbern = *o.PartNumbern + } + qPartNumbern := qrPartNumbern + if qPartNumbern != "" { + + if err := r.SetQueryParam("part_number__n", qPartNumbern); err != nil { + return err + } + } + } + + if o.PartNumberNic != nil { + + // query param part_number__nic + var qrPartNumberNic string + + if o.PartNumberNic != nil { + qrPartNumberNic = *o.PartNumberNic + } + qPartNumberNic := qrPartNumberNic + if qPartNumberNic != "" { + + if err := r.SetQueryParam("part_number__nic", qPartNumberNic); err != nil { + return err + } + } + } + + if o.PartNumberNie != nil { + + // query param part_number__nie + var qrPartNumberNie string + + if o.PartNumberNie != nil { + qrPartNumberNie = *o.PartNumberNie + } + qPartNumberNie := qrPartNumberNie + if qPartNumberNie != "" { + + if err := r.SetQueryParam("part_number__nie", qPartNumberNie); err != nil { + return err + } + } + } + + if o.PartNumberNiew != nil { + + // query param part_number__niew + var qrPartNumberNiew string + + if o.PartNumberNiew != nil { + qrPartNumberNiew = *o.PartNumberNiew + } + qPartNumberNiew := qrPartNumberNiew + if qPartNumberNiew != "" { + + if err := r.SetQueryParam("part_number__niew", qPartNumberNiew); err != nil { + return err + } + } + } + + if o.PartNumberNisw != nil { + + // query param part_number__nisw + var qrPartNumberNisw string + + if o.PartNumberNisw != nil { + qrPartNumberNisw = *o.PartNumberNisw + } + qPartNumberNisw := qrPartNumberNisw + if qPartNumberNisw != "" { + + if err := r.SetQueryParam("part_number__nisw", qPartNumberNisw); err != nil { + return err + } + } + } + + if o.PassThroughPorts != nil { + + // query param pass_through_ports + var qrPassThroughPorts string + + if o.PassThroughPorts != nil { + qrPassThroughPorts = *o.PassThroughPorts + } + qPassThroughPorts := qrPassThroughPorts + if qPassThroughPorts != "" { + + if err := r.SetQueryParam("pass_through_ports", qPassThroughPorts); err != nil { + return err + } + } + } + + if o.PowerOutlets != nil { + + // query param power_outlets + var qrPowerOutlets string + + if o.PowerOutlets != nil { + qrPowerOutlets = *o.PowerOutlets + } + qPowerOutlets := qrPowerOutlets + if qPowerOutlets != "" { + + if err := r.SetQueryParam("power_outlets", qPowerOutlets); err != nil { + return err + } + } + } + + if o.PowerPorts != nil { + + // query param power_ports + var qrPowerPorts string + + if o.PowerPorts != nil { + qrPowerPorts = *o.PowerPorts + } + qPowerPorts := qrPowerPorts + if qPowerPorts != "" { + + if err := r.SetQueryParam("power_ports", qPowerPorts); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_list_responses.go b/netbox/client/dcim/dcim_module_types_list_responses.go new file mode 100644 index 000000000..e145d1b13 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_list_responses.go @@ -0,0 +1,247 @@ +// 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" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesListReader is a Reader for the DcimModuleTypesList structure. +type DcimModuleTypesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleTypesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesListOK creates a DcimModuleTypesListOK with default headers values +func NewDcimModuleTypesListOK() *DcimModuleTypesListOK { + return &DcimModuleTypesListOK{} +} + +/* DcimModuleTypesListOK describes a response with status code 200, with default header values. + +DcimModuleTypesListOK dcim module types list o k +*/ +type DcimModuleTypesListOK struct { + Payload *DcimModuleTypesListOKBody +} + +func (o *DcimModuleTypesListOK) Error() string { + return fmt.Sprintf("[GET /dcim/module-types/][%d] dcimModuleTypesListOK %+v", 200, o.Payload) +} +func (o *DcimModuleTypesListOK) GetPayload() *DcimModuleTypesListOKBody { + return o.Payload +} + +func (o *DcimModuleTypesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimModuleTypesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*DcimModuleTypesListOKBody dcim module types list o k body +swagger:model DcimModuleTypesListOKBody +*/ +type DcimModuleTypesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ModuleType `json:"results"` +} + +// Validate validates this dcim module types list o k body +func (o *DcimModuleTypesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModuleTypesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimModuleTypesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleTypesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimModuleTypesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleTypesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimModuleTypesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModuleTypesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimModuleTypesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModuleTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModuleTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim module types list o k body based on the context it is used +func (o *DcimModuleTypesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModuleTypesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModuleTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModuleTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimModuleTypesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimModuleTypesListOKBody) UnmarshalBinary(b []byte) error { + var res DcimModuleTypesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_partial_update_parameters.go b/netbox/client/dcim/dcim_module_types_partial_update_parameters.go new file mode 100644 index 000000000..7da53b274 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleTypesPartialUpdateParams creates a new DcimModuleTypesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesPartialUpdateParams() *DcimModuleTypesPartialUpdateParams { + return &DcimModuleTypesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesPartialUpdateParamsWithTimeout creates a new DcimModuleTypesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleTypesPartialUpdateParams { + return &DcimModuleTypesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesPartialUpdateParamsWithContext creates a new DcimModuleTypesPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesPartialUpdateParamsWithContext(ctx context.Context) *DcimModuleTypesPartialUpdateParams { + return &DcimModuleTypesPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesPartialUpdateParamsWithHTTPClient creates a new DcimModuleTypesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleTypesPartialUpdateParams { + return &DcimModuleTypesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim module types partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesPartialUpdateParams struct { + + // Data. + Data *models.WritableModuleType + + /* ID. + + A unique integer value identifying this module type. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesPartialUpdateParams) WithDefaults() *DcimModuleTypesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleTypesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) WithContext(ctx context.Context) *DcimModuleTypesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleTypesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) WithData(data *models.WritableModuleType) *DcimModuleTypesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) SetData(data *models.WritableModuleType) { + o.Data = data +} + +// WithID adds the id to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) WithID(id int64) *DcimModuleTypesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module types partial update params +func (o *DcimModuleTypesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_module_types_partial_update_responses.go b/netbox/client/dcim/dcim_module_types_partial_update_responses.go new file mode 100644 index 000000000..08c05a11e --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesPartialUpdateReader is a Reader for the DcimModuleTypesPartialUpdate structure. +type DcimModuleTypesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleTypesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesPartialUpdateOK creates a DcimModuleTypesPartialUpdateOK with default headers values +func NewDcimModuleTypesPartialUpdateOK() *DcimModuleTypesPartialUpdateOK { + return &DcimModuleTypesPartialUpdateOK{} +} + +/* DcimModuleTypesPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModuleTypesPartialUpdateOK dcim module types partial update o k +*/ +type DcimModuleTypesPartialUpdateOK struct { + Payload *models.ModuleType +} + +func (o *DcimModuleTypesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/module-types/{id}/][%d] dcimModuleTypesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleTypesPartialUpdateOK) GetPayload() *models.ModuleType { + return o.Payload +} + +func (o *DcimModuleTypesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_read_parameters.go b/netbox/client/dcim/dcim_module_types_read_parameters.go new file mode 100644 index 000000000..ab9c29574 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_read_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModuleTypesReadParams creates a new DcimModuleTypesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesReadParams() *DcimModuleTypesReadParams { + return &DcimModuleTypesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesReadParamsWithTimeout creates a new DcimModuleTypesReadParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesReadParamsWithTimeout(timeout time.Duration) *DcimModuleTypesReadParams { + return &DcimModuleTypesReadParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesReadParamsWithContext creates a new DcimModuleTypesReadParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesReadParamsWithContext(ctx context.Context) *DcimModuleTypesReadParams { + return &DcimModuleTypesReadParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesReadParamsWithHTTPClient creates a new DcimModuleTypesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesReadParamsWithHTTPClient(client *http.Client) *DcimModuleTypesReadParams { + return &DcimModuleTypesReadParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesReadParams contains all the parameters to send to the API endpoint + for the dcim module types read operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesReadParams struct { + + /* ID. + + A unique integer value identifying this module type. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesReadParams) WithDefaults() *DcimModuleTypesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types read params +func (o *DcimModuleTypesReadParams) WithTimeout(timeout time.Duration) *DcimModuleTypesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types read params +func (o *DcimModuleTypesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types read params +func (o *DcimModuleTypesReadParams) WithContext(ctx context.Context) *DcimModuleTypesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types read params +func (o *DcimModuleTypesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types read params +func (o *DcimModuleTypesReadParams) WithHTTPClient(client *http.Client) *DcimModuleTypesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types read params +func (o *DcimModuleTypesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim module types read params +func (o *DcimModuleTypesReadParams) WithID(id int64) *DcimModuleTypesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module types read params +func (o *DcimModuleTypesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesReadParams) 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/netbox/client/dcim/dcim_module_types_read_responses.go b/netbox/client/dcim/dcim_module_types_read_responses.go new file mode 100644 index 000000000..f116d42d8 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_read_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesReadReader is a Reader for the DcimModuleTypesRead structure. +type DcimModuleTypesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleTypesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesReadOK creates a DcimModuleTypesReadOK with default headers values +func NewDcimModuleTypesReadOK() *DcimModuleTypesReadOK { + return &DcimModuleTypesReadOK{} +} + +/* DcimModuleTypesReadOK describes a response with status code 200, with default header values. + +DcimModuleTypesReadOK dcim module types read o k +*/ +type DcimModuleTypesReadOK struct { + Payload *models.ModuleType +} + +func (o *DcimModuleTypesReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/module-types/{id}/][%d] dcimModuleTypesReadOK %+v", 200, o.Payload) +} +func (o *DcimModuleTypesReadOK) GetPayload() *models.ModuleType { + return o.Payload +} + +func (o *DcimModuleTypesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_module_types_update_parameters.go b/netbox/client/dcim/dcim_module_types_update_parameters.go new file mode 100644 index 000000000..c2c18b003 --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModuleTypesUpdateParams creates a new DcimModuleTypesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModuleTypesUpdateParams() *DcimModuleTypesUpdateParams { + return &DcimModuleTypesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModuleTypesUpdateParamsWithTimeout creates a new DcimModuleTypesUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModuleTypesUpdateParamsWithTimeout(timeout time.Duration) *DcimModuleTypesUpdateParams { + return &DcimModuleTypesUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModuleTypesUpdateParamsWithContext creates a new DcimModuleTypesUpdateParams object +// with the ability to set a context for a request. +func NewDcimModuleTypesUpdateParamsWithContext(ctx context.Context) *DcimModuleTypesUpdateParams { + return &DcimModuleTypesUpdateParams{ + Context: ctx, + } +} + +// NewDcimModuleTypesUpdateParamsWithHTTPClient creates a new DcimModuleTypesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModuleTypesUpdateParamsWithHTTPClient(client *http.Client) *DcimModuleTypesUpdateParams { + return &DcimModuleTypesUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModuleTypesUpdateParams contains all the parameters to send to the API endpoint + for the dcim module types update operation. + + Typically these are written to a http.Request. +*/ +type DcimModuleTypesUpdateParams struct { + + // Data. + Data *models.WritableModuleType + + /* ID. + + A unique integer value identifying this module type. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim module types update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesUpdateParams) WithDefaults() *DcimModuleTypesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim module types update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModuleTypesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) WithTimeout(timeout time.Duration) *DcimModuleTypesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) WithContext(ctx context.Context) *DcimModuleTypesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) WithHTTPClient(client *http.Client) *DcimModuleTypesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) WithData(data *models.WritableModuleType) *DcimModuleTypesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) SetData(data *models.WritableModuleType) { + o.Data = data +} + +// WithID adds the id to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) WithID(id int64) *DcimModuleTypesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim module types update params +func (o *DcimModuleTypesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModuleTypesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_module_types_update_responses.go b/netbox/client/dcim/dcim_module_types_update_responses.go new file mode 100644 index 000000000..6b7f22c4a --- /dev/null +++ b/netbox/client/dcim/dcim_module_types_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModuleTypesUpdateReader is a Reader for the DcimModuleTypesUpdate structure. +type DcimModuleTypesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModuleTypesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModuleTypesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModuleTypesUpdateOK creates a DcimModuleTypesUpdateOK with default headers values +func NewDcimModuleTypesUpdateOK() *DcimModuleTypesUpdateOK { + return &DcimModuleTypesUpdateOK{} +} + +/* DcimModuleTypesUpdateOK describes a response with status code 200, with default header values. + +DcimModuleTypesUpdateOK dcim module types update o k +*/ +type DcimModuleTypesUpdateOK struct { + Payload *models.ModuleType +} + +func (o *DcimModuleTypesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/module-types/{id}/][%d] dcimModuleTypesUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModuleTypesUpdateOK) GetPayload() *models.ModuleType { + return o.Payload +} + +func (o *DcimModuleTypesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ModuleType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_bulk_delete_parameters.go b/netbox/client/dcim/dcim_modules_bulk_delete_parameters.go new file mode 100644 index 000000000..2b3b1bd6a --- /dev/null +++ b/netbox/client/dcim/dcim_modules_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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" +) + +// NewDcimModulesBulkDeleteParams creates a new DcimModulesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesBulkDeleteParams() *DcimModulesBulkDeleteParams { + return &DcimModulesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesBulkDeleteParamsWithTimeout creates a new DcimModulesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModulesBulkDeleteParamsWithTimeout(timeout time.Duration) *DcimModulesBulkDeleteParams { + return &DcimModulesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModulesBulkDeleteParamsWithContext creates a new DcimModulesBulkDeleteParams object +// with the ability to set a context for a request. +func NewDcimModulesBulkDeleteParamsWithContext(ctx context.Context) *DcimModulesBulkDeleteParams { + return &DcimModulesBulkDeleteParams{ + Context: ctx, + } +} + +// NewDcimModulesBulkDeleteParamsWithHTTPClient creates a new DcimModulesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesBulkDeleteParamsWithHTTPClient(client *http.Client) *DcimModulesBulkDeleteParams { + return &DcimModulesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModulesBulkDeleteParams contains all the parameters to send to the API endpoint + for the dcim modules bulk delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesBulkDeleteParams) WithDefaults() *DcimModulesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules bulk delete params +func (o *DcimModulesBulkDeleteParams) WithTimeout(timeout time.Duration) *DcimModulesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules bulk delete params +func (o *DcimModulesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules bulk delete params +func (o *DcimModulesBulkDeleteParams) WithContext(ctx context.Context) *DcimModulesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules bulk delete params +func (o *DcimModulesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules bulk delete params +func (o *DcimModulesBulkDeleteParams) WithHTTPClient(client *http.Client) *DcimModulesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules bulk delete params +func (o *DcimModulesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesBulkDeleteParams) 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/netbox/client/dcim/dcim_modules_bulk_delete_responses.go b/netbox/client/dcim/dcim_modules_bulk_delete_responses.go new file mode 100644 index 000000000..681bc1e05 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModulesBulkDeleteReader is a Reader for the DcimModulesBulkDelete structure. +type DcimModulesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModulesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesBulkDeleteNoContent creates a DcimModulesBulkDeleteNoContent with default headers values +func NewDcimModulesBulkDeleteNoContent() *DcimModulesBulkDeleteNoContent { + return &DcimModulesBulkDeleteNoContent{} +} + +/* DcimModulesBulkDeleteNoContent describes a response with status code 204, with default header values. + +DcimModulesBulkDeleteNoContent dcim modules bulk delete no content +*/ +type DcimModulesBulkDeleteNoContent struct { +} + +func (o *DcimModulesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/modules/][%d] dcimModulesBulkDeleteNoContent ", 204) +} + +func (o *DcimModulesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_bulk_partial_update_parameters.go b/netbox/client/dcim/dcim_modules_bulk_partial_update_parameters.go new file mode 100644 index 000000000..5a52511f0 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModulesBulkPartialUpdateParams creates a new DcimModulesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesBulkPartialUpdateParams() *DcimModulesBulkPartialUpdateParams { + return &DcimModulesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesBulkPartialUpdateParamsWithTimeout creates a new DcimModulesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModulesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModulesBulkPartialUpdateParams { + return &DcimModulesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModulesBulkPartialUpdateParamsWithContext creates a new DcimModulesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModulesBulkPartialUpdateParamsWithContext(ctx context.Context) *DcimModulesBulkPartialUpdateParams { + return &DcimModulesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModulesBulkPartialUpdateParamsWithHTTPClient creates a new DcimModulesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModulesBulkPartialUpdateParams { + return &DcimModulesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModulesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim modules bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableModule + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesBulkPartialUpdateParams) WithDefaults() *DcimModulesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModulesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) WithContext(ctx context.Context) *DcimModulesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModulesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) WithData(data *models.WritableModule) *DcimModulesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim modules bulk partial update params +func (o *DcimModulesBulkPartialUpdateParams) SetData(data *models.WritableModule) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_modules_bulk_partial_update_responses.go b/netbox/client/dcim/dcim_modules_bulk_partial_update_responses.go new file mode 100644 index 000000000..bd978ba40 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesBulkPartialUpdateReader is a Reader for the DcimModulesBulkPartialUpdate structure. +type DcimModulesBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModulesBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesBulkPartialUpdateOK creates a DcimModulesBulkPartialUpdateOK with default headers values +func NewDcimModulesBulkPartialUpdateOK() *DcimModulesBulkPartialUpdateOK { + return &DcimModulesBulkPartialUpdateOK{} +} + +/* DcimModulesBulkPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModulesBulkPartialUpdateOK dcim modules bulk partial update o k +*/ +type DcimModulesBulkPartialUpdateOK struct { + Payload *models.Module +} + +func (o *DcimModulesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/modules/][%d] dcimModulesBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModulesBulkPartialUpdateOK) GetPayload() *models.Module { + return o.Payload +} + +func (o *DcimModulesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Module) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_bulk_update_parameters.go b/netbox/client/dcim/dcim_modules_bulk_update_parameters.go new file mode 100644 index 000000000..fba96de9f --- /dev/null +++ b/netbox/client/dcim/dcim_modules_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModulesBulkUpdateParams creates a new DcimModulesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesBulkUpdateParams() *DcimModulesBulkUpdateParams { + return &DcimModulesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesBulkUpdateParamsWithTimeout creates a new DcimModulesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModulesBulkUpdateParamsWithTimeout(timeout time.Duration) *DcimModulesBulkUpdateParams { + return &DcimModulesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModulesBulkUpdateParamsWithContext creates a new DcimModulesBulkUpdateParams object +// with the ability to set a context for a request. +func NewDcimModulesBulkUpdateParamsWithContext(ctx context.Context) *DcimModulesBulkUpdateParams { + return &DcimModulesBulkUpdateParams{ + Context: ctx, + } +} + +// NewDcimModulesBulkUpdateParamsWithHTTPClient creates a new DcimModulesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesBulkUpdateParamsWithHTTPClient(client *http.Client) *DcimModulesBulkUpdateParams { + return &DcimModulesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModulesBulkUpdateParams contains all the parameters to send to the API endpoint + for the dcim modules bulk update operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesBulkUpdateParams struct { + + // Data. + Data *models.WritableModule + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesBulkUpdateParams) WithDefaults() *DcimModulesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) WithTimeout(timeout time.Duration) *DcimModulesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) WithContext(ctx context.Context) *DcimModulesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) WithHTTPClient(client *http.Client) *DcimModulesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) WithData(data *models.WritableModule) *DcimModulesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim modules bulk update params +func (o *DcimModulesBulkUpdateParams) SetData(data *models.WritableModule) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_modules_bulk_update_responses.go b/netbox/client/dcim/dcim_modules_bulk_update_responses.go new file mode 100644 index 000000000..6a8e21b96 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesBulkUpdateReader is a Reader for the DcimModulesBulkUpdate structure. +type DcimModulesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModulesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesBulkUpdateOK creates a DcimModulesBulkUpdateOK with default headers values +func NewDcimModulesBulkUpdateOK() *DcimModulesBulkUpdateOK { + return &DcimModulesBulkUpdateOK{} +} + +/* DcimModulesBulkUpdateOK describes a response with status code 200, with default header values. + +DcimModulesBulkUpdateOK dcim modules bulk update o k +*/ +type DcimModulesBulkUpdateOK struct { + Payload *models.Module +} + +func (o *DcimModulesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/modules/][%d] dcimModulesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModulesBulkUpdateOK) GetPayload() *models.Module { + return o.Payload +} + +func (o *DcimModulesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Module) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_create_parameters.go b/netbox/client/dcim/dcim_modules_create_parameters.go new file mode 100644 index 000000000..bd7a64d0f --- /dev/null +++ b/netbox/client/dcim/dcim_modules_create_parameters.go @@ -0,0 +1,163 @@ +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModulesCreateParams creates a new DcimModulesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesCreateParams() *DcimModulesCreateParams { + return &DcimModulesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesCreateParamsWithTimeout creates a new DcimModulesCreateParams object +// with the ability to set a timeout on a request. +func NewDcimModulesCreateParamsWithTimeout(timeout time.Duration) *DcimModulesCreateParams { + return &DcimModulesCreateParams{ + timeout: timeout, + } +} + +// NewDcimModulesCreateParamsWithContext creates a new DcimModulesCreateParams object +// with the ability to set a context for a request. +func NewDcimModulesCreateParamsWithContext(ctx context.Context) *DcimModulesCreateParams { + return &DcimModulesCreateParams{ + Context: ctx, + } +} + +// NewDcimModulesCreateParamsWithHTTPClient creates a new DcimModulesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesCreateParamsWithHTTPClient(client *http.Client) *DcimModulesCreateParams { + return &DcimModulesCreateParams{ + HTTPClient: client, + } +} + +/* DcimModulesCreateParams contains all the parameters to send to the API endpoint + for the dcim modules create operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesCreateParams struct { + + // Data. + Data *models.WritableModule + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesCreateParams) WithDefaults() *DcimModulesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules create params +func (o *DcimModulesCreateParams) WithTimeout(timeout time.Duration) *DcimModulesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules create params +func (o *DcimModulesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules create params +func (o *DcimModulesCreateParams) WithContext(ctx context.Context) *DcimModulesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules create params +func (o *DcimModulesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules create params +func (o *DcimModulesCreateParams) WithHTTPClient(client *http.Client) *DcimModulesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules create params +func (o *DcimModulesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim modules create params +func (o *DcimModulesCreateParams) WithData(data *models.WritableModule) *DcimModulesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim modules create params +func (o *DcimModulesCreateParams) SetData(data *models.WritableModule) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_modules_create_responses.go b/netbox/client/dcim/dcim_modules_create_responses.go new file mode 100644 index 000000000..0ee0911e5 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_create_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesCreateReader is a Reader for the DcimModulesCreate structure. +type DcimModulesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewDcimModulesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesCreateCreated creates a DcimModulesCreateCreated with default headers values +func NewDcimModulesCreateCreated() *DcimModulesCreateCreated { + return &DcimModulesCreateCreated{} +} + +/* DcimModulesCreateCreated describes a response with status code 201, with default header values. + +DcimModulesCreateCreated dcim modules create created +*/ +type DcimModulesCreateCreated struct { + Payload *models.Module +} + +func (o *DcimModulesCreateCreated) Error() string { + return fmt.Sprintf("[POST /dcim/modules/][%d] dcimModulesCreateCreated %+v", 201, o.Payload) +} +func (o *DcimModulesCreateCreated) GetPayload() *models.Module { + return o.Payload +} + +func (o *DcimModulesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Module) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_delete_parameters.go b/netbox/client/dcim/dcim_modules_delete_parameters.go new file mode 100644 index 000000000..76a017739 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_delete_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModulesDeleteParams creates a new DcimModulesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesDeleteParams() *DcimModulesDeleteParams { + return &DcimModulesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesDeleteParamsWithTimeout creates a new DcimModulesDeleteParams object +// with the ability to set a timeout on a request. +func NewDcimModulesDeleteParamsWithTimeout(timeout time.Duration) *DcimModulesDeleteParams { + return &DcimModulesDeleteParams{ + timeout: timeout, + } +} + +// NewDcimModulesDeleteParamsWithContext creates a new DcimModulesDeleteParams object +// with the ability to set a context for a request. +func NewDcimModulesDeleteParamsWithContext(ctx context.Context) *DcimModulesDeleteParams { + return &DcimModulesDeleteParams{ + Context: ctx, + } +} + +// NewDcimModulesDeleteParamsWithHTTPClient creates a new DcimModulesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesDeleteParamsWithHTTPClient(client *http.Client) *DcimModulesDeleteParams { + return &DcimModulesDeleteParams{ + HTTPClient: client, + } +} + +/* DcimModulesDeleteParams contains all the parameters to send to the API endpoint + for the dcim modules delete operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesDeleteParams struct { + + /* ID. + + A unique integer value identifying this module. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesDeleteParams) WithDefaults() *DcimModulesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules delete params +func (o *DcimModulesDeleteParams) WithTimeout(timeout time.Duration) *DcimModulesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules delete params +func (o *DcimModulesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules delete params +func (o *DcimModulesDeleteParams) WithContext(ctx context.Context) *DcimModulesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules delete params +func (o *DcimModulesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules delete params +func (o *DcimModulesDeleteParams) WithHTTPClient(client *http.Client) *DcimModulesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules delete params +func (o *DcimModulesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim modules delete params +func (o *DcimModulesDeleteParams) WithID(id int64) *DcimModulesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim modules delete params +func (o *DcimModulesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesDeleteParams) 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/netbox/client/dcim/dcim_modules_delete_responses.go b/netbox/client/dcim/dcim_modules_delete_responses.go new file mode 100644 index 000000000..cf3667492 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_delete_responses.go @@ -0,0 +1,68 @@ +// 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" + "github.com/go-openapi/strfmt" +) + +// DcimModulesDeleteReader is a Reader for the DcimModulesDelete structure. +type DcimModulesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDcimModulesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesDeleteNoContent creates a DcimModulesDeleteNoContent with default headers values +func NewDcimModulesDeleteNoContent() *DcimModulesDeleteNoContent { + return &DcimModulesDeleteNoContent{} +} + +/* DcimModulesDeleteNoContent describes a response with status code 204, with default header values. + +DcimModulesDeleteNoContent dcim modules delete no content +*/ +type DcimModulesDeleteNoContent struct { +} + +func (o *DcimModulesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /dcim/modules/{id}/][%d] dcimModulesDeleteNoContent ", 204) +} + +func (o *DcimModulesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_list_parameters.go b/netbox/client/dcim/dcim_modules_list_parameters.go new file mode 100644 index 000000000..359f5399b --- /dev/null +++ b/netbox/client/dcim/dcim_modules_list_parameters.go @@ -0,0 +1,1606 @@ +// 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" +) + +// NewDcimModulesListParams creates a new DcimModulesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesListParams() *DcimModulesListParams { + return &DcimModulesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesListParamsWithTimeout creates a new DcimModulesListParams object +// with the ability to set a timeout on a request. +func NewDcimModulesListParamsWithTimeout(timeout time.Duration) *DcimModulesListParams { + return &DcimModulesListParams{ + timeout: timeout, + } +} + +// NewDcimModulesListParamsWithContext creates a new DcimModulesListParams object +// with the ability to set a context for a request. +func NewDcimModulesListParamsWithContext(ctx context.Context) *DcimModulesListParams { + return &DcimModulesListParams{ + Context: ctx, + } +} + +// NewDcimModulesListParamsWithHTTPClient creates a new DcimModulesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesListParamsWithHTTPClient(client *http.Client) *DcimModulesListParams { + return &DcimModulesListParams{ + HTTPClient: client, + } +} + +/* DcimModulesListParams contains all the parameters to send to the API endpoint + for the dcim modules list operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesListParams struct { + + // AssetTag. + AssetTag *string + + // AssetTagIc. + AssetTagIc *string + + // AssetTagIe. + AssetTagIe *string + + // AssetTagIew. + AssetTagIew *string + + // AssetTagIsw. + AssetTagIsw *string + + // AssetTagn. + AssetTagn *string + + // AssetTagNic. + AssetTagNic *string + + // AssetTagNie. + AssetTagNie *string + + // AssetTagNiew. + AssetTagNiew *string + + // AssetTagNisw. + AssetTagNisw *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // DeviceID. + DeviceID *string + + // DeviceIDn. + DeviceIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Manufacturer. + Manufacturer *string + + // Manufacturern. + Manufacturern *string + + // ManufacturerID. + ManufacturerID *string + + // ManufacturerIDn. + ManufacturerIDn *string + + // ModuleType. + ModuleType *string + + // ModuleTypen. + ModuleTypen *string + + // ModuleTypeID. + ModuleTypeID *string + + // ModuleTypeIDn. + ModuleTypeIDn *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Serial. + Serial *string + + // SerialIc. + SerialIc *string + + // SerialIe. + SerialIe *string + + // SerialIew. + SerialIew *string + + // SerialIsw. + SerialIsw *string + + // Serialn. + Serialn *string + + // SerialNic. + SerialNic *string + + // SerialNie. + SerialNie *string + + // SerialNiew. + SerialNiew *string + + // SerialNisw. + SerialNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesListParams) WithDefaults() *DcimModulesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules list params +func (o *DcimModulesListParams) WithTimeout(timeout time.Duration) *DcimModulesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules list params +func (o *DcimModulesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules list params +func (o *DcimModulesListParams) WithContext(ctx context.Context) *DcimModulesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules list params +func (o *DcimModulesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules list params +func (o *DcimModulesListParams) WithHTTPClient(client *http.Client) *DcimModulesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules list params +func (o *DcimModulesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAssetTag adds the assetTag to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTag(assetTag *string) *DcimModulesListParams { + o.SetAssetTag(assetTag) + return o +} + +// SetAssetTag adds the assetTag to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTag(assetTag *string) { + o.AssetTag = assetTag +} + +// WithAssetTagIc adds the assetTagIc to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagIc(assetTagIc *string) *DcimModulesListParams { + o.SetAssetTagIc(assetTagIc) + return o +} + +// SetAssetTagIc adds the assetTagIc to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagIc(assetTagIc *string) { + o.AssetTagIc = assetTagIc +} + +// WithAssetTagIe adds the assetTagIe to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagIe(assetTagIe *string) *DcimModulesListParams { + o.SetAssetTagIe(assetTagIe) + return o +} + +// SetAssetTagIe adds the assetTagIe to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagIe(assetTagIe *string) { + o.AssetTagIe = assetTagIe +} + +// WithAssetTagIew adds the assetTagIew to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagIew(assetTagIew *string) *DcimModulesListParams { + o.SetAssetTagIew(assetTagIew) + return o +} + +// SetAssetTagIew adds the assetTagIew to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagIew(assetTagIew *string) { + o.AssetTagIew = assetTagIew +} + +// WithAssetTagIsw adds the assetTagIsw to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagIsw(assetTagIsw *string) *DcimModulesListParams { + o.SetAssetTagIsw(assetTagIsw) + return o +} + +// SetAssetTagIsw adds the assetTagIsw to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagIsw(assetTagIsw *string) { + o.AssetTagIsw = assetTagIsw +} + +// WithAssetTagn adds the assetTagn to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagn(assetTagn *string) *DcimModulesListParams { + o.SetAssetTagn(assetTagn) + return o +} + +// SetAssetTagn adds the assetTagN to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagn(assetTagn *string) { + o.AssetTagn = assetTagn +} + +// WithAssetTagNic adds the assetTagNic to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagNic(assetTagNic *string) *DcimModulesListParams { + o.SetAssetTagNic(assetTagNic) + return o +} + +// SetAssetTagNic adds the assetTagNic to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagNic(assetTagNic *string) { + o.AssetTagNic = assetTagNic +} + +// WithAssetTagNie adds the assetTagNie to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagNie(assetTagNie *string) *DcimModulesListParams { + o.SetAssetTagNie(assetTagNie) + return o +} + +// SetAssetTagNie adds the assetTagNie to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagNie(assetTagNie *string) { + o.AssetTagNie = assetTagNie +} + +// WithAssetTagNiew adds the assetTagNiew to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagNiew(assetTagNiew *string) *DcimModulesListParams { + o.SetAssetTagNiew(assetTagNiew) + return o +} + +// SetAssetTagNiew adds the assetTagNiew to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagNiew(assetTagNiew *string) { + o.AssetTagNiew = assetTagNiew +} + +// WithAssetTagNisw adds the assetTagNisw to the dcim modules list params +func (o *DcimModulesListParams) WithAssetTagNisw(assetTagNisw *string) *DcimModulesListParams { + o.SetAssetTagNisw(assetTagNisw) + return o +} + +// SetAssetTagNisw adds the assetTagNisw to the dcim modules list params +func (o *DcimModulesListParams) SetAssetTagNisw(assetTagNisw *string) { + o.AssetTagNisw = assetTagNisw +} + +// WithCreated adds the created to the dcim modules list params +func (o *DcimModulesListParams) WithCreated(created *string) *DcimModulesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the dcim modules list params +func (o *DcimModulesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the dcim modules list params +func (o *DcimModulesListParams) WithCreatedGte(createdGte *string) *DcimModulesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the dcim modules list params +func (o *DcimModulesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the dcim modules list params +func (o *DcimModulesListParams) WithCreatedLte(createdLte *string) *DcimModulesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the dcim modules list params +func (o *DcimModulesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDeviceID adds the deviceID to the dcim modules list params +func (o *DcimModulesListParams) WithDeviceID(deviceID *string) *DcimModulesListParams { + o.SetDeviceID(deviceID) + return o +} + +// SetDeviceID adds the deviceId to the dcim modules list params +func (o *DcimModulesListParams) SetDeviceID(deviceID *string) { + o.DeviceID = deviceID +} + +// WithDeviceIDn adds the deviceIDn to the dcim modules list params +func (o *DcimModulesListParams) WithDeviceIDn(deviceIDn *string) *DcimModulesListParams { + o.SetDeviceIDn(deviceIDn) + return o +} + +// SetDeviceIDn adds the deviceIdN to the dcim modules list params +func (o *DcimModulesListParams) SetDeviceIDn(deviceIDn *string) { + o.DeviceIDn = deviceIDn +} + +// WithID adds the id to the dcim modules list params +func (o *DcimModulesListParams) WithID(id *string) *DcimModulesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim modules list params +func (o *DcimModulesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the dcim modules list params +func (o *DcimModulesListParams) WithIDGt(iDGt *string) *DcimModulesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the dcim modules list params +func (o *DcimModulesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the dcim modules list params +func (o *DcimModulesListParams) WithIDGte(iDGte *string) *DcimModulesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the dcim modules list params +func (o *DcimModulesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the dcim modules list params +func (o *DcimModulesListParams) WithIDLt(iDLt *string) *DcimModulesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the dcim modules list params +func (o *DcimModulesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the dcim modules list params +func (o *DcimModulesListParams) WithIDLte(iDLte *string) *DcimModulesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the dcim modules list params +func (o *DcimModulesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the dcim modules list params +func (o *DcimModulesListParams) WithIDn(iDn *string) *DcimModulesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the dcim modules list params +func (o *DcimModulesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the dcim modules list params +func (o *DcimModulesListParams) WithLastUpdated(lastUpdated *string) *DcimModulesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the dcim modules list params +func (o *DcimModulesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the dcim modules list params +func (o *DcimModulesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *DcimModulesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the dcim modules list params +func (o *DcimModulesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the dcim modules list params +func (o *DcimModulesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *DcimModulesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the dcim modules list params +func (o *DcimModulesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the dcim modules list params +func (o *DcimModulesListParams) WithLimit(limit *int64) *DcimModulesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the dcim modules list params +func (o *DcimModulesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithManufacturer adds the manufacturer to the dcim modules list params +func (o *DcimModulesListParams) WithManufacturer(manufacturer *string) *DcimModulesListParams { + o.SetManufacturer(manufacturer) + return o +} + +// SetManufacturer adds the manufacturer to the dcim modules list params +func (o *DcimModulesListParams) SetManufacturer(manufacturer *string) { + o.Manufacturer = manufacturer +} + +// WithManufacturern adds the manufacturern to the dcim modules list params +func (o *DcimModulesListParams) WithManufacturern(manufacturern *string) *DcimModulesListParams { + o.SetManufacturern(manufacturern) + return o +} + +// SetManufacturern adds the manufacturerN to the dcim modules list params +func (o *DcimModulesListParams) SetManufacturern(manufacturern *string) { + o.Manufacturern = manufacturern +} + +// WithManufacturerID adds the manufacturerID to the dcim modules list params +func (o *DcimModulesListParams) WithManufacturerID(manufacturerID *string) *DcimModulesListParams { + o.SetManufacturerID(manufacturerID) + return o +} + +// SetManufacturerID adds the manufacturerId to the dcim modules list params +func (o *DcimModulesListParams) SetManufacturerID(manufacturerID *string) { + o.ManufacturerID = manufacturerID +} + +// WithManufacturerIDn adds the manufacturerIDn to the dcim modules list params +func (o *DcimModulesListParams) WithManufacturerIDn(manufacturerIDn *string) *DcimModulesListParams { + o.SetManufacturerIDn(manufacturerIDn) + return o +} + +// SetManufacturerIDn adds the manufacturerIdN to the dcim modules list params +func (o *DcimModulesListParams) SetManufacturerIDn(manufacturerIDn *string) { + o.ManufacturerIDn = manufacturerIDn +} + +// WithModuleType adds the moduleType to the dcim modules list params +func (o *DcimModulesListParams) WithModuleType(moduleType *string) *DcimModulesListParams { + o.SetModuleType(moduleType) + return o +} + +// SetModuleType adds the moduleType to the dcim modules list params +func (o *DcimModulesListParams) SetModuleType(moduleType *string) { + o.ModuleType = moduleType +} + +// WithModuleTypen adds the moduleTypen to the dcim modules list params +func (o *DcimModulesListParams) WithModuleTypen(moduleTypen *string) *DcimModulesListParams { + o.SetModuleTypen(moduleTypen) + return o +} + +// SetModuleTypen adds the moduleTypeN to the dcim modules list params +func (o *DcimModulesListParams) SetModuleTypen(moduleTypen *string) { + o.ModuleTypen = moduleTypen +} + +// WithModuleTypeID adds the moduleTypeID to the dcim modules list params +func (o *DcimModulesListParams) WithModuleTypeID(moduleTypeID *string) *DcimModulesListParams { + o.SetModuleTypeID(moduleTypeID) + return o +} + +// SetModuleTypeID adds the moduleTypeId to the dcim modules list params +func (o *DcimModulesListParams) SetModuleTypeID(moduleTypeID *string) { + o.ModuleTypeID = moduleTypeID +} + +// WithModuleTypeIDn adds the moduleTypeIDn to the dcim modules list params +func (o *DcimModulesListParams) WithModuleTypeIDn(moduleTypeIDn *string) *DcimModulesListParams { + o.SetModuleTypeIDn(moduleTypeIDn) + return o +} + +// SetModuleTypeIDn adds the moduleTypeIdN to the dcim modules list params +func (o *DcimModulesListParams) SetModuleTypeIDn(moduleTypeIDn *string) { + o.ModuleTypeIDn = moduleTypeIDn +} + +// WithOffset adds the offset to the dcim modules list params +func (o *DcimModulesListParams) WithOffset(offset *int64) *DcimModulesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the dcim modules list params +func (o *DcimModulesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the dcim modules list params +func (o *DcimModulesListParams) WithQ(q *string) *DcimModulesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim modules list params +func (o *DcimModulesListParams) SetQ(q *string) { + o.Q = q +} + +// WithSerial adds the serial to the dcim modules list params +func (o *DcimModulesListParams) WithSerial(serial *string) *DcimModulesListParams { + o.SetSerial(serial) + return o +} + +// SetSerial adds the serial to the dcim modules list params +func (o *DcimModulesListParams) SetSerial(serial *string) { + o.Serial = serial +} + +// WithSerialIc adds the serialIc to the dcim modules list params +func (o *DcimModulesListParams) WithSerialIc(serialIc *string) *DcimModulesListParams { + o.SetSerialIc(serialIc) + return o +} + +// SetSerialIc adds the serialIc to the dcim modules list params +func (o *DcimModulesListParams) SetSerialIc(serialIc *string) { + o.SerialIc = serialIc +} + +// WithSerialIe adds the serialIe to the dcim modules list params +func (o *DcimModulesListParams) WithSerialIe(serialIe *string) *DcimModulesListParams { + o.SetSerialIe(serialIe) + return o +} + +// SetSerialIe adds the serialIe to the dcim modules list params +func (o *DcimModulesListParams) SetSerialIe(serialIe *string) { + o.SerialIe = serialIe +} + +// WithSerialIew adds the serialIew to the dcim modules list params +func (o *DcimModulesListParams) WithSerialIew(serialIew *string) *DcimModulesListParams { + o.SetSerialIew(serialIew) + return o +} + +// SetSerialIew adds the serialIew to the dcim modules list params +func (o *DcimModulesListParams) SetSerialIew(serialIew *string) { + o.SerialIew = serialIew +} + +// WithSerialIsw adds the serialIsw to the dcim modules list params +func (o *DcimModulesListParams) WithSerialIsw(serialIsw *string) *DcimModulesListParams { + o.SetSerialIsw(serialIsw) + return o +} + +// SetSerialIsw adds the serialIsw to the dcim modules list params +func (o *DcimModulesListParams) SetSerialIsw(serialIsw *string) { + o.SerialIsw = serialIsw +} + +// WithSerialn adds the serialn to the dcim modules list params +func (o *DcimModulesListParams) WithSerialn(serialn *string) *DcimModulesListParams { + o.SetSerialn(serialn) + return o +} + +// SetSerialn adds the serialN to the dcim modules list params +func (o *DcimModulesListParams) SetSerialn(serialn *string) { + o.Serialn = serialn +} + +// WithSerialNic adds the serialNic to the dcim modules list params +func (o *DcimModulesListParams) WithSerialNic(serialNic *string) *DcimModulesListParams { + o.SetSerialNic(serialNic) + return o +} + +// SetSerialNic adds the serialNic to the dcim modules list params +func (o *DcimModulesListParams) SetSerialNic(serialNic *string) { + o.SerialNic = serialNic +} + +// WithSerialNie adds the serialNie to the dcim modules list params +func (o *DcimModulesListParams) WithSerialNie(serialNie *string) *DcimModulesListParams { + o.SetSerialNie(serialNie) + return o +} + +// SetSerialNie adds the serialNie to the dcim modules list params +func (o *DcimModulesListParams) SetSerialNie(serialNie *string) { + o.SerialNie = serialNie +} + +// WithSerialNiew adds the serialNiew to the dcim modules list params +func (o *DcimModulesListParams) WithSerialNiew(serialNiew *string) *DcimModulesListParams { + o.SetSerialNiew(serialNiew) + return o +} + +// SetSerialNiew adds the serialNiew to the dcim modules list params +func (o *DcimModulesListParams) SetSerialNiew(serialNiew *string) { + o.SerialNiew = serialNiew +} + +// WithSerialNisw adds the serialNisw to the dcim modules list params +func (o *DcimModulesListParams) WithSerialNisw(serialNisw *string) *DcimModulesListParams { + o.SetSerialNisw(serialNisw) + return o +} + +// SetSerialNisw adds the serialNisw to the dcim modules list params +func (o *DcimModulesListParams) SetSerialNisw(serialNisw *string) { + o.SerialNisw = serialNisw +} + +// WithTag adds the tag to the dcim modules list params +func (o *DcimModulesListParams) WithTag(tag *string) *DcimModulesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim modules list params +func (o *DcimModulesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim modules list params +func (o *DcimModulesListParams) WithTagn(tagn *string) *DcimModulesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim modules list params +func (o *DcimModulesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AssetTag != nil { + + // query param asset_tag + var qrAssetTag string + + if o.AssetTag != nil { + qrAssetTag = *o.AssetTag + } + qAssetTag := qrAssetTag + if qAssetTag != "" { + + if err := r.SetQueryParam("asset_tag", qAssetTag); err != nil { + return err + } + } + } + + if o.AssetTagIc != nil { + + // query param asset_tag__ic + var qrAssetTagIc string + + if o.AssetTagIc != nil { + qrAssetTagIc = *o.AssetTagIc + } + qAssetTagIc := qrAssetTagIc + if qAssetTagIc != "" { + + if err := r.SetQueryParam("asset_tag__ic", qAssetTagIc); err != nil { + return err + } + } + } + + if o.AssetTagIe != nil { + + // query param asset_tag__ie + var qrAssetTagIe string + + if o.AssetTagIe != nil { + qrAssetTagIe = *o.AssetTagIe + } + qAssetTagIe := qrAssetTagIe + if qAssetTagIe != "" { + + if err := r.SetQueryParam("asset_tag__ie", qAssetTagIe); err != nil { + return err + } + } + } + + if o.AssetTagIew != nil { + + // query param asset_tag__iew + var qrAssetTagIew string + + if o.AssetTagIew != nil { + qrAssetTagIew = *o.AssetTagIew + } + qAssetTagIew := qrAssetTagIew + if qAssetTagIew != "" { + + if err := r.SetQueryParam("asset_tag__iew", qAssetTagIew); err != nil { + return err + } + } + } + + if o.AssetTagIsw != nil { + + // query param asset_tag__isw + var qrAssetTagIsw string + + if o.AssetTagIsw != nil { + qrAssetTagIsw = *o.AssetTagIsw + } + qAssetTagIsw := qrAssetTagIsw + if qAssetTagIsw != "" { + + if err := r.SetQueryParam("asset_tag__isw", qAssetTagIsw); err != nil { + return err + } + } + } + + if o.AssetTagn != nil { + + // query param asset_tag__n + var qrAssetTagn string + + if o.AssetTagn != nil { + qrAssetTagn = *o.AssetTagn + } + qAssetTagn := qrAssetTagn + if qAssetTagn != "" { + + if err := r.SetQueryParam("asset_tag__n", qAssetTagn); err != nil { + return err + } + } + } + + if o.AssetTagNic != nil { + + // query param asset_tag__nic + var qrAssetTagNic string + + if o.AssetTagNic != nil { + qrAssetTagNic = *o.AssetTagNic + } + qAssetTagNic := qrAssetTagNic + if qAssetTagNic != "" { + + if err := r.SetQueryParam("asset_tag__nic", qAssetTagNic); err != nil { + return err + } + } + } + + if o.AssetTagNie != nil { + + // query param asset_tag__nie + var qrAssetTagNie string + + if o.AssetTagNie != nil { + qrAssetTagNie = *o.AssetTagNie + } + qAssetTagNie := qrAssetTagNie + if qAssetTagNie != "" { + + if err := r.SetQueryParam("asset_tag__nie", qAssetTagNie); err != nil { + return err + } + } + } + + if o.AssetTagNiew != nil { + + // query param asset_tag__niew + var qrAssetTagNiew string + + if o.AssetTagNiew != nil { + qrAssetTagNiew = *o.AssetTagNiew + } + qAssetTagNiew := qrAssetTagNiew + if qAssetTagNiew != "" { + + if err := r.SetQueryParam("asset_tag__niew", qAssetTagNiew); err != nil { + return err + } + } + } + + if o.AssetTagNisw != nil { + + // query param asset_tag__nisw + var qrAssetTagNisw string + + if o.AssetTagNisw != nil { + qrAssetTagNisw = *o.AssetTagNisw + } + qAssetTagNisw := qrAssetTagNisw + if qAssetTagNisw != "" { + + if err := r.SetQueryParam("asset_tag__nisw", qAssetTagNisw); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.DeviceID != nil { + + // query param device_id + var qrDeviceID string + + if o.DeviceID != nil { + qrDeviceID = *o.DeviceID + } + qDeviceID := qrDeviceID + if qDeviceID != "" { + + if err := r.SetQueryParam("device_id", qDeviceID); err != nil { + return err + } + } + } + + if o.DeviceIDn != nil { + + // query param device_id__n + var qrDeviceIDn string + + if o.DeviceIDn != nil { + qrDeviceIDn = *o.DeviceIDn + } + qDeviceIDn := qrDeviceIDn + if qDeviceIDn != "" { + + if err := r.SetQueryParam("device_id__n", qDeviceIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Manufacturer != nil { + + // query param manufacturer + var qrManufacturer string + + if o.Manufacturer != nil { + qrManufacturer = *o.Manufacturer + } + qManufacturer := qrManufacturer + if qManufacturer != "" { + + if err := r.SetQueryParam("manufacturer", qManufacturer); err != nil { + return err + } + } + } + + if o.Manufacturern != nil { + + // query param manufacturer__n + var qrManufacturern string + + if o.Manufacturern != nil { + qrManufacturern = *o.Manufacturern + } + qManufacturern := qrManufacturern + if qManufacturern != "" { + + if err := r.SetQueryParam("manufacturer__n", qManufacturern); err != nil { + return err + } + } + } + + if o.ManufacturerID != nil { + + // query param manufacturer_id + var qrManufacturerID string + + if o.ManufacturerID != nil { + qrManufacturerID = *o.ManufacturerID + } + qManufacturerID := qrManufacturerID + if qManufacturerID != "" { + + if err := r.SetQueryParam("manufacturer_id", qManufacturerID); err != nil { + return err + } + } + } + + if o.ManufacturerIDn != nil { + + // query param manufacturer_id__n + var qrManufacturerIDn string + + if o.ManufacturerIDn != nil { + qrManufacturerIDn = *o.ManufacturerIDn + } + qManufacturerIDn := qrManufacturerIDn + if qManufacturerIDn != "" { + + if err := r.SetQueryParam("manufacturer_id__n", qManufacturerIDn); err != nil { + return err + } + } + } + + if o.ModuleType != nil { + + // query param module_type + var qrModuleType string + + if o.ModuleType != nil { + qrModuleType = *o.ModuleType + } + qModuleType := qrModuleType + if qModuleType != "" { + + if err := r.SetQueryParam("module_type", qModuleType); err != nil { + return err + } + } + } + + if o.ModuleTypen != nil { + + // query param module_type__n + var qrModuleTypen string + + if o.ModuleTypen != nil { + qrModuleTypen = *o.ModuleTypen + } + qModuleTypen := qrModuleTypen + if qModuleTypen != "" { + + if err := r.SetQueryParam("module_type__n", qModuleTypen); err != nil { + return err + } + } + } + + if o.ModuleTypeID != nil { + + // query param module_type_id + var qrModuleTypeID string + + if o.ModuleTypeID != nil { + qrModuleTypeID = *o.ModuleTypeID + } + qModuleTypeID := qrModuleTypeID + if qModuleTypeID != "" { + + if err := r.SetQueryParam("module_type_id", qModuleTypeID); err != nil { + return err + } + } + } + + if o.ModuleTypeIDn != nil { + + // query param module_type_id__n + var qrModuleTypeIDn string + + if o.ModuleTypeIDn != nil { + qrModuleTypeIDn = *o.ModuleTypeIDn + } + qModuleTypeIDn := qrModuleTypeIDn + if qModuleTypeIDn != "" { + + if err := r.SetQueryParam("module_type_id__n", qModuleTypeIDn); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Serial != nil { + + // query param serial + var qrSerial string + + if o.Serial != nil { + qrSerial = *o.Serial + } + qSerial := qrSerial + if qSerial != "" { + + if err := r.SetQueryParam("serial", qSerial); err != nil { + return err + } + } + } + + if o.SerialIc != nil { + + // query param serial__ic + var qrSerialIc string + + if o.SerialIc != nil { + qrSerialIc = *o.SerialIc + } + qSerialIc := qrSerialIc + if qSerialIc != "" { + + if err := r.SetQueryParam("serial__ic", qSerialIc); err != nil { + return err + } + } + } + + if o.SerialIe != nil { + + // query param serial__ie + var qrSerialIe string + + if o.SerialIe != nil { + qrSerialIe = *o.SerialIe + } + qSerialIe := qrSerialIe + if qSerialIe != "" { + + if err := r.SetQueryParam("serial__ie", qSerialIe); err != nil { + return err + } + } + } + + if o.SerialIew != nil { + + // query param serial__iew + var qrSerialIew string + + if o.SerialIew != nil { + qrSerialIew = *o.SerialIew + } + qSerialIew := qrSerialIew + if qSerialIew != "" { + + if err := r.SetQueryParam("serial__iew", qSerialIew); err != nil { + return err + } + } + } + + if o.SerialIsw != nil { + + // query param serial__isw + var qrSerialIsw string + + if o.SerialIsw != nil { + qrSerialIsw = *o.SerialIsw + } + qSerialIsw := qrSerialIsw + if qSerialIsw != "" { + + if err := r.SetQueryParam("serial__isw", qSerialIsw); err != nil { + return err + } + } + } + + if o.Serialn != nil { + + // query param serial__n + var qrSerialn string + + if o.Serialn != nil { + qrSerialn = *o.Serialn + } + qSerialn := qrSerialn + if qSerialn != "" { + + if err := r.SetQueryParam("serial__n", qSerialn); err != nil { + return err + } + } + } + + if o.SerialNic != nil { + + // query param serial__nic + var qrSerialNic string + + if o.SerialNic != nil { + qrSerialNic = *o.SerialNic + } + qSerialNic := qrSerialNic + if qSerialNic != "" { + + if err := r.SetQueryParam("serial__nic", qSerialNic); err != nil { + return err + } + } + } + + if o.SerialNie != nil { + + // query param serial__nie + var qrSerialNie string + + if o.SerialNie != nil { + qrSerialNie = *o.SerialNie + } + qSerialNie := qrSerialNie + if qSerialNie != "" { + + if err := r.SetQueryParam("serial__nie", qSerialNie); err != nil { + return err + } + } + } + + if o.SerialNiew != nil { + + // query param serial__niew + var qrSerialNiew string + + if o.SerialNiew != nil { + qrSerialNiew = *o.SerialNiew + } + qSerialNiew := qrSerialNiew + if qSerialNiew != "" { + + if err := r.SetQueryParam("serial__niew", qSerialNiew); err != nil { + return err + } + } + } + + if o.SerialNisw != nil { + + // query param serial__nisw + var qrSerialNisw string + + if o.SerialNisw != nil { + qrSerialNisw = *o.SerialNisw + } + qSerialNisw := qrSerialNisw + if qSerialNisw != "" { + + if err := r.SetQueryParam("serial__nisw", qSerialNisw); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/dcim/dcim_modules_list_responses.go b/netbox/client/dcim/dcim_modules_list_responses.go new file mode 100644 index 000000000..f5e7aaf0d --- /dev/null +++ b/netbox/client/dcim/dcim_modules_list_responses.go @@ -0,0 +1,247 @@ +// 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" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesListReader is a Reader for the DcimModulesList structure. +type DcimModulesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModulesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesListOK creates a DcimModulesListOK with default headers values +func NewDcimModulesListOK() *DcimModulesListOK { + return &DcimModulesListOK{} +} + +/* DcimModulesListOK describes a response with status code 200, with default header values. + +DcimModulesListOK dcim modules list o k +*/ +type DcimModulesListOK struct { + Payload *DcimModulesListOKBody +} + +func (o *DcimModulesListOK) Error() string { + return fmt.Sprintf("[GET /dcim/modules/][%d] dcimModulesListOK %+v", 200, o.Payload) +} +func (o *DcimModulesListOK) GetPayload() *DcimModulesListOKBody { + return o.Payload +} + +func (o *DcimModulesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(DcimModulesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*DcimModulesListOKBody dcim modules list o k body +swagger:model DcimModulesListOKBody +*/ +type DcimModulesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.Module `json:"results"` +} + +// Validate validates this dcim modules list o k body +func (o *DcimModulesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModulesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("dcimModulesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *DcimModulesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("dcimModulesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModulesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("dcimModulesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *DcimModulesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("dcimModulesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModulesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModulesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this dcim modules list o k body based on the context it is used +func (o *DcimModulesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *DcimModulesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dcimModulesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimModulesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *DcimModulesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *DcimModulesListOKBody) UnmarshalBinary(b []byte) error { + var res DcimModulesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/dcim/dcim_modules_partial_update_parameters.go b/netbox/client/dcim/dcim_modules_partial_update_parameters.go new file mode 100644 index 000000000..4a3dcd774 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModulesPartialUpdateParams creates a new DcimModulesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesPartialUpdateParams() *DcimModulesPartialUpdateParams { + return &DcimModulesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesPartialUpdateParamsWithTimeout creates a new DcimModulesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModulesPartialUpdateParamsWithTimeout(timeout time.Duration) *DcimModulesPartialUpdateParams { + return &DcimModulesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModulesPartialUpdateParamsWithContext creates a new DcimModulesPartialUpdateParams object +// with the ability to set a context for a request. +func NewDcimModulesPartialUpdateParamsWithContext(ctx context.Context) *DcimModulesPartialUpdateParams { + return &DcimModulesPartialUpdateParams{ + Context: ctx, + } +} + +// NewDcimModulesPartialUpdateParamsWithHTTPClient creates a new DcimModulesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesPartialUpdateParamsWithHTTPClient(client *http.Client) *DcimModulesPartialUpdateParams { + return &DcimModulesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModulesPartialUpdateParams contains all the parameters to send to the API endpoint + for the dcim modules partial update operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesPartialUpdateParams struct { + + // Data. + Data *models.WritableModule + + /* ID. + + A unique integer value identifying this module. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesPartialUpdateParams) WithDefaults() *DcimModulesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) WithTimeout(timeout time.Duration) *DcimModulesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) WithContext(ctx context.Context) *DcimModulesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) WithHTTPClient(client *http.Client) *DcimModulesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) WithData(data *models.WritableModule) *DcimModulesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) SetData(data *models.WritableModule) { + o.Data = data +} + +// WithID adds the id to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) WithID(id int64) *DcimModulesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim modules partial update params +func (o *DcimModulesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_modules_partial_update_responses.go b/netbox/client/dcim/dcim_modules_partial_update_responses.go new file mode 100644 index 000000000..3e0c4fb1b --- /dev/null +++ b/netbox/client/dcim/dcim_modules_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesPartialUpdateReader is a Reader for the DcimModulesPartialUpdate structure. +type DcimModulesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModulesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesPartialUpdateOK creates a DcimModulesPartialUpdateOK with default headers values +func NewDcimModulesPartialUpdateOK() *DcimModulesPartialUpdateOK { + return &DcimModulesPartialUpdateOK{} +} + +/* DcimModulesPartialUpdateOK describes a response with status code 200, with default header values. + +DcimModulesPartialUpdateOK dcim modules partial update o k +*/ +type DcimModulesPartialUpdateOK struct { + Payload *models.Module +} + +func (o *DcimModulesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /dcim/modules/{id}/][%d] dcimModulesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModulesPartialUpdateOK) GetPayload() *models.Module { + return o.Payload +} + +func (o *DcimModulesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Module) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_read_parameters.go b/netbox/client/dcim/dcim_modules_read_parameters.go new file mode 100644 index 000000000..8848dc690 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_read_parameters.go @@ -0,0 +1,165 @@ +// 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" +) + +// NewDcimModulesReadParams creates a new DcimModulesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesReadParams() *DcimModulesReadParams { + return &DcimModulesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesReadParamsWithTimeout creates a new DcimModulesReadParams object +// with the ability to set a timeout on a request. +func NewDcimModulesReadParamsWithTimeout(timeout time.Duration) *DcimModulesReadParams { + return &DcimModulesReadParams{ + timeout: timeout, + } +} + +// NewDcimModulesReadParamsWithContext creates a new DcimModulesReadParams object +// with the ability to set a context for a request. +func NewDcimModulesReadParamsWithContext(ctx context.Context) *DcimModulesReadParams { + return &DcimModulesReadParams{ + Context: ctx, + } +} + +// NewDcimModulesReadParamsWithHTTPClient creates a new DcimModulesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesReadParamsWithHTTPClient(client *http.Client) *DcimModulesReadParams { + return &DcimModulesReadParams{ + HTTPClient: client, + } +} + +/* DcimModulesReadParams contains all the parameters to send to the API endpoint + for the dcim modules read operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesReadParams struct { + + /* ID. + + A unique integer value identifying this module. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesReadParams) WithDefaults() *DcimModulesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules read params +func (o *DcimModulesReadParams) WithTimeout(timeout time.Duration) *DcimModulesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules read params +func (o *DcimModulesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules read params +func (o *DcimModulesReadParams) WithContext(ctx context.Context) *DcimModulesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules read params +func (o *DcimModulesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules read params +func (o *DcimModulesReadParams) WithHTTPClient(client *http.Client) *DcimModulesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules read params +func (o *DcimModulesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim modules read params +func (o *DcimModulesReadParams) WithID(id int64) *DcimModulesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim modules read params +func (o *DcimModulesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesReadParams) 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/netbox/client/dcim/dcim_modules_read_responses.go b/netbox/client/dcim/dcim_modules_read_responses.go new file mode 100644 index 000000000..884298de2 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_read_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesReadReader is a Reader for the DcimModulesRead structure. +type DcimModulesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModulesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesReadOK creates a DcimModulesReadOK with default headers values +func NewDcimModulesReadOK() *DcimModulesReadOK { + return &DcimModulesReadOK{} +} + +/* DcimModulesReadOK describes a response with status code 200, with default header values. + +DcimModulesReadOK dcim modules read o k +*/ +type DcimModulesReadOK struct { + Payload *models.Module +} + +func (o *DcimModulesReadOK) Error() string { + return fmt.Sprintf("[GET /dcim/modules/{id}/][%d] dcimModulesReadOK %+v", 200, o.Payload) +} +func (o *DcimModulesReadOK) GetPayload() *models.Module { + return o.Payload +} + +func (o *DcimModulesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Module) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_modules_update_parameters.go b/netbox/client/dcim/dcim_modules_update_parameters.go new file mode 100644 index 000000000..e1bd2fde0 --- /dev/null +++ b/netbox/client/dcim/dcim_modules_update_parameters.go @@ -0,0 +1,186 @@ +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewDcimModulesUpdateParams creates a new DcimModulesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDcimModulesUpdateParams() *DcimModulesUpdateParams { + return &DcimModulesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDcimModulesUpdateParamsWithTimeout creates a new DcimModulesUpdateParams object +// with the ability to set a timeout on a request. +func NewDcimModulesUpdateParamsWithTimeout(timeout time.Duration) *DcimModulesUpdateParams { + return &DcimModulesUpdateParams{ + timeout: timeout, + } +} + +// NewDcimModulesUpdateParamsWithContext creates a new DcimModulesUpdateParams object +// with the ability to set a context for a request. +func NewDcimModulesUpdateParamsWithContext(ctx context.Context) *DcimModulesUpdateParams { + return &DcimModulesUpdateParams{ + Context: ctx, + } +} + +// NewDcimModulesUpdateParamsWithHTTPClient creates a new DcimModulesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewDcimModulesUpdateParamsWithHTTPClient(client *http.Client) *DcimModulesUpdateParams { + return &DcimModulesUpdateParams{ + HTTPClient: client, + } +} + +/* DcimModulesUpdateParams contains all the parameters to send to the API endpoint + for the dcim modules update operation. + + Typically these are written to a http.Request. +*/ +type DcimModulesUpdateParams struct { + + // Data. + Data *models.WritableModule + + /* ID. + + A unique integer value identifying this module. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the dcim modules update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesUpdateParams) WithDefaults() *DcimModulesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the dcim modules update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DcimModulesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the dcim modules update params +func (o *DcimModulesUpdateParams) WithTimeout(timeout time.Duration) *DcimModulesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim modules update params +func (o *DcimModulesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim modules update params +func (o *DcimModulesUpdateParams) WithContext(ctx context.Context) *DcimModulesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim modules update params +func (o *DcimModulesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim modules update params +func (o *DcimModulesUpdateParams) WithHTTPClient(client *http.Client) *DcimModulesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim modules update params +func (o *DcimModulesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the dcim modules update params +func (o *DcimModulesUpdateParams) WithData(data *models.WritableModule) *DcimModulesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the dcim modules update params +func (o *DcimModulesUpdateParams) SetData(data *models.WritableModule) { + o.Data = data +} + +// WithID adds the id to the dcim modules update params +func (o *DcimModulesUpdateParams) WithID(id int64) *DcimModulesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim modules update params +func (o *DcimModulesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimModulesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/dcim/dcim_modules_update_responses.go b/netbox/client/dcim/dcim_modules_update_responses.go new file mode 100644 index 000000000..3ca3d655e --- /dev/null +++ b/netbox/client/dcim/dcim_modules_update_responses.go @@ -0,0 +1,82 @@ +// 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" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// DcimModulesUpdateReader is a Reader for the DcimModulesUpdate structure. +type DcimModulesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DcimModulesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDcimModulesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewDcimModulesUpdateOK creates a DcimModulesUpdateOK with default headers values +func NewDcimModulesUpdateOK() *DcimModulesUpdateOK { + return &DcimModulesUpdateOK{} +} + +/* DcimModulesUpdateOK describes a response with status code 200, with default header values. + +DcimModulesUpdateOK dcim modules update o k +*/ +type DcimModulesUpdateOK struct { + Payload *models.Module +} + +func (o *DcimModulesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /dcim/modules/{id}/][%d] dcimModulesUpdateOK %+v", 200, o.Payload) +} +func (o *DcimModulesUpdateOK) GetPayload() *models.Module { + return o.Payload +} + +func (o *DcimModulesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Module) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/dcim/dcim_platforms_list_parameters.go b/netbox/client/dcim/dcim_platforms_list_parameters.go index 0b2db9a85..00c550498 100644 --- a/netbox/client/dcim/dcim_platforms_list_parameters.go +++ b/netbox/client/dcim/dcim_platforms_list_parameters.go @@ -87,9 +87,6 @@ type DcimPlatformsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -165,9 +162,6 @@ type DcimPlatformsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -198,9 +192,6 @@ type DcimPlatformsListParams struct { // NapalmDriver. NapalmDriver *string - // NapalmDriverEmpty. - NapalmDriverEmpty *string - // NapalmDriverIc. NapalmDriverIc *string @@ -240,9 +231,6 @@ type DcimPlatformsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -270,6 +258,12 @@ type DcimPlatformsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -367,17 +361,6 @@ func (o *DcimPlatformsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimPlatformsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim platforms list params func (o *DcimPlatformsListParams) WithDescriptionIc(descriptionIc *string) *DcimPlatformsListParams { o.SetDescriptionIc(descriptionIc) @@ -642,17 +625,6 @@ func (o *DcimPlatformsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) WithNameEmpty(nameEmpty *string) *DcimPlatformsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim platforms list params func (o *DcimPlatformsListParams) WithNameIc(nameIc *string) *DcimPlatformsListParams { o.SetNameIc(nameIc) @@ -763,17 +735,6 @@ func (o *DcimPlatformsListParams) SetNapalmDriver(napalmDriver *string) { o.NapalmDriver = napalmDriver } -// WithNapalmDriverEmpty adds the napalmDriverEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) WithNapalmDriverEmpty(napalmDriverEmpty *string) *DcimPlatformsListParams { - o.SetNapalmDriverEmpty(napalmDriverEmpty) - return o -} - -// SetNapalmDriverEmpty adds the napalmDriverEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) SetNapalmDriverEmpty(napalmDriverEmpty *string) { - o.NapalmDriverEmpty = napalmDriverEmpty -} - // WithNapalmDriverIc adds the napalmDriverIc to the dcim platforms list params func (o *DcimPlatformsListParams) WithNapalmDriverIc(napalmDriverIc *string) *DcimPlatformsListParams { o.SetNapalmDriverIc(napalmDriverIc) @@ -906,17 +867,6 @@ func (o *DcimPlatformsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) WithSlugEmpty(slugEmpty *string) *DcimPlatformsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim platforms list params -func (o *DcimPlatformsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim platforms list params func (o *DcimPlatformsListParams) WithSlugIc(slugIc *string) *DcimPlatformsListParams { o.SetSlugIc(slugIc) @@ -1016,6 +966,28 @@ func (o *DcimPlatformsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim platforms list params +func (o *DcimPlatformsListParams) WithTag(tag *string) *DcimPlatformsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim platforms list params +func (o *DcimPlatformsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim platforms list params +func (o *DcimPlatformsListParams) WithTagn(tagn *string) *DcimPlatformsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim platforms list params +func (o *DcimPlatformsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1092,23 +1064,6 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1517,23 +1472,6 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1704,23 +1642,6 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.NapalmDriverEmpty != nil { - - // query param napalm_driver__empty - var qrNapalmDriverEmpty string - - if o.NapalmDriverEmpty != nil { - qrNapalmDriverEmpty = *o.NapalmDriverEmpty - } - qNapalmDriverEmpty := qrNapalmDriverEmpty - if qNapalmDriverEmpty != "" { - - if err := r.SetQueryParam("napalm_driver__empty", qNapalmDriverEmpty); err != nil { - return err - } - } - } - if o.NapalmDriverIc != nil { // query param napalm_driver__ic @@ -1925,23 +1846,6 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -2095,6 +1999,40 @@ func (o *DcimPlatformsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + 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/netbox/client/dcim/dcim_platforms_list_responses.go b/netbox/client/dcim/dcim_platforms_list_responses.go index 5c41792f1..92365e6ce 100644 --- a/netbox/client/dcim/dcim_platforms_list_responses.go +++ b/netbox/client/dcim/dcim_platforms_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPlatformsListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPlatformsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPlatformsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPlatformsListOKBody) contextValidateResults(ctx context.Context, fo if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPlatformsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPlatformsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_power_feeds_list_parameters.go b/netbox/client/dcim/dcim_power_feeds_list_parameters.go index ef2bbaf04..c596488c4 100644 --- a/netbox/client/dcim/dcim_power_feeds_list_parameters.go +++ b/netbox/client/dcim/dcim_power_feeds_list_parameters.go @@ -162,9 +162,6 @@ type DcimPowerFeedsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -658,17 +655,6 @@ func (o *DcimPowerFeedsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim power feeds list params -func (o *DcimPowerFeedsListParams) WithNameEmpty(nameEmpty *string) *DcimPowerFeedsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power feeds list params -func (o *DcimPowerFeedsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim power feeds list params func (o *DcimPowerFeedsListParams) WithNameIc(nameIc *string) *DcimPowerFeedsListParams { o.SetNameIc(nameIc) @@ -1626,23 +1612,6 @@ func (o *DcimPowerFeedsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/dcim/dcim_power_feeds_list_responses.go b/netbox/client/dcim/dcim_power_feeds_list_responses.go index 0f2535b97..2167dd787 100644 --- a/netbox/client/dcim/dcim_power_feeds_list_responses.go +++ b/netbox/client/dcim/dcim_power_feeds_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPowerFeedsListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerFeedsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerFeedsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPowerFeedsListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerFeedsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerFeedsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go b/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go index db7fbe131..a9d618a25 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_list_parameters.go @@ -129,12 +129,15 @@ type DcimPowerOutletTemplatesListParams struct { */ Limit *int64 + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -168,6 +171,9 @@ type DcimPowerOutletTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + // Type. Type *string @@ -414,6 +420,28 @@ func (o *DcimPowerOutletTemplatesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithModuletypeID adds the moduletypeID to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimPowerOutletTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimPowerOutletTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithName(name *string) *DcimPowerOutletTemplatesListParams { o.SetName(name) @@ -425,17 +453,6 @@ func (o *DcimPowerOutletTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim power outlet templates list params -func (o *DcimPowerOutletTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimPowerOutletTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power outlet templates list params -func (o *DcimPowerOutletTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithNameIc(nameIc *string) *DcimPowerOutletTemplatesListParams { o.SetNameIc(nameIc) @@ -546,6 +563,17 @@ func (o *DcimPowerOutletTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) WithQ(q *string) *DcimPowerOutletTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim power outlet templates list params +func (o *DcimPowerOutletTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim power outlet templates list params func (o *DcimPowerOutletTemplatesListParams) WithType(typeVar *string) *DcimPowerOutletTemplatesListParams { o.SetType(typeVar) @@ -865,35 +893,52 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuletypeIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param moduletype_id__n + var qrModuletypeIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1069,6 +1114,23 @@ func (o *DcimPowerOutletTemplatesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go b/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go index 27dd313c3..b6bf835a8 100644 --- a/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go +++ b/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPowerOutletTemplatesListOKBody) validateResults(formats strfmt.Regi if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerOutletTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerOutletTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPowerOutletTemplatesListOKBody) contextValidateResults(ctx context. if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerOutletTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerOutletTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_power_outlets_list_parameters.go b/netbox/client/dcim/dcim_power_outlets_list_parameters.go index 122584ff2..f36231f89 100644 --- a/netbox/client/dcim/dcim_power_outlets_list_parameters.go +++ b/netbox/client/dcim/dcim_power_outlets_list_parameters.go @@ -93,9 +93,6 @@ type DcimPowerOutletsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -162,9 +159,6 @@ type DcimPowerOutletsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -219,12 +213,15 @@ type DcimPowerOutletsListParams struct { // LocationIDn. LocationIDn *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -309,6 +306,18 @@ type DcimPowerOutletsListParams struct { // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -428,17 +437,6 @@ func (o *DcimPowerOutletsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim power outlets list params -func (o *DcimPowerOutletsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimPowerOutletsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim power outlets list params -func (o *DcimPowerOutletsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithDescriptionIc(descriptionIc *string) *DcimPowerOutletsListParams { o.SetDescriptionIc(descriptionIc) @@ -681,17 +679,6 @@ func (o *DcimPowerOutletsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim power outlets list params -func (o *DcimPowerOutletsListParams) WithLabelEmpty(labelEmpty *string) *DcimPowerOutletsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim power outlets list params -func (o *DcimPowerOutletsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithLabelIc(labelIc *string) *DcimPowerOutletsListParams { o.SetLabelIc(labelIc) @@ -879,6 +866,28 @@ func (o *DcimPowerOutletsListParams) SetLocationIDn(locationIDn *string) { o.LocationIDn = locationIDn } +// WithModuleID adds the moduleID to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithModuleID(moduleID *string) *DcimPowerOutletsListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithModuleIDn(moduleIDn *string) *DcimPowerOutletsListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithName adds the name to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithName(name *string) *DcimPowerOutletsListParams { o.SetName(name) @@ -890,17 +899,6 @@ func (o *DcimPowerOutletsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim power outlets list params -func (o *DcimPowerOutletsListParams) WithNameEmpty(nameEmpty *string) *DcimPowerOutletsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power outlets list params -func (o *DcimPowerOutletsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim power outlets list params func (o *DcimPowerOutletsListParams) WithNameIc(nameIc *string) *DcimPowerOutletsListParams { o.SetNameIc(nameIc) @@ -1198,6 +1196,50 @@ func (o *DcimPowerOutletsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithVirtualChassis adds the virtualChassis to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithVirtualChassis(virtualChassis *string) *DcimPowerOutletsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimPowerOutletsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimPowerOutletsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimPowerOutletsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim power outlets list params +func (o *DcimPowerOutletsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1308,23 +1350,6 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1699,23 +1724,6 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -2005,35 +2013,52 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.Name != nil { + if o.ModuleID != nil { - // query param name - var qrName string + // query param module_id + var qrModuleID string - if o.Name != nil { - qrName = *o.Name + if o.ModuleID != nil { + qrModuleID = *o.ModuleID } - qName := qrName - if qName != "" { + qModuleID := qrModuleID + if qModuleID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_id", qModuleID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuleIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param module_id__n + var qrModuleIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -2498,6 +2523,74 @@ func (o *DcimPowerOutletsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_power_outlets_list_responses.go b/netbox/client/dcim/dcim_power_outlets_list_responses.go index fda9065fa..63e791fb3 100644 --- a/netbox/client/dcim/dcim_power_outlets_list_responses.go +++ b/netbox/client/dcim/dcim_power_outlets_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPowerOutletsListOKBody) validateResults(formats strfmt.Registry) er if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerOutletsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerOutletsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPowerOutletsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerOutletsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerOutletsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_power_panels_list_parameters.go b/netbox/client/dcim/dcim_power_panels_list_parameters.go index f5ba3bf0b..d66864c5e 100644 --- a/netbox/client/dcim/dcim_power_panels_list_parameters.go +++ b/netbox/client/dcim/dcim_power_panels_list_parameters.go @@ -75,6 +75,18 @@ func NewDcimPowerPanelsListParamsWithHTTPClient(client *http.Client) *DcimPowerP */ type DcimPowerPanelsListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -126,9 +138,6 @@ type DcimPowerPanelsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -260,6 +269,50 @@ func (o *DcimPowerPanelsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithContact(contact *string) *DcimPowerPanelsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithContactn(contactn *string) *DcimPowerPanelsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithContactRole(contactRole *string) *DcimPowerPanelsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithContactRolen(contactRolen *string) *DcimPowerPanelsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithCreated(created *string) *DcimPowerPanelsListParams { o.SetCreated(created) @@ -436,17 +489,6 @@ func (o *DcimPowerPanelsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim power panels list params -func (o *DcimPowerPanelsListParams) WithNameEmpty(nameEmpty *string) *DcimPowerPanelsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power panels list params -func (o *DcimPowerPanelsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim power panels list params func (o *DcimPowerPanelsListParams) WithNameIc(nameIc *string) *DcimPowerPanelsListParams { o.SetNameIc(nameIc) @@ -730,6 +772,74 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1002,23 +1112,6 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/dcim/dcim_power_panels_list_responses.go b/netbox/client/dcim/dcim_power_panels_list_responses.go index 5b330236d..32cdc2501 100644 --- a/netbox/client/dcim/dcim_power_panels_list_responses.go +++ b/netbox/client/dcim/dcim_power_panels_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPowerPanelsListOKBody) validateResults(formats strfmt.Registry) err if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerPanelsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerPanelsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPowerPanelsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerPanelsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerPanelsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_power_port_templates_list_parameters.go b/netbox/client/dcim/dcim_power_port_templates_list_parameters.go index 6510893d5..6734116d2 100644 --- a/netbox/client/dcim/dcim_power_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_power_port_templates_list_parameters.go @@ -159,12 +159,15 @@ type DcimPowerPortTemplatesListParams struct { // MaximumDrawn. MaximumDrawn *string + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -198,6 +201,9 @@ type DcimPowerPortTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + // Type. Type *string @@ -554,6 +560,28 @@ func (o *DcimPowerPortTemplatesListParams) SetMaximumDrawn(maximumDrawn *string) o.MaximumDrawn = maximumDrawn } +// WithModuletypeID adds the moduletypeID to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimPowerPortTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimPowerPortTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithName(name *string) *DcimPowerPortTemplatesListParams { o.SetName(name) @@ -565,17 +593,6 @@ func (o *DcimPowerPortTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim power port templates list params -func (o *DcimPowerPortTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimPowerPortTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power port templates list params -func (o *DcimPowerPortTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithNameIc(nameIc *string) *DcimPowerPortTemplatesListParams { o.SetNameIc(nameIc) @@ -686,6 +703,17 @@ func (o *DcimPowerPortTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) WithQ(q *string) *DcimPowerPortTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim power port templates list params +func (o *DcimPowerPortTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim power port templates list params func (o *DcimPowerPortTemplatesListParams) WithType(typeVar *string) *DcimPowerPortTemplatesListParams { o.SetType(typeVar) @@ -1175,35 +1203,52 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuletypeIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param moduletype_id__n + var qrModuletypeIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1379,6 +1424,23 @@ func (o *DcimPowerPortTemplatesListParams) WriteToRequest(r runtime.ClientReques } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_power_port_templates_list_responses.go b/netbox/client/dcim/dcim_power_port_templates_list_responses.go index d5224a4cf..1e2903207 100644 --- a/netbox/client/dcim/dcim_power_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_power_port_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPowerPortTemplatesListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPowerPortTemplatesListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_power_ports_list_parameters.go b/netbox/client/dcim/dcim_power_ports_list_parameters.go index a1b984eeb..df8656129 100644 --- a/netbox/client/dcim/dcim_power_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_power_ports_list_parameters.go @@ -111,9 +111,6 @@ type DcimPowerPortsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -174,9 +171,6 @@ type DcimPowerPortsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -249,12 +243,15 @@ type DcimPowerPortsListParams struct { // MaximumDrawn. MaximumDrawn *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -339,6 +336,18 @@ type DcimPowerPortsListParams struct { // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -524,17 +533,6 @@ func (o *DcimPowerPortsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim power ports list params -func (o *DcimPowerPortsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimPowerPortsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim power ports list params -func (o *DcimPowerPortsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim power ports list params func (o *DcimPowerPortsListParams) WithDescriptionIc(descriptionIc *string) *DcimPowerPortsListParams { o.SetDescriptionIc(descriptionIc) @@ -755,17 +753,6 @@ func (o *DcimPowerPortsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim power ports list params -func (o *DcimPowerPortsListParams) WithLabelEmpty(labelEmpty *string) *DcimPowerPortsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim power ports list params -func (o *DcimPowerPortsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim power ports list params func (o *DcimPowerPortsListParams) WithLabelIc(labelIc *string) *DcimPowerPortsListParams { o.SetLabelIc(labelIc) @@ -1019,6 +1006,28 @@ func (o *DcimPowerPortsListParams) SetMaximumDrawn(maximumDrawn *string) { o.MaximumDrawn = maximumDrawn } +// WithModuleID adds the moduleID to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithModuleID(moduleID *string) *DcimPowerPortsListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithModuleIDn(moduleIDn *string) *DcimPowerPortsListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithName adds the name to the dcim power ports list params func (o *DcimPowerPortsListParams) WithName(name *string) *DcimPowerPortsListParams { o.SetName(name) @@ -1030,17 +1039,6 @@ func (o *DcimPowerPortsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim power ports list params -func (o *DcimPowerPortsListParams) WithNameEmpty(nameEmpty *string) *DcimPowerPortsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim power ports list params -func (o *DcimPowerPortsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim power ports list params func (o *DcimPowerPortsListParams) WithNameIc(nameIc *string) *DcimPowerPortsListParams { o.SetNameIc(nameIc) @@ -1338,6 +1336,50 @@ func (o *DcimPowerPortsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithVirtualChassis adds the virtualChassis to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithVirtualChassis(virtualChassis *string) *DcimPowerPortsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimPowerPortsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimPowerPortsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim power ports list params +func (o *DcimPowerPortsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimPowerPortsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim power ports list params +func (o *DcimPowerPortsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1550,23 +1592,6 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1907,23 +1932,6 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -2315,35 +2323,52 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.Name != nil { + if o.ModuleID != nil { - // query param name - var qrName string + // query param module_id + var qrModuleID string - if o.Name != nil { - qrName = *o.Name + if o.ModuleID != nil { + qrModuleID = *o.ModuleID } - qName := qrName - if qName != "" { + qModuleID := qrModuleID + if qModuleID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_id", qModuleID); err != nil { return err } } } - if o.NameEmpty != nil { + if o.ModuleIDn != nil { - // query param name__empty - var qrNameEmpty string + // query param module_id__n + var qrModuleIDn string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -2808,6 +2833,74 @@ func (o *DcimPowerPortsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_power_ports_list_responses.go b/netbox/client/dcim/dcim_power_ports_list_responses.go index 23fc913fd..45fc5d549 100644 --- a/netbox/client/dcim/dcim_power_ports_list_responses.go +++ b/netbox/client/dcim/dcim_power_ports_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimPowerPortsListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimPowerPortsListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimPowerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimPowerPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_rack_reservations_list_parameters.go b/netbox/client/dcim/dcim_rack_reservations_list_parameters.go index 805d8b87d..8351b0096 100644 --- a/netbox/client/dcim/dcim_rack_reservations_list_parameters.go +++ b/netbox/client/dcim/dcim_rack_reservations_list_parameters.go @@ -84,6 +84,36 @@ type DcimRackReservationsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -284,6 +314,116 @@ func (o *DcimRackReservationsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescription(description *string) *DcimRackReservationsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionIc(descriptionIc *string) *DcimRackReservationsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionIe(descriptionIe *string) *DcimRackReservationsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionIew(descriptionIew *string) *DcimRackReservationsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionIsw(descriptionIsw *string) *DcimRackReservationsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionn(descriptionn *string) *DcimRackReservationsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionNic(descriptionNic *string) *DcimRackReservationsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionNie(descriptionNie *string) *DcimRackReservationsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionNiew(descriptionNiew *string) *DcimRackReservationsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithDescriptionNisw(descriptionNisw *string) *DcimRackReservationsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithID(id *string) *DcimRackReservationsListParams { o.SetID(id) @@ -739,6 +879,176 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id diff --git a/netbox/client/dcim/dcim_rack_reservations_list_responses.go b/netbox/client/dcim/dcim_rack_reservations_list_responses.go index efc80be87..3aa2eed72 100644 --- a/netbox/client/dcim/dcim_rack_reservations_list_responses.go +++ b/netbox/client/dcim/dcim_rack_reservations_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimRackReservationsListOKBody) validateResults(formats strfmt.Registry if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRackReservationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRackReservationsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimRackReservationsListOKBody) contextValidateResults(ctx context.Cont if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRackReservationsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRackReservationsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_rack_roles_list_parameters.go b/netbox/client/dcim/dcim_rack_roles_list_parameters.go index b04be41f8..ef3feccbf 100644 --- a/netbox/client/dcim/dcim_rack_roles_list_parameters.go +++ b/netbox/client/dcim/dcim_rack_roles_list_parameters.go @@ -78,9 +78,6 @@ type DcimRackRolesListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -117,6 +114,36 @@ type DcimRackRolesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -153,9 +180,6 @@ type DcimRackRolesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -195,9 +219,6 @@ type DcimRackRolesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -225,6 +246,12 @@ type DcimRackRolesListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -289,17 +316,6 @@ func (o *DcimRackRolesListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the dcim rack roles list params -func (o *DcimRackRolesListParams) WithColorEmpty(colorEmpty *string) *DcimRackRolesListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the dcim rack roles list params -func (o *DcimRackRolesListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the dcim rack roles list params func (o *DcimRackRolesListParams) WithColorIc(colorIc *string) *DcimRackRolesListParams { o.SetColorIc(colorIc) @@ -432,6 +448,116 @@ func (o *DcimRackRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescription(description *string) *DcimRackRolesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionIc(descriptionIc *string) *DcimRackRolesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionIe(descriptionIe *string) *DcimRackRolesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionIew(descriptionIew *string) *DcimRackRolesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionIsw(descriptionIsw *string) *DcimRackRolesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionn(descriptionn *string) *DcimRackRolesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionNic(descriptionNic *string) *DcimRackRolesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionNie(descriptionNie *string) *DcimRackRolesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionNiew(descriptionNiew *string) *DcimRackRolesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithDescriptionNisw(descriptionNisw *string) *DcimRackRolesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the dcim rack roles list params func (o *DcimRackRolesListParams) WithID(id *string) *DcimRackRolesListParams { o.SetID(id) @@ -553,17 +679,6 @@ func (o *DcimRackRolesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim rack roles list params -func (o *DcimRackRolesListParams) WithNameEmpty(nameEmpty *string) *DcimRackRolesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim rack roles list params -func (o *DcimRackRolesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim rack roles list params func (o *DcimRackRolesListParams) WithNameIc(nameIc *string) *DcimRackRolesListParams { o.SetNameIc(nameIc) @@ -696,17 +811,6 @@ func (o *DcimRackRolesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim rack roles list params -func (o *DcimRackRolesListParams) WithSlugEmpty(slugEmpty *string) *DcimRackRolesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim rack roles list params -func (o *DcimRackRolesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim rack roles list params func (o *DcimRackRolesListParams) WithSlugIc(slugIc *string) *DcimRackRolesListParams { o.SetSlugIc(slugIc) @@ -806,6 +910,28 @@ func (o *DcimRackRolesListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithTag(tag *string) *DcimRackRolesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim rack roles list params +func (o *DcimRackRolesListParams) WithTagn(tagn *string) *DcimRackRolesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim rack roles list params +func (o *DcimRackRolesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -831,23 +957,6 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1052,6 +1161,176 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1239,23 +1518,6 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1460,23 +1722,6 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1630,6 +1875,40 @@ func (o *DcimRackRolesListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + 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/netbox/client/dcim/dcim_rack_roles_list_responses.go b/netbox/client/dcim/dcim_rack_roles_list_responses.go index 4e0d6e918..237f8049f 100644 --- a/netbox/client/dcim/dcim_rack_roles_list_responses.go +++ b/netbox/client/dcim/dcim_rack_roles_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimRackRolesListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRackRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRackRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimRackRolesListOKBody) contextValidateResults(ctx context.Context, fo if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRackRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRackRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_racks_list_parameters.go b/netbox/client/dcim/dcim_racks_list_parameters.go index efaae5631..8fb449b2d 100644 --- a/netbox/client/dcim/dcim_racks_list_parameters.go +++ b/netbox/client/dcim/dcim_racks_list_parameters.go @@ -78,9 +78,6 @@ type DcimRacksListParams struct { // AssetTag. AssetTag *string - // AssetTagEmpty. - AssetTagEmpty *string - // AssetTagIc. AssetTagIc *string @@ -108,6 +105,18 @@ type DcimRacksListParams struct { // AssetTagNisw. AssetTagNisw *string + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -123,9 +132,6 @@ type DcimRacksListParams struct { // FacilityID. FacilityID *string - // FacilityIDEmpty. - FacilityIDEmpty *string - // FacilityIDIc. FacilityIDIc *string @@ -201,9 +207,6 @@ type DcimRacksListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -463,17 +466,6 @@ func (o *DcimRacksListParams) SetAssetTag(assetTag *string) { o.AssetTag = assetTag } -// WithAssetTagEmpty adds the assetTagEmpty to the dcim racks list params -func (o *DcimRacksListParams) WithAssetTagEmpty(assetTagEmpty *string) *DcimRacksListParams { - o.SetAssetTagEmpty(assetTagEmpty) - return o -} - -// SetAssetTagEmpty adds the assetTagEmpty to the dcim racks list params -func (o *DcimRacksListParams) SetAssetTagEmpty(assetTagEmpty *string) { - o.AssetTagEmpty = assetTagEmpty -} - // WithAssetTagIc adds the assetTagIc to the dcim racks list params func (o *DcimRacksListParams) WithAssetTagIc(assetTagIc *string) *DcimRacksListParams { o.SetAssetTagIc(assetTagIc) @@ -573,6 +565,50 @@ func (o *DcimRacksListParams) SetAssetTagNisw(assetTagNisw *string) { o.AssetTagNisw = assetTagNisw } +// WithContact adds the contact to the dcim racks list params +func (o *DcimRacksListParams) WithContact(contact *string) *DcimRacksListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim racks list params +func (o *DcimRacksListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim racks list params +func (o *DcimRacksListParams) WithContactn(contactn *string) *DcimRacksListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim racks list params +func (o *DcimRacksListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim racks list params +func (o *DcimRacksListParams) WithContactRole(contactRole *string) *DcimRacksListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim racks list params +func (o *DcimRacksListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim racks list params +func (o *DcimRacksListParams) WithContactRolen(contactRolen *string) *DcimRacksListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim racks list params +func (o *DcimRacksListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim racks list params func (o *DcimRacksListParams) WithCreated(created *string) *DcimRacksListParams { o.SetCreated(created) @@ -628,17 +664,6 @@ func (o *DcimRacksListParams) SetFacilityID(facilityID *string) { o.FacilityID = facilityID } -// WithFacilityIDEmpty adds the facilityIDEmpty to the dcim racks list params -func (o *DcimRacksListParams) WithFacilityIDEmpty(facilityIDEmpty *string) *DcimRacksListParams { - o.SetFacilityIDEmpty(facilityIDEmpty) - return o -} - -// SetFacilityIDEmpty adds the facilityIdEmpty to the dcim racks list params -func (o *DcimRacksListParams) SetFacilityIDEmpty(facilityIDEmpty *string) { - o.FacilityIDEmpty = facilityIDEmpty -} - // WithFacilityIDIc adds the facilityIDIc to the dcim racks list params func (o *DcimRacksListParams) WithFacilityIDIc(facilityIDIc *string) *DcimRacksListParams { o.SetFacilityIDIc(facilityIDIc) @@ -903,17 +928,6 @@ func (o *DcimRacksListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim racks list params -func (o *DcimRacksListParams) WithNameEmpty(nameEmpty *string) *DcimRacksListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim racks list params -func (o *DcimRacksListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim racks list params func (o *DcimRacksListParams) WithNameIc(nameIc *string) *DcimRacksListParams { o.SetNameIc(nameIc) @@ -1643,23 +1657,6 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.AssetTagEmpty != nil { - - // query param asset_tag__empty - var qrAssetTagEmpty string - - if o.AssetTagEmpty != nil { - qrAssetTagEmpty = *o.AssetTagEmpty - } - qAssetTagEmpty := qrAssetTagEmpty - if qAssetTagEmpty != "" { - - if err := r.SetQueryParam("asset_tag__empty", qAssetTagEmpty); err != nil { - return err - } - } - } - if o.AssetTagIc != nil { // query param asset_tag__ic @@ -1813,6 +1810,74 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1898,23 +1963,6 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.FacilityIDEmpty != nil { - - // query param facility_id__empty - var qrFacilityIDEmpty string - - if o.FacilityIDEmpty != nil { - qrFacilityIDEmpty = *o.FacilityIDEmpty - } - qFacilityIDEmpty := qrFacilityIDEmpty - if qFacilityIDEmpty != "" { - - if err := r.SetQueryParam("facility_id__empty", qFacilityIDEmpty); err != nil { - return err - } - } - } - if o.FacilityIDIc != nil { // query param facility_id__ic @@ -2323,23 +2371,6 @@ func (o *DcimRacksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/dcim/dcim_racks_list_responses.go b/netbox/client/dcim/dcim_racks_list_responses.go index c0caf6335..6bd25904f 100644 --- a/netbox/client/dcim/dcim_racks_list_responses.go +++ b/netbox/client/dcim/dcim_racks_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimRacksListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRacksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRacksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimRacksListOKBody) contextValidateResults(ctx context.Context, format if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRacksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRacksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go b/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go index 051088d16..362a3a924 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go +++ b/netbox/client/dcim/dcim_rear_port_templates_list_parameters.go @@ -78,9 +78,6 @@ type DcimRearPortTemplatesListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -156,12 +153,15 @@ type DcimRearPortTemplatesListParams struct { */ Limit *int64 + // ModuletypeID. + ModuletypeID *string + + // ModuletypeIDn. + ModuletypeIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -213,6 +213,9 @@ type DcimRearPortTemplatesListParams struct { // Positionsn. Positionsn *string + // Q. + Q *string + // Type. Type *string @@ -283,17 +286,6 @@ func (o *DcimRearPortTemplatesListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the dcim rear port templates list params -func (o *DcimRearPortTemplatesListParams) WithColorEmpty(colorEmpty *string) *DcimRearPortTemplatesListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the dcim rear port templates list params -func (o *DcimRearPortTemplatesListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithColorIc(colorIc *string) *DcimRearPortTemplatesListParams { o.SetColorIc(colorIc) @@ -558,6 +550,28 @@ func (o *DcimRearPortTemplatesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithModuletypeID adds the moduletypeID to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithModuletypeID(moduletypeID *string) *DcimRearPortTemplatesListParams { + o.SetModuletypeID(moduletypeID) + return o +} + +// SetModuletypeID adds the moduletypeId to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetModuletypeID(moduletypeID *string) { + o.ModuletypeID = moduletypeID +} + +// WithModuletypeIDn adds the moduletypeIDn to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithModuletypeIDn(moduletypeIDn *string) *DcimRearPortTemplatesListParams { + o.SetModuletypeIDn(moduletypeIDn) + return o +} + +// SetModuletypeIDn adds the moduletypeIdN to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetModuletypeIDn(moduletypeIDn *string) { + o.ModuletypeIDn = moduletypeIDn +} + // WithName adds the name to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithName(name *string) *DcimRearPortTemplatesListParams { o.SetName(name) @@ -569,17 +583,6 @@ func (o *DcimRearPortTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim rear port templates list params -func (o *DcimRearPortTemplatesListParams) WithNameEmpty(nameEmpty *string) *DcimRearPortTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim rear port templates list params -func (o *DcimRearPortTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithNameIc(nameIc *string) *DcimRearPortTemplatesListParams { o.SetNameIc(nameIc) @@ -756,6 +759,17 @@ func (o *DcimRearPortTemplatesListParams) SetPositionsn(positionsn *string) { o.Positionsn = positionsn } +// WithQ adds the q to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) WithQ(q *string) *DcimRearPortTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the dcim rear port templates list params +func (o *DcimRearPortTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WithType adds the typeVar to the dcim rear port templates list params func (o *DcimRearPortTemplatesListParams) WithType(typeVar *string) *DcimRearPortTemplatesListParams { o.SetType(typeVar) @@ -803,23 +817,6 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1228,35 +1225,52 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } - if o.Name != nil { + if o.ModuletypeID != nil { - // query param name - var qrName string + // query param moduletype_id + var qrModuletypeID string - if o.Name != nil { - qrName = *o.Name + if o.ModuletypeID != nil { + qrModuletypeID = *o.ModuletypeID } - qName := qrName - if qName != "" { + qModuletypeID := qrModuletypeID + if qModuletypeID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("moduletype_id", qModuletypeID); err != nil { + return err + } + } + } + + if o.ModuletypeIDn != nil { + + // query param moduletype_id__n + var qrModuletypeIDn string + + if o.ModuletypeIDn != nil { + qrModuletypeIDn = *o.ModuletypeIDn + } + qModuletypeIDn := qrModuletypeIDn + if qModuletypeIDn != "" { + + if err := r.SetQueryParam("moduletype_id__n", qModuletypeIDn); err != nil { return err } } } - if o.NameEmpty != nil { + if o.Name != nil { - // query param name__empty - var qrNameEmpty string + // query param name + var qrName string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.Name != nil { + qrName = *o.Name } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qName := qrName + if qName != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1534,6 +1548,23 @@ func (o *DcimRearPortTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Type != nil { // query param type diff --git a/netbox/client/dcim/dcim_rear_port_templates_list_responses.go b/netbox/client/dcim/dcim_rear_port_templates_list_responses.go index 22a70a4eb..5c3f54122 100644 --- a/netbox/client/dcim/dcim_rear_port_templates_list_responses.go +++ b/netbox/client/dcim/dcim_rear_port_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimRearPortTemplatesListOKBody) validateResults(formats strfmt.Registr if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRearPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRearPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimRearPortTemplatesListOKBody) contextValidateResults(ctx context.Con if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRearPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRearPortTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_rear_ports_list_parameters.go b/netbox/client/dcim/dcim_rear_ports_list_parameters.go index b4fd4a9d8..ed2675a5b 100644 --- a/netbox/client/dcim/dcim_rear_ports_list_parameters.go +++ b/netbox/client/dcim/dcim_rear_ports_list_parameters.go @@ -81,9 +81,6 @@ type DcimRearPortsListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -123,9 +120,6 @@ type DcimRearPortsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -186,9 +180,6 @@ type DcimRearPortsListParams struct { // Label. Label *string - // LabelEmpty. - LabelEmpty *string - // LabelIc. LabelIc *string @@ -243,12 +234,15 @@ type DcimRearPortsListParams struct { // LocationIDn. LocationIDn *string + // ModuleID. + ModuleID *string + + // ModuleIDn. + ModuleIDn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -351,6 +345,18 @@ type DcimRearPortsListParams struct { // Typen. Typen *string + // VirtualChassis. + VirtualChassis *string + + // VirtualChassisn. + VirtualChassisn *string + + // VirtualChassisID. + VirtualChassisID *string + + // VirtualChassisIDn. + VirtualChassisIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -426,17 +432,6 @@ func (o *DcimRearPortsListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) WithColorEmpty(colorEmpty *string) *DcimRearPortsListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the dcim rear ports list params func (o *DcimRearPortsListParams) WithColorIc(colorIc *string) *DcimRearPortsListParams { o.SetColorIc(colorIc) @@ -580,17 +575,6 @@ func (o *DcimRearPortsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimRearPortsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim rear ports list params func (o *DcimRearPortsListParams) WithDescriptionIc(descriptionIc *string) *DcimRearPortsListParams { o.SetDescriptionIc(descriptionIc) @@ -811,17 +795,6 @@ func (o *DcimRearPortsListParams) SetLabel(label *string) { o.Label = label } -// WithLabelEmpty adds the labelEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) WithLabelEmpty(labelEmpty *string) *DcimRearPortsListParams { - o.SetLabelEmpty(labelEmpty) - return o -} - -// SetLabelEmpty adds the labelEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) SetLabelEmpty(labelEmpty *string) { - o.LabelEmpty = labelEmpty -} - // WithLabelIc adds the labelIc to the dcim rear ports list params func (o *DcimRearPortsListParams) WithLabelIc(labelIc *string) *DcimRearPortsListParams { o.SetLabelIc(labelIc) @@ -1009,6 +982,28 @@ func (o *DcimRearPortsListParams) SetLocationIDn(locationIDn *string) { o.LocationIDn = locationIDn } +// WithModuleID adds the moduleID to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithModuleID(moduleID *string) *DcimRearPortsListParams { + o.SetModuleID(moduleID) + return o +} + +// SetModuleID adds the moduleId to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetModuleID(moduleID *string) { + o.ModuleID = moduleID +} + +// WithModuleIDn adds the moduleIDn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithModuleIDn(moduleIDn *string) *DcimRearPortsListParams { + o.SetModuleIDn(moduleIDn) + return o +} + +// SetModuleIDn adds the moduleIdN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetModuleIDn(moduleIDn *string) { + o.ModuleIDn = moduleIDn +} + // WithName adds the name to the dcim rear ports list params func (o *DcimRearPortsListParams) WithName(name *string) *DcimRearPortsListParams { o.SetName(name) @@ -1020,17 +1015,6 @@ func (o *DcimRearPortsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) WithNameEmpty(nameEmpty *string) *DcimRearPortsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim rear ports list params -func (o *DcimRearPortsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim rear ports list params func (o *DcimRearPortsListParams) WithNameIc(nameIc *string) *DcimRearPortsListParams { o.SetNameIc(nameIc) @@ -1394,6 +1378,50 @@ func (o *DcimRearPortsListParams) SetTypen(typen *string) { o.Typen = typen } +// WithVirtualChassis adds the virtualChassis to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithVirtualChassis(virtualChassis *string) *DcimRearPortsListParams { + o.SetVirtualChassis(virtualChassis) + return o +} + +// SetVirtualChassis adds the virtualChassis to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetVirtualChassis(virtualChassis *string) { + o.VirtualChassis = virtualChassis +} + +// WithVirtualChassisn adds the virtualChassisn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithVirtualChassisn(virtualChassisn *string) *DcimRearPortsListParams { + o.SetVirtualChassisn(virtualChassisn) + return o +} + +// SetVirtualChassisn adds the virtualChassisN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetVirtualChassisn(virtualChassisn *string) { + o.VirtualChassisn = virtualChassisn +} + +// WithVirtualChassisID adds the virtualChassisID to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithVirtualChassisID(virtualChassisID *string) *DcimRearPortsListParams { + o.SetVirtualChassisID(virtualChassisID) + return o +} + +// SetVirtualChassisID adds the virtualChassisId to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetVirtualChassisID(virtualChassisID *string) { + o.VirtualChassisID = virtualChassisID +} + +// WithVirtualChassisIDn adds the virtualChassisIDn to the dcim rear ports list params +func (o *DcimRearPortsListParams) WithVirtualChassisIDn(virtualChassisIDn *string) *DcimRearPortsListParams { + o.SetVirtualChassisIDn(virtualChassisIDn) + return o +} + +// SetVirtualChassisIDn adds the virtualChassisIdN to the dcim rear ports list params +func (o *DcimRearPortsListParams) SetVirtualChassisIDn(virtualChassisIDn *string) { + o.VirtualChassisIDn = virtualChassisIDn +} + // WriteToRequest writes these params to a swagger request func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1436,23 +1464,6 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1674,23 +1685,6 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -2031,23 +2025,6 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.LabelEmpty != nil { - - // query param label__empty - var qrLabelEmpty string - - if o.LabelEmpty != nil { - qrLabelEmpty = *o.LabelEmpty - } - qLabelEmpty := qrLabelEmpty - if qLabelEmpty != "" { - - if err := r.SetQueryParam("label__empty", qLabelEmpty); err != nil { - return err - } - } - } - if o.LabelIc != nil { // query param label__ic @@ -2337,35 +2314,52 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } - if o.Name != nil { + if o.ModuleID != nil { - // query param name - var qrName string + // query param module_id + var qrModuleID string - if o.Name != nil { - qrName = *o.Name + if o.ModuleID != nil { + qrModuleID = *o.ModuleID } - qName := qrName - if qName != "" { + qModuleID := qrModuleID + if qModuleID != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("module_id", qModuleID); err != nil { + return err + } + } + } + + if o.ModuleIDn != nil { + + // query param module_id__n + var qrModuleIDn string + + if o.ModuleIDn != nil { + qrModuleIDn = *o.ModuleIDn + } + qModuleIDn := qrModuleIDn + if qModuleIDn != "" { + + if err := r.SetQueryParam("module_id__n", qModuleIDn); err != nil { return err } } } - if o.NameEmpty != nil { + if o.Name != nil { - // query param name__empty - var qrNameEmpty string + // query param name + var qrName string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.Name != nil { + qrName = *o.Name } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qName := qrName + if qName != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -2932,6 +2926,74 @@ func (o *DcimRearPortsListParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.VirtualChassis != nil { + + // query param virtual_chassis + var qrVirtualChassis string + + if o.VirtualChassis != nil { + qrVirtualChassis = *o.VirtualChassis + } + qVirtualChassis := qrVirtualChassis + if qVirtualChassis != "" { + + if err := r.SetQueryParam("virtual_chassis", qVirtualChassis); err != nil { + return err + } + } + } + + if o.VirtualChassisn != nil { + + // query param virtual_chassis__n + var qrVirtualChassisn string + + if o.VirtualChassisn != nil { + qrVirtualChassisn = *o.VirtualChassisn + } + qVirtualChassisn := qrVirtualChassisn + if qVirtualChassisn != "" { + + if err := r.SetQueryParam("virtual_chassis__n", qVirtualChassisn); err != nil { + return err + } + } + } + + if o.VirtualChassisID != nil { + + // query param virtual_chassis_id + var qrVirtualChassisID string + + if o.VirtualChassisID != nil { + qrVirtualChassisID = *o.VirtualChassisID + } + qVirtualChassisID := qrVirtualChassisID + if qVirtualChassisID != "" { + + if err := r.SetQueryParam("virtual_chassis_id", qVirtualChassisID); err != nil { + return err + } + } + } + + if o.VirtualChassisIDn != nil { + + // query param virtual_chassis_id__n + var qrVirtualChassisIDn string + + if o.VirtualChassisIDn != nil { + qrVirtualChassisIDn = *o.VirtualChassisIDn + } + qVirtualChassisIDn := qrVirtualChassisIDn + if qVirtualChassisIDn != "" { + + if err := r.SetQueryParam("virtual_chassis_id__n", qVirtualChassisIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_rear_ports_list_responses.go b/netbox/client/dcim/dcim_rear_ports_list_responses.go index 27df38661..7e5f31e7b 100644 --- a/netbox/client/dcim/dcim_rear_ports_list_responses.go +++ b/netbox/client/dcim/dcim_rear_ports_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimRearPortsListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRearPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRearPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimRearPortsListOKBody) contextValidateResults(ctx context.Context, fo if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRearPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRearPortsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_regions_list_parameters.go b/netbox/client/dcim/dcim_regions_list_parameters.go index 1f63ce9ad..41e4e243e 100644 --- a/netbox/client/dcim/dcim_regions_list_parameters.go +++ b/netbox/client/dcim/dcim_regions_list_parameters.go @@ -75,6 +75,18 @@ func NewDcimRegionsListParamsWithHTTPClient(client *http.Client) *DcimRegionsLis */ type DcimRegionsListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -87,9 +99,6 @@ type DcimRegionsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +162,6 @@ type DcimRegionsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -207,9 +213,6 @@ type DcimRegionsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -237,6 +240,12 @@ type DcimRegionsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -290,6 +299,50 @@ func (o *DcimRegionsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the dcim regions list params +func (o *DcimRegionsListParams) WithContact(contact *string) *DcimRegionsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim regions list params +func (o *DcimRegionsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim regions list params +func (o *DcimRegionsListParams) WithContactn(contactn *string) *DcimRegionsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim regions list params +func (o *DcimRegionsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim regions list params +func (o *DcimRegionsListParams) WithContactRole(contactRole *string) *DcimRegionsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim regions list params +func (o *DcimRegionsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim regions list params +func (o *DcimRegionsListParams) WithContactRolen(contactRolen *string) *DcimRegionsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim regions list params +func (o *DcimRegionsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim regions list params func (o *DcimRegionsListParams) WithCreated(created *string) *DcimRegionsListParams { o.SetCreated(created) @@ -334,17 +387,6 @@ func (o *DcimRegionsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim regions list params -func (o *DcimRegionsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimRegionsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim regions list params -func (o *DcimRegionsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim regions list params func (o *DcimRegionsListParams) WithDescriptionIc(descriptionIc *string) *DcimRegionsListParams { o.SetDescriptionIc(descriptionIc) @@ -565,17 +607,6 @@ func (o *DcimRegionsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim regions list params -func (o *DcimRegionsListParams) WithNameEmpty(nameEmpty *string) *DcimRegionsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim regions list params -func (o *DcimRegionsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim regions list params func (o *DcimRegionsListParams) WithNameIc(nameIc *string) *DcimRegionsListParams { o.SetNameIc(nameIc) @@ -752,17 +783,6 @@ func (o *DcimRegionsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim regions list params -func (o *DcimRegionsListParams) WithSlugEmpty(slugEmpty *string) *DcimRegionsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim regions list params -func (o *DcimRegionsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim regions list params func (o *DcimRegionsListParams) WithSlugIc(slugIc *string) *DcimRegionsListParams { o.SetSlugIc(slugIc) @@ -862,6 +882,28 @@ func (o *DcimRegionsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim regions list params +func (o *DcimRegionsListParams) WithTag(tag *string) *DcimRegionsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim regions list params +func (o *DcimRegionsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim regions list params +func (o *DcimRegionsListParams) WithTagn(tagn *string) *DcimRegionsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim regions list params +func (o *DcimRegionsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -870,6 +912,74 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -938,23 +1048,6 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1295,23 +1388,6 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1584,23 +1660,6 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1754,6 +1813,40 @@ func (o *DcimRegionsListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + 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/netbox/client/dcim/dcim_regions_list_responses.go b/netbox/client/dcim/dcim_regions_list_responses.go index 5c1206bbd..5e0594f0a 100644 --- a/netbox/client/dcim/dcim_regions_list_responses.go +++ b/netbox/client/dcim/dcim_regions_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimRegionsListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRegionsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRegionsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimRegionsListOKBody) contextValidateResults(ctx context.Context, form if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimRegionsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimRegionsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_site_groups_list_parameters.go b/netbox/client/dcim/dcim_site_groups_list_parameters.go index cf500f574..7637116e0 100644 --- a/netbox/client/dcim/dcim_site_groups_list_parameters.go +++ b/netbox/client/dcim/dcim_site_groups_list_parameters.go @@ -75,6 +75,18 @@ func NewDcimSiteGroupsListParamsWithHTTPClient(client *http.Client) *DcimSiteGro */ type DcimSiteGroupsListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -87,9 +99,6 @@ type DcimSiteGroupsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +162,6 @@ type DcimSiteGroupsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -207,9 +213,6 @@ type DcimSiteGroupsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -237,6 +240,12 @@ type DcimSiteGroupsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -290,6 +299,50 @@ func (o *DcimSiteGroupsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithContact(contact *string) *DcimSiteGroupsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithContactn(contactn *string) *DcimSiteGroupsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithContactRole(contactRole *string) *DcimSiteGroupsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithContactRolen(contactRolen *string) *DcimSiteGroupsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithCreated(created *string) *DcimSiteGroupsListParams { o.SetCreated(created) @@ -334,17 +387,6 @@ func (o *DcimSiteGroupsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the dcim site groups list params -func (o *DcimSiteGroupsListParams) WithDescriptionEmpty(descriptionEmpty *string) *DcimSiteGroupsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the dcim site groups list params -func (o *DcimSiteGroupsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithDescriptionIc(descriptionIc *string) *DcimSiteGroupsListParams { o.SetDescriptionIc(descriptionIc) @@ -565,17 +607,6 @@ func (o *DcimSiteGroupsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim site groups list params -func (o *DcimSiteGroupsListParams) WithNameEmpty(nameEmpty *string) *DcimSiteGroupsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim site groups list params -func (o *DcimSiteGroupsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithNameIc(nameIc *string) *DcimSiteGroupsListParams { o.SetNameIc(nameIc) @@ -752,17 +783,6 @@ func (o *DcimSiteGroupsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim site groups list params -func (o *DcimSiteGroupsListParams) WithSlugEmpty(slugEmpty *string) *DcimSiteGroupsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim site groups list params -func (o *DcimSiteGroupsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim site groups list params func (o *DcimSiteGroupsListParams) WithSlugIc(slugIc *string) *DcimSiteGroupsListParams { o.SetSlugIc(slugIc) @@ -862,6 +882,28 @@ func (o *DcimSiteGroupsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithTag(tag *string) *DcimSiteGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim site groups list params +func (o *DcimSiteGroupsListParams) WithTagn(tagn *string) *DcimSiteGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim site groups list params +func (o *DcimSiteGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -870,6 +912,74 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -938,23 +1048,6 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1295,23 +1388,6 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1584,23 +1660,6 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1754,6 +1813,40 @@ func (o *DcimSiteGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + 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/netbox/client/dcim/dcim_site_groups_list_responses.go b/netbox/client/dcim/dcim_site_groups_list_responses.go index 86ffd46b8..6bd0fe1e4 100644 --- a/netbox/client/dcim/dcim_site_groups_list_responses.go +++ b/netbox/client/dcim/dcim_site_groups_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimSiteGroupsListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimSiteGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimSiteGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimSiteGroupsListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimSiteGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimSiteGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_sites_list_parameters.go b/netbox/client/dcim/dcim_sites_list_parameters.go index ff0b28f03..8abe5db6e 100644 --- a/netbox/client/dcim/dcim_sites_list_parameters.go +++ b/netbox/client/dcim/dcim_sites_list_parameters.go @@ -78,135 +78,69 @@ type DcimSitesListParams struct { // Asn. Asn *string - // AsnGt. - AsnGt *string - - // AsnGte. - AsnGte *string - - // AsnLt. - AsnLt *string - - // AsnLte. - AsnLte *string - // Asnn. Asnn *string - // ContactEmail. - ContactEmail *string - - // ContactEmailEmpty. - ContactEmailEmpty *string - - // ContactEmailIc. - ContactEmailIc *string - - // ContactEmailIe. - ContactEmailIe *string - - // ContactEmailIew. - ContactEmailIew *string - - // ContactEmailIsw. - ContactEmailIsw *string - - // ContactEmailn. - ContactEmailn *string - - // ContactEmailNic. - ContactEmailNic *string - - // ContactEmailNie. - ContactEmailNie *string - - // ContactEmailNiew. - ContactEmailNiew *string - - // ContactEmailNisw. - ContactEmailNisw *string - - // ContactName. - ContactName *string + // AsnID. + AsnID *string - // ContactNameEmpty. - ContactNameEmpty *string + // AsnIDn. + AsnIDn *string - // ContactNameIc. - ContactNameIc *string + // Contact. + Contact *string - // ContactNameIe. - ContactNameIe *string + // Contactn. + Contactn *string - // ContactNameIew. - ContactNameIew *string + // ContactRole. + ContactRole *string - // ContactNameIsw. - ContactNameIsw *string + // ContactRolen. + ContactRolen *string - // ContactNamen. - ContactNamen *string - - // ContactNameNic. - ContactNameNic *string - - // ContactNameNie. - ContactNameNie *string - - // ContactNameNiew. - ContactNameNiew *string - - // ContactNameNisw. - ContactNameNisw *string + // Created. + Created *string - // ContactPhone. - ContactPhone *string + // CreatedGte. + CreatedGte *string - // ContactPhoneEmpty. - ContactPhoneEmpty *string + // CreatedLte. + CreatedLte *string - // ContactPhoneIc. - ContactPhoneIc *string + // Description. + Description *string - // ContactPhoneIe. - ContactPhoneIe *string + // DescriptionIc. + DescriptionIc *string - // ContactPhoneIew. - ContactPhoneIew *string + // DescriptionIe. + DescriptionIe *string - // ContactPhoneIsw. - ContactPhoneIsw *string + // DescriptionIew. + DescriptionIew *string - // ContactPhonen. - ContactPhonen *string + // DescriptionIsw. + DescriptionIsw *string - // ContactPhoneNic. - ContactPhoneNic *string + // Descriptionn. + Descriptionn *string - // ContactPhoneNie. - ContactPhoneNie *string + // DescriptionNic. + DescriptionNic *string - // ContactPhoneNiew. - ContactPhoneNiew *string + // DescriptionNie. + DescriptionNie *string - // ContactPhoneNisw. - ContactPhoneNisw *string + // DescriptionNiew. + DescriptionNiew *string - // Created. - Created *string - - // CreatedGte. - CreatedGte *string - - // CreatedLte. - CreatedLte *string + // DescriptionNisw. + DescriptionNisw *string // Facility. Facility *string - // FacilityEmpty. - FacilityEmpty *string - // FacilityIc. FacilityIc *string @@ -318,9 +252,6 @@ type DcimSitesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -372,9 +303,6 @@ type DcimSitesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -502,50 +430,6 @@ func (o *DcimSitesListParams) SetAsn(asn *string) { o.Asn = asn } -// WithAsnGt adds the asnGt to the dcim sites list params -func (o *DcimSitesListParams) WithAsnGt(asnGt *string) *DcimSitesListParams { - o.SetAsnGt(asnGt) - return o -} - -// SetAsnGt adds the asnGt to the dcim sites list params -func (o *DcimSitesListParams) SetAsnGt(asnGt *string) { - o.AsnGt = asnGt -} - -// WithAsnGte adds the asnGte to the dcim sites list params -func (o *DcimSitesListParams) WithAsnGte(asnGte *string) *DcimSitesListParams { - o.SetAsnGte(asnGte) - return o -} - -// SetAsnGte adds the asnGte to the dcim sites list params -func (o *DcimSitesListParams) SetAsnGte(asnGte *string) { - o.AsnGte = asnGte -} - -// WithAsnLt adds the asnLt to the dcim sites list params -func (o *DcimSitesListParams) WithAsnLt(asnLt *string) *DcimSitesListParams { - o.SetAsnLt(asnLt) - return o -} - -// SetAsnLt adds the asnLt to the dcim sites list params -func (o *DcimSitesListParams) SetAsnLt(asnLt *string) { - o.AsnLt = asnLt -} - -// WithAsnLte adds the asnLte to the dcim sites list params -func (o *DcimSitesListParams) WithAsnLte(asnLte *string) *DcimSitesListParams { - o.SetAsnLte(asnLte) - return o -} - -// SetAsnLte adds the asnLte to the dcim sites list params -func (o *DcimSitesListParams) SetAsnLte(asnLte *string) { - o.AsnLte = asnLte -} - // WithAsnn adds the asnn to the dcim sites list params func (o *DcimSitesListParams) WithAsnn(asnn *string) *DcimSitesListParams { o.SetAsnn(asnn) @@ -557,400 +441,213 @@ func (o *DcimSitesListParams) SetAsnn(asnn *string) { o.Asnn = asnn } -// WithContactEmail adds the contactEmail to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmail(contactEmail *string) *DcimSitesListParams { - o.SetContactEmail(contactEmail) - return o -} - -// SetContactEmail adds the contactEmail to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmail(contactEmail *string) { - o.ContactEmail = contactEmail -} - -// WithContactEmailEmpty adds the contactEmailEmpty to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailEmpty(contactEmailEmpty *string) *DcimSitesListParams { - o.SetContactEmailEmpty(contactEmailEmpty) - return o -} - -// SetContactEmailEmpty adds the contactEmailEmpty to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailEmpty(contactEmailEmpty *string) { - o.ContactEmailEmpty = contactEmailEmpty -} - -// WithContactEmailIc adds the contactEmailIc to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailIc(contactEmailIc *string) *DcimSitesListParams { - o.SetContactEmailIc(contactEmailIc) - return o -} - -// SetContactEmailIc adds the contactEmailIc to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailIc(contactEmailIc *string) { - o.ContactEmailIc = contactEmailIc -} - -// WithContactEmailIe adds the contactEmailIe to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailIe(contactEmailIe *string) *DcimSitesListParams { - o.SetContactEmailIe(contactEmailIe) - return o -} - -// SetContactEmailIe adds the contactEmailIe to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailIe(contactEmailIe *string) { - o.ContactEmailIe = contactEmailIe -} - -// WithContactEmailIew adds the contactEmailIew to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailIew(contactEmailIew *string) *DcimSitesListParams { - o.SetContactEmailIew(contactEmailIew) - return o -} - -// SetContactEmailIew adds the contactEmailIew to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailIew(contactEmailIew *string) { - o.ContactEmailIew = contactEmailIew -} - -// WithContactEmailIsw adds the contactEmailIsw to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailIsw(contactEmailIsw *string) *DcimSitesListParams { - o.SetContactEmailIsw(contactEmailIsw) - return o -} - -// SetContactEmailIsw adds the contactEmailIsw to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailIsw(contactEmailIsw *string) { - o.ContactEmailIsw = contactEmailIsw -} - -// WithContactEmailn adds the contactEmailn to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailn(contactEmailn *string) *DcimSitesListParams { - o.SetContactEmailn(contactEmailn) - return o -} - -// SetContactEmailn adds the contactEmailN to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailn(contactEmailn *string) { - o.ContactEmailn = contactEmailn -} - -// WithContactEmailNic adds the contactEmailNic to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailNic(contactEmailNic *string) *DcimSitesListParams { - o.SetContactEmailNic(contactEmailNic) - return o -} - -// SetContactEmailNic adds the contactEmailNic to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailNic(contactEmailNic *string) { - o.ContactEmailNic = contactEmailNic -} - -// WithContactEmailNie adds the contactEmailNie to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailNie(contactEmailNie *string) *DcimSitesListParams { - o.SetContactEmailNie(contactEmailNie) - return o -} - -// SetContactEmailNie adds the contactEmailNie to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailNie(contactEmailNie *string) { - o.ContactEmailNie = contactEmailNie -} - -// WithContactEmailNiew adds the contactEmailNiew to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailNiew(contactEmailNiew *string) *DcimSitesListParams { - o.SetContactEmailNiew(contactEmailNiew) - return o -} - -// SetContactEmailNiew adds the contactEmailNiew to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailNiew(contactEmailNiew *string) { - o.ContactEmailNiew = contactEmailNiew -} - -// WithContactEmailNisw adds the contactEmailNisw to the dcim sites list params -func (o *DcimSitesListParams) WithContactEmailNisw(contactEmailNisw *string) *DcimSitesListParams { - o.SetContactEmailNisw(contactEmailNisw) - return o -} - -// SetContactEmailNisw adds the contactEmailNisw to the dcim sites list params -func (o *DcimSitesListParams) SetContactEmailNisw(contactEmailNisw *string) { - o.ContactEmailNisw = contactEmailNisw -} - -// WithContactName adds the contactName to the dcim sites list params -func (o *DcimSitesListParams) WithContactName(contactName *string) *DcimSitesListParams { - o.SetContactName(contactName) - return o -} - -// SetContactName adds the contactName to the dcim sites list params -func (o *DcimSitesListParams) SetContactName(contactName *string) { - o.ContactName = contactName -} - -// WithContactNameEmpty adds the contactNameEmpty to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameEmpty(contactNameEmpty *string) *DcimSitesListParams { - o.SetContactNameEmpty(contactNameEmpty) - return o -} - -// SetContactNameEmpty adds the contactNameEmpty to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameEmpty(contactNameEmpty *string) { - o.ContactNameEmpty = contactNameEmpty -} - -// WithContactNameIc adds the contactNameIc to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameIc(contactNameIc *string) *DcimSitesListParams { - o.SetContactNameIc(contactNameIc) +// WithAsnID adds the asnID to the dcim sites list params +func (o *DcimSitesListParams) WithAsnID(asnID *string) *DcimSitesListParams { + o.SetAsnID(asnID) return o } -// SetContactNameIc adds the contactNameIc to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameIc(contactNameIc *string) { - o.ContactNameIc = contactNameIc +// SetAsnID adds the asnId to the dcim sites list params +func (o *DcimSitesListParams) SetAsnID(asnID *string) { + o.AsnID = asnID } -// WithContactNameIe adds the contactNameIe to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameIe(contactNameIe *string) *DcimSitesListParams { - o.SetContactNameIe(contactNameIe) +// WithAsnIDn adds the asnIDn to the dcim sites list params +func (o *DcimSitesListParams) WithAsnIDn(asnIDn *string) *DcimSitesListParams { + o.SetAsnIDn(asnIDn) return o } -// SetContactNameIe adds the contactNameIe to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameIe(contactNameIe *string) { - o.ContactNameIe = contactNameIe +// SetAsnIDn adds the asnIdN to the dcim sites list params +func (o *DcimSitesListParams) SetAsnIDn(asnIDn *string) { + o.AsnIDn = asnIDn } -// WithContactNameIew adds the contactNameIew to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameIew(contactNameIew *string) *DcimSitesListParams { - o.SetContactNameIew(contactNameIew) +// WithContact adds the contact to the dcim sites list params +func (o *DcimSitesListParams) WithContact(contact *string) *DcimSitesListParams { + o.SetContact(contact) return o } -// SetContactNameIew adds the contactNameIew to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameIew(contactNameIew *string) { - o.ContactNameIew = contactNameIew +// SetContact adds the contact to the dcim sites list params +func (o *DcimSitesListParams) SetContact(contact *string) { + o.Contact = contact } -// WithContactNameIsw adds the contactNameIsw to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameIsw(contactNameIsw *string) *DcimSitesListParams { - o.SetContactNameIsw(contactNameIsw) +// WithContactn adds the contactn to the dcim sites list params +func (o *DcimSitesListParams) WithContactn(contactn *string) *DcimSitesListParams { + o.SetContactn(contactn) return o } -// SetContactNameIsw adds the contactNameIsw to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameIsw(contactNameIsw *string) { - o.ContactNameIsw = contactNameIsw +// SetContactn adds the contactN to the dcim sites list params +func (o *DcimSitesListParams) SetContactn(contactn *string) { + o.Contactn = contactn } -// WithContactNamen adds the contactNamen to the dcim sites list params -func (o *DcimSitesListParams) WithContactNamen(contactNamen *string) *DcimSitesListParams { - o.SetContactNamen(contactNamen) +// WithContactRole adds the contactRole to the dcim sites list params +func (o *DcimSitesListParams) WithContactRole(contactRole *string) *DcimSitesListParams { + o.SetContactRole(contactRole) return o } -// SetContactNamen adds the contactNameN to the dcim sites list params -func (o *DcimSitesListParams) SetContactNamen(contactNamen *string) { - o.ContactNamen = contactNamen +// SetContactRole adds the contactRole to the dcim sites list params +func (o *DcimSitesListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole } -// WithContactNameNic adds the contactNameNic to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameNic(contactNameNic *string) *DcimSitesListParams { - o.SetContactNameNic(contactNameNic) +// WithContactRolen adds the contactRolen to the dcim sites list params +func (o *DcimSitesListParams) WithContactRolen(contactRolen *string) *DcimSitesListParams { + o.SetContactRolen(contactRolen) return o } -// SetContactNameNic adds the contactNameNic to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameNic(contactNameNic *string) { - o.ContactNameNic = contactNameNic -} - -// WithContactNameNie adds the contactNameNie to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameNie(contactNameNie *string) *DcimSitesListParams { - o.SetContactNameNie(contactNameNie) - return o -} - -// SetContactNameNie adds the contactNameNie to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameNie(contactNameNie *string) { - o.ContactNameNie = contactNameNie -} - -// WithContactNameNiew adds the contactNameNiew to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameNiew(contactNameNiew *string) *DcimSitesListParams { - o.SetContactNameNiew(contactNameNiew) - return o +// SetContactRolen adds the contactRoleN to the dcim sites list params +func (o *DcimSitesListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen } -// SetContactNameNiew adds the contactNameNiew to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameNiew(contactNameNiew *string) { - o.ContactNameNiew = contactNameNiew -} - -// WithContactNameNisw adds the contactNameNisw to the dcim sites list params -func (o *DcimSitesListParams) WithContactNameNisw(contactNameNisw *string) *DcimSitesListParams { - o.SetContactNameNisw(contactNameNisw) - return o -} - -// SetContactNameNisw adds the contactNameNisw to the dcim sites list params -func (o *DcimSitesListParams) SetContactNameNisw(contactNameNisw *string) { - o.ContactNameNisw = contactNameNisw -} - -// WithContactPhone adds the contactPhone to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhone(contactPhone *string) *DcimSitesListParams { - o.SetContactPhone(contactPhone) - return o -} - -// SetContactPhone adds the contactPhone to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhone(contactPhone *string) { - o.ContactPhone = contactPhone -} - -// WithContactPhoneEmpty adds the contactPhoneEmpty to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneEmpty(contactPhoneEmpty *string) *DcimSitesListParams { - o.SetContactPhoneEmpty(contactPhoneEmpty) +// WithCreated adds the created to the dcim sites list params +func (o *DcimSitesListParams) WithCreated(created *string) *DcimSitesListParams { + o.SetCreated(created) return o } -// SetContactPhoneEmpty adds the contactPhoneEmpty to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneEmpty(contactPhoneEmpty *string) { - o.ContactPhoneEmpty = contactPhoneEmpty +// SetCreated adds the created to the dcim sites list params +func (o *DcimSitesListParams) SetCreated(created *string) { + o.Created = created } -// WithContactPhoneIc adds the contactPhoneIc to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneIc(contactPhoneIc *string) *DcimSitesListParams { - o.SetContactPhoneIc(contactPhoneIc) +// WithCreatedGte adds the createdGte to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedGte(createdGte *string) *DcimSitesListParams { + o.SetCreatedGte(createdGte) return o } -// SetContactPhoneIc adds the contactPhoneIc to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneIc(contactPhoneIc *string) { - o.ContactPhoneIc = contactPhoneIc +// SetCreatedGte adds the createdGte to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte } -// WithContactPhoneIe adds the contactPhoneIe to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneIe(contactPhoneIe *string) *DcimSitesListParams { - o.SetContactPhoneIe(contactPhoneIe) +// WithCreatedLte adds the createdLte to the dcim sites list params +func (o *DcimSitesListParams) WithCreatedLte(createdLte *string) *DcimSitesListParams { + o.SetCreatedLte(createdLte) return o } -// SetContactPhoneIe adds the contactPhoneIe to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneIe(contactPhoneIe *string) { - o.ContactPhoneIe = contactPhoneIe +// SetCreatedLte adds the createdLte to the dcim sites list params +func (o *DcimSitesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte } -// WithContactPhoneIew adds the contactPhoneIew to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneIew(contactPhoneIew *string) *DcimSitesListParams { - o.SetContactPhoneIew(contactPhoneIew) +// WithDescription adds the description to the dcim sites list params +func (o *DcimSitesListParams) WithDescription(description *string) *DcimSitesListParams { + o.SetDescription(description) return o } -// SetContactPhoneIew adds the contactPhoneIew to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneIew(contactPhoneIew *string) { - o.ContactPhoneIew = contactPhoneIew +// SetDescription adds the description to the dcim sites list params +func (o *DcimSitesListParams) SetDescription(description *string) { + o.Description = description } -// WithContactPhoneIsw adds the contactPhoneIsw to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneIsw(contactPhoneIsw *string) *DcimSitesListParams { - o.SetContactPhoneIsw(contactPhoneIsw) +// WithDescriptionIc adds the descriptionIc to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionIc(descriptionIc *string) *DcimSitesListParams { + o.SetDescriptionIc(descriptionIc) return o } -// SetContactPhoneIsw adds the contactPhoneIsw to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneIsw(contactPhoneIsw *string) { - o.ContactPhoneIsw = contactPhoneIsw +// SetDescriptionIc adds the descriptionIc to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc } -// WithContactPhonen adds the contactPhonen to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhonen(contactPhonen *string) *DcimSitesListParams { - o.SetContactPhonen(contactPhonen) +// WithDescriptionIe adds the descriptionIe to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionIe(descriptionIe *string) *DcimSitesListParams { + o.SetDescriptionIe(descriptionIe) return o } -// SetContactPhonen adds the contactPhoneN to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhonen(contactPhonen *string) { - o.ContactPhonen = contactPhonen +// SetDescriptionIe adds the descriptionIe to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe } -// WithContactPhoneNic adds the contactPhoneNic to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneNic(contactPhoneNic *string) *DcimSitesListParams { - o.SetContactPhoneNic(contactPhoneNic) +// WithDescriptionIew adds the descriptionIew to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionIew(descriptionIew *string) *DcimSitesListParams { + o.SetDescriptionIew(descriptionIew) return o } -// SetContactPhoneNic adds the contactPhoneNic to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneNic(contactPhoneNic *string) { - o.ContactPhoneNic = contactPhoneNic +// SetDescriptionIew adds the descriptionIew to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew } -// WithContactPhoneNie adds the contactPhoneNie to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneNie(contactPhoneNie *string) *DcimSitesListParams { - o.SetContactPhoneNie(contactPhoneNie) +// WithDescriptionIsw adds the descriptionIsw to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionIsw(descriptionIsw *string) *DcimSitesListParams { + o.SetDescriptionIsw(descriptionIsw) return o } -// SetContactPhoneNie adds the contactPhoneNie to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneNie(contactPhoneNie *string) { - o.ContactPhoneNie = contactPhoneNie +// SetDescriptionIsw adds the descriptionIsw to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw } -// WithContactPhoneNiew adds the contactPhoneNiew to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneNiew(contactPhoneNiew *string) *DcimSitesListParams { - o.SetContactPhoneNiew(contactPhoneNiew) +// WithDescriptionn adds the descriptionn to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionn(descriptionn *string) *DcimSitesListParams { + o.SetDescriptionn(descriptionn) return o } -// SetContactPhoneNiew adds the contactPhoneNiew to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneNiew(contactPhoneNiew *string) { - o.ContactPhoneNiew = contactPhoneNiew +// SetDescriptionn adds the descriptionN to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn } -// WithContactPhoneNisw adds the contactPhoneNisw to the dcim sites list params -func (o *DcimSitesListParams) WithContactPhoneNisw(contactPhoneNisw *string) *DcimSitesListParams { - o.SetContactPhoneNisw(contactPhoneNisw) +// WithDescriptionNic adds the descriptionNic to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionNic(descriptionNic *string) *DcimSitesListParams { + o.SetDescriptionNic(descriptionNic) return o } -// SetContactPhoneNisw adds the contactPhoneNisw to the dcim sites list params -func (o *DcimSitesListParams) SetContactPhoneNisw(contactPhoneNisw *string) { - o.ContactPhoneNisw = contactPhoneNisw +// SetDescriptionNic adds the descriptionNic to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic } -// WithCreated adds the created to the dcim sites list params -func (o *DcimSitesListParams) WithCreated(created *string) *DcimSitesListParams { - o.SetCreated(created) +// WithDescriptionNie adds the descriptionNie to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionNie(descriptionNie *string) *DcimSitesListParams { + o.SetDescriptionNie(descriptionNie) return o } -// SetCreated adds the created to the dcim sites list params -func (o *DcimSitesListParams) SetCreated(created *string) { - o.Created = created +// SetDescriptionNie adds the descriptionNie to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie } -// WithCreatedGte adds the createdGte to the dcim sites list params -func (o *DcimSitesListParams) WithCreatedGte(createdGte *string) *DcimSitesListParams { - o.SetCreatedGte(createdGte) +// WithDescriptionNiew adds the descriptionNiew to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionNiew(descriptionNiew *string) *DcimSitesListParams { + o.SetDescriptionNiew(descriptionNiew) return o } -// SetCreatedGte adds the createdGte to the dcim sites list params -func (o *DcimSitesListParams) SetCreatedGte(createdGte *string) { - o.CreatedGte = createdGte +// SetDescriptionNiew adds the descriptionNiew to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew } -// WithCreatedLte adds the createdLte to the dcim sites list params -func (o *DcimSitesListParams) WithCreatedLte(createdLte *string) *DcimSitesListParams { - o.SetCreatedLte(createdLte) +// WithDescriptionNisw adds the descriptionNisw to the dcim sites list params +func (o *DcimSitesListParams) WithDescriptionNisw(descriptionNisw *string) *DcimSitesListParams { + o.SetDescriptionNisw(descriptionNisw) return o } -// SetCreatedLte adds the createdLte to the dcim sites list params -func (o *DcimSitesListParams) SetCreatedLte(createdLte *string) { - o.CreatedLte = createdLte +// SetDescriptionNisw adds the descriptionNisw to the dcim sites list params +func (o *DcimSitesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw } // WithFacility adds the facility to the dcim sites list params @@ -964,17 +661,6 @@ func (o *DcimSitesListParams) SetFacility(facility *string) { o.Facility = facility } -// WithFacilityEmpty adds the facilityEmpty to the dcim sites list params -func (o *DcimSitesListParams) WithFacilityEmpty(facilityEmpty *string) *DcimSitesListParams { - o.SetFacilityEmpty(facilityEmpty) - return o -} - -// SetFacilityEmpty adds the facilityEmpty to the dcim sites list params -func (o *DcimSitesListParams) SetFacilityEmpty(facilityEmpty *string) { - o.FacilityEmpty = facilityEmpty -} - // WithFacilityIc adds the facilityIc to the dcim sites list params func (o *DcimSitesListParams) WithFacilityIc(facilityIc *string) *DcimSitesListParams { o.SetFacilityIc(facilityIc) @@ -1371,17 +1057,6 @@ func (o *DcimSitesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim sites list params -func (o *DcimSitesListParams) WithNameEmpty(nameEmpty *string) *DcimSitesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim sites list params -func (o *DcimSitesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim sites list params func (o *DcimSitesListParams) WithNameIc(nameIc *string) *DcimSitesListParams { o.SetNameIc(nameIc) @@ -1558,17 +1233,6 @@ func (o *DcimSitesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the dcim sites list params -func (o *DcimSitesListParams) WithSlugEmpty(slugEmpty *string) *DcimSitesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the dcim sites list params -func (o *DcimSitesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the dcim sites list params func (o *DcimSitesListParams) WithSlugIc(slugIc *string) *DcimSitesListParams { o.SetSlugIc(slugIc) @@ -1825,74 +1489,6 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.AsnGt != nil { - - // query param asn__gt - var qrAsnGt string - - if o.AsnGt != nil { - qrAsnGt = *o.AsnGt - } - qAsnGt := qrAsnGt - if qAsnGt != "" { - - if err := r.SetQueryParam("asn__gt", qAsnGt); err != nil { - return err - } - } - } - - if o.AsnGte != nil { - - // query param asn__gte - var qrAsnGte string - - if o.AsnGte != nil { - qrAsnGte = *o.AsnGte - } - qAsnGte := qrAsnGte - if qAsnGte != "" { - - if err := r.SetQueryParam("asn__gte", qAsnGte); err != nil { - return err - } - } - } - - if o.AsnLt != nil { - - // query param asn__lt - var qrAsnLt string - - if o.AsnLt != nil { - qrAsnLt = *o.AsnLt - } - qAsnLt := qrAsnLt - if qAsnLt != "" { - - if err := r.SetQueryParam("asn__lt", qAsnLt); err != nil { - return err - } - } - } - - if o.AsnLte != nil { - - // query param asn__lte - var qrAsnLte string - - if o.AsnLte != nil { - qrAsnLte = *o.AsnLte - } - qAsnLte := qrAsnLte - if qAsnLte != "" { - - if err := r.SetQueryParam("asn__lte", qAsnLte); err != nil { - return err - } - } - } - if o.Asnn != nil { // query param asn__n @@ -1910,613 +1506,324 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.ContactEmail != nil { + if o.AsnID != nil { - // query param contact_email - var qrContactEmail string + // query param asn_id + var qrAsnID string - if o.ContactEmail != nil { - qrContactEmail = *o.ContactEmail + if o.AsnID != nil { + qrAsnID = *o.AsnID } - qContactEmail := qrContactEmail - if qContactEmail != "" { + qAsnID := qrAsnID + if qAsnID != "" { - if err := r.SetQueryParam("contact_email", qContactEmail); err != nil { + if err := r.SetQueryParam("asn_id", qAsnID); err != nil { return err } } } - if o.ContactEmailEmpty != nil { + if o.AsnIDn != nil { - // query param contact_email__empty - var qrContactEmailEmpty string + // query param asn_id__n + var qrAsnIDn string - if o.ContactEmailEmpty != nil { - qrContactEmailEmpty = *o.ContactEmailEmpty + if o.AsnIDn != nil { + qrAsnIDn = *o.AsnIDn } - qContactEmailEmpty := qrContactEmailEmpty - if qContactEmailEmpty != "" { + qAsnIDn := qrAsnIDn + if qAsnIDn != "" { - if err := r.SetQueryParam("contact_email__empty", qContactEmailEmpty); err != nil { + if err := r.SetQueryParam("asn_id__n", qAsnIDn); err != nil { return err } } } - if o.ContactEmailIc != nil { + if o.Contact != nil { - // query param contact_email__ic - var qrContactEmailIc string + // query param contact + var qrContact string - if o.ContactEmailIc != nil { - qrContactEmailIc = *o.ContactEmailIc + if o.Contact != nil { + qrContact = *o.Contact } - qContactEmailIc := qrContactEmailIc - if qContactEmailIc != "" { + qContact := qrContact + if qContact != "" { - if err := r.SetQueryParam("contact_email__ic", qContactEmailIc); err != nil { + if err := r.SetQueryParam("contact", qContact); err != nil { return err } } } - if o.ContactEmailIe != nil { + if o.Contactn != nil { - // query param contact_email__ie - var qrContactEmailIe string + // query param contact__n + var qrContactn string - if o.ContactEmailIe != nil { - qrContactEmailIe = *o.ContactEmailIe + if o.Contactn != nil { + qrContactn = *o.Contactn } - qContactEmailIe := qrContactEmailIe - if qContactEmailIe != "" { + qContactn := qrContactn + if qContactn != "" { - if err := r.SetQueryParam("contact_email__ie", qContactEmailIe); err != nil { + if err := r.SetQueryParam("contact__n", qContactn); err != nil { return err } } } - if o.ContactEmailIew != nil { + if o.ContactRole != nil { - // query param contact_email__iew - var qrContactEmailIew string + // query param contact_role + var qrContactRole string - if o.ContactEmailIew != nil { - qrContactEmailIew = *o.ContactEmailIew + if o.ContactRole != nil { + qrContactRole = *o.ContactRole } - qContactEmailIew := qrContactEmailIew - if qContactEmailIew != "" { + qContactRole := qrContactRole + if qContactRole != "" { - if err := r.SetQueryParam("contact_email__iew", qContactEmailIew); err != nil { + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { return err } } } - if o.ContactEmailIsw != nil { + if o.ContactRolen != nil { - // query param contact_email__isw - var qrContactEmailIsw string + // query param contact_role__n + var qrContactRolen string - if o.ContactEmailIsw != nil { - qrContactEmailIsw = *o.ContactEmailIsw + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen } - qContactEmailIsw := qrContactEmailIsw - if qContactEmailIsw != "" { + qContactRolen := qrContactRolen + if qContactRolen != "" { - if err := r.SetQueryParam("contact_email__isw", qContactEmailIsw); err != nil { + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { return err } } } - if o.ContactEmailn != nil { - - // query param contact_email__n - var qrContactEmailn string - - if o.ContactEmailn != nil { - qrContactEmailn = *o.ContactEmailn - } - qContactEmailn := qrContactEmailn - if qContactEmailn != "" { - - if err := r.SetQueryParam("contact_email__n", qContactEmailn); err != nil { - return err - } - } - } - - if o.ContactEmailNic != nil { - - // query param contact_email__nic - var qrContactEmailNic string - - if o.ContactEmailNic != nil { - qrContactEmailNic = *o.ContactEmailNic - } - qContactEmailNic := qrContactEmailNic - if qContactEmailNic != "" { - - if err := r.SetQueryParam("contact_email__nic", qContactEmailNic); err != nil { - return err - } - } - } - - if o.ContactEmailNie != nil { - - // query param contact_email__nie - var qrContactEmailNie string - - if o.ContactEmailNie != nil { - qrContactEmailNie = *o.ContactEmailNie - } - qContactEmailNie := qrContactEmailNie - if qContactEmailNie != "" { - - if err := r.SetQueryParam("contact_email__nie", qContactEmailNie); err != nil { - return err - } - } - } - - if o.ContactEmailNiew != nil { - - // query param contact_email__niew - var qrContactEmailNiew string - - if o.ContactEmailNiew != nil { - qrContactEmailNiew = *o.ContactEmailNiew - } - qContactEmailNiew := qrContactEmailNiew - if qContactEmailNiew != "" { - - if err := r.SetQueryParam("contact_email__niew", qContactEmailNiew); err != nil { - return err - } - } - } - - if o.ContactEmailNisw != nil { - - // query param contact_email__nisw - var qrContactEmailNisw string - - if o.ContactEmailNisw != nil { - qrContactEmailNisw = *o.ContactEmailNisw - } - qContactEmailNisw := qrContactEmailNisw - if qContactEmailNisw != "" { - - if err := r.SetQueryParam("contact_email__nisw", qContactEmailNisw); err != nil { - return err - } - } - } - - if o.ContactName != nil { - - // query param contact_name - var qrContactName string - - if o.ContactName != nil { - qrContactName = *o.ContactName - } - qContactName := qrContactName - if qContactName != "" { - - if err := r.SetQueryParam("contact_name", qContactName); err != nil { - return err - } - } - } - - if o.ContactNameEmpty != nil { - - // query param contact_name__empty - var qrContactNameEmpty string - - if o.ContactNameEmpty != nil { - qrContactNameEmpty = *o.ContactNameEmpty - } - qContactNameEmpty := qrContactNameEmpty - if qContactNameEmpty != "" { - - if err := r.SetQueryParam("contact_name__empty", qContactNameEmpty); err != nil { - return err - } - } - } - - if o.ContactNameIc != nil { - - // query param contact_name__ic - var qrContactNameIc string - - if o.ContactNameIc != nil { - qrContactNameIc = *o.ContactNameIc - } - qContactNameIc := qrContactNameIc - if qContactNameIc != "" { - - if err := r.SetQueryParam("contact_name__ic", qContactNameIc); err != nil { - return err - } - } - } - - if o.ContactNameIe != nil { - - // query param contact_name__ie - var qrContactNameIe string - - if o.ContactNameIe != nil { - qrContactNameIe = *o.ContactNameIe - } - qContactNameIe := qrContactNameIe - if qContactNameIe != "" { - - if err := r.SetQueryParam("contact_name__ie", qContactNameIe); err != nil { - return err - } - } - } - - if o.ContactNameIew != nil { - - // query param contact_name__iew - var qrContactNameIew string - - if o.ContactNameIew != nil { - qrContactNameIew = *o.ContactNameIew - } - qContactNameIew := qrContactNameIew - if qContactNameIew != "" { - - if err := r.SetQueryParam("contact_name__iew", qContactNameIew); err != nil { - return err - } - } - } - - if o.ContactNameIsw != nil { - - // query param contact_name__isw - var qrContactNameIsw string - - if o.ContactNameIsw != nil { - qrContactNameIsw = *o.ContactNameIsw - } - qContactNameIsw := qrContactNameIsw - if qContactNameIsw != "" { - - if err := r.SetQueryParam("contact_name__isw", qContactNameIsw); err != nil { - return err - } - } - } - - if o.ContactNamen != nil { - - // query param contact_name__n - var qrContactNamen string - - if o.ContactNamen != nil { - qrContactNamen = *o.ContactNamen - } - qContactNamen := qrContactNamen - if qContactNamen != "" { - - if err := r.SetQueryParam("contact_name__n", qContactNamen); err != nil { - return err - } - } - } - - if o.ContactNameNic != nil { - - // query param contact_name__nic - var qrContactNameNic string - - if o.ContactNameNic != nil { - qrContactNameNic = *o.ContactNameNic - } - qContactNameNic := qrContactNameNic - if qContactNameNic != "" { - - if err := r.SetQueryParam("contact_name__nic", qContactNameNic); err != nil { - return err - } - } - } - - if o.ContactNameNie != nil { - - // query param contact_name__nie - var qrContactNameNie string - - if o.ContactNameNie != nil { - qrContactNameNie = *o.ContactNameNie - } - qContactNameNie := qrContactNameNie - if qContactNameNie != "" { - - if err := r.SetQueryParam("contact_name__nie", qContactNameNie); err != nil { - return err - } - } - } - - if o.ContactNameNiew != nil { - - // query param contact_name__niew - var qrContactNameNiew string - - if o.ContactNameNiew != nil { - qrContactNameNiew = *o.ContactNameNiew - } - qContactNameNiew := qrContactNameNiew - if qContactNameNiew != "" { - - if err := r.SetQueryParam("contact_name__niew", qContactNameNiew); err != nil { - return err - } - } - } - - if o.ContactNameNisw != nil { - - // query param contact_name__nisw - var qrContactNameNisw string - - if o.ContactNameNisw != nil { - qrContactNameNisw = *o.ContactNameNisw - } - qContactNameNisw := qrContactNameNisw - if qContactNameNisw != "" { - - if err := r.SetQueryParam("contact_name__nisw", qContactNameNisw); err != nil { - return err - } - } - } - - if o.ContactPhone != nil { - - // query param contact_phone - var qrContactPhone string - - if o.ContactPhone != nil { - qrContactPhone = *o.ContactPhone - } - qContactPhone := qrContactPhone - if qContactPhone != "" { - - if err := r.SetQueryParam("contact_phone", qContactPhone); err != nil { - return err - } - } - } - - if o.ContactPhoneEmpty != nil { + if o.Created != nil { - // query param contact_phone__empty - var qrContactPhoneEmpty string + // query param created + var qrCreated string - if o.ContactPhoneEmpty != nil { - qrContactPhoneEmpty = *o.ContactPhoneEmpty + if o.Created != nil { + qrCreated = *o.Created } - qContactPhoneEmpty := qrContactPhoneEmpty - if qContactPhoneEmpty != "" { + qCreated := qrCreated + if qCreated != "" { - if err := r.SetQueryParam("contact_phone__empty", qContactPhoneEmpty); err != nil { + if err := r.SetQueryParam("created", qCreated); err != nil { return err } } } - if o.ContactPhoneIc != nil { + if o.CreatedGte != nil { - // query param contact_phone__ic - var qrContactPhoneIc string + // query param created__gte + var qrCreatedGte string - if o.ContactPhoneIc != nil { - qrContactPhoneIc = *o.ContactPhoneIc + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte } - qContactPhoneIc := qrContactPhoneIc - if qContactPhoneIc != "" { + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { - if err := r.SetQueryParam("contact_phone__ic", qContactPhoneIc); err != nil { + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { return err } } } - if o.ContactPhoneIe != nil { + if o.CreatedLte != nil { - // query param contact_phone__ie - var qrContactPhoneIe string + // query param created__lte + var qrCreatedLte string - if o.ContactPhoneIe != nil { - qrContactPhoneIe = *o.ContactPhoneIe + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte } - qContactPhoneIe := qrContactPhoneIe - if qContactPhoneIe != "" { + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { - if err := r.SetQueryParam("contact_phone__ie", qContactPhoneIe); err != nil { + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { return err } } } - if o.ContactPhoneIew != nil { + if o.Description != nil { - // query param contact_phone__iew - var qrContactPhoneIew string + // query param description + var qrDescription string - if o.ContactPhoneIew != nil { - qrContactPhoneIew = *o.ContactPhoneIew + if o.Description != nil { + qrDescription = *o.Description } - qContactPhoneIew := qrContactPhoneIew - if qContactPhoneIew != "" { + qDescription := qrDescription + if qDescription != "" { - if err := r.SetQueryParam("contact_phone__iew", qContactPhoneIew); err != nil { + if err := r.SetQueryParam("description", qDescription); err != nil { return err } } } - if o.ContactPhoneIsw != nil { + if o.DescriptionIc != nil { - // query param contact_phone__isw - var qrContactPhoneIsw string + // query param description__ic + var qrDescriptionIc string - if o.ContactPhoneIsw != nil { - qrContactPhoneIsw = *o.ContactPhoneIsw + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc } - qContactPhoneIsw := qrContactPhoneIsw - if qContactPhoneIsw != "" { + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { - if err := r.SetQueryParam("contact_phone__isw", qContactPhoneIsw); err != nil { + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { return err } } } - if o.ContactPhonen != nil { + if o.DescriptionIe != nil { - // query param contact_phone__n - var qrContactPhonen string + // query param description__ie + var qrDescriptionIe string - if o.ContactPhonen != nil { - qrContactPhonen = *o.ContactPhonen + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe } - qContactPhonen := qrContactPhonen - if qContactPhonen != "" { + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { - if err := r.SetQueryParam("contact_phone__n", qContactPhonen); err != nil { + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { return err } } } - if o.ContactPhoneNic != nil { + if o.DescriptionIew != nil { - // query param contact_phone__nic - var qrContactPhoneNic string + // query param description__iew + var qrDescriptionIew string - if o.ContactPhoneNic != nil { - qrContactPhoneNic = *o.ContactPhoneNic + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew } - qContactPhoneNic := qrContactPhoneNic - if qContactPhoneNic != "" { + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { - if err := r.SetQueryParam("contact_phone__nic", qContactPhoneNic); err != nil { + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { return err } } } - if o.ContactPhoneNie != nil { + if o.DescriptionIsw != nil { - // query param contact_phone__nie - var qrContactPhoneNie string + // query param description__isw + var qrDescriptionIsw string - if o.ContactPhoneNie != nil { - qrContactPhoneNie = *o.ContactPhoneNie + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw } - qContactPhoneNie := qrContactPhoneNie - if qContactPhoneNie != "" { + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { - if err := r.SetQueryParam("contact_phone__nie", qContactPhoneNie); err != nil { + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { return err } } } - if o.ContactPhoneNiew != nil { + if o.Descriptionn != nil { - // query param contact_phone__niew - var qrContactPhoneNiew string + // query param description__n + var qrDescriptionn string - if o.ContactPhoneNiew != nil { - qrContactPhoneNiew = *o.ContactPhoneNiew + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn } - qContactPhoneNiew := qrContactPhoneNiew - if qContactPhoneNiew != "" { + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { - if err := r.SetQueryParam("contact_phone__niew", qContactPhoneNiew); err != nil { + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { return err } } } - if o.ContactPhoneNisw != nil { + if o.DescriptionNic != nil { - // query param contact_phone__nisw - var qrContactPhoneNisw string + // query param description__nic + var qrDescriptionNic string - if o.ContactPhoneNisw != nil { - qrContactPhoneNisw = *o.ContactPhoneNisw + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic } - qContactPhoneNisw := qrContactPhoneNisw - if qContactPhoneNisw != "" { + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { - if err := r.SetQueryParam("contact_phone__nisw", qContactPhoneNisw); err != nil { + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { return err } } } - if o.Created != nil { + if o.DescriptionNie != nil { - // query param created - var qrCreated string + // query param description__nie + var qrDescriptionNie string - if o.Created != nil { - qrCreated = *o.Created + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie } - qCreated := qrCreated - if qCreated != "" { + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { - if err := r.SetQueryParam("created", qCreated); err != nil { + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { return err } } } - if o.CreatedGte != nil { + if o.DescriptionNiew != nil { - // query param created__gte - var qrCreatedGte string + // query param description__niew + var qrDescriptionNiew string - if o.CreatedGte != nil { - qrCreatedGte = *o.CreatedGte + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew } - qCreatedGte := qrCreatedGte - if qCreatedGte != "" { + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { - if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { return err } } } - if o.CreatedLte != nil { + if o.DescriptionNisw != nil { - // query param created__lte - var qrCreatedLte string + // query param description__nisw + var qrDescriptionNisw string - if o.CreatedLte != nil { - qrCreatedLte = *o.CreatedLte + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw } - qCreatedLte := qrCreatedLte - if qCreatedLte != "" { + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { - if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { return err } } @@ -2539,23 +1846,6 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.FacilityEmpty != nil { - - // query param facility__empty - var qrFacilityEmpty string - - if o.FacilityEmpty != nil { - qrFacilityEmpty = *o.FacilityEmpty - } - qFacilityEmpty := qrFacilityEmpty - if qFacilityEmpty != "" { - - if err := r.SetQueryParam("facility__empty", qFacilityEmpty); err != nil { - return err - } - } - } - if o.FacilityIc != nil { // query param facility__ic @@ -3168,23 +2458,6 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -3457,23 +2730,6 @@ func (o *DcimSitesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic diff --git a/netbox/client/dcim/dcim_sites_list_responses.go b/netbox/client/dcim/dcim_sites_list_responses.go index 04c238c57..334695f8d 100644 --- a/netbox/client/dcim/dcim_sites_list_responses.go +++ b/netbox/client/dcim/dcim_sites_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimSitesListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimSitesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimSitesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimSitesListOKBody) contextValidateResults(ctx context.Context, format if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimSitesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimSitesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go b/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go index 6ff633846..cf378edb3 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go +++ b/netbox/client/dcim/dcim_virtual_chassis_list_parameters.go @@ -87,9 +87,6 @@ type DcimVirtualChassisListParams struct { // Domain. Domain *string - // DomainEmpty. - DomainEmpty *string - // DomainIc. DomainIc *string @@ -165,9 +162,6 @@ type DcimVirtualChassisListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -355,17 +349,6 @@ func (o *DcimVirtualChassisListParams) SetDomain(domain *string) { o.Domain = domain } -// WithDomainEmpty adds the domainEmpty to the dcim virtual chassis list params -func (o *DcimVirtualChassisListParams) WithDomainEmpty(domainEmpty *string) *DcimVirtualChassisListParams { - o.SetDomainEmpty(domainEmpty) - return o -} - -// SetDomainEmpty adds the domainEmpty to the dcim virtual chassis list params -func (o *DcimVirtualChassisListParams) SetDomainEmpty(domainEmpty *string) { - o.DomainEmpty = domainEmpty -} - // WithDomainIc adds the domainIc to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithDomainIc(domainIc *string) *DcimVirtualChassisListParams { o.SetDomainIc(domainIc) @@ -630,17 +613,6 @@ func (o *DcimVirtualChassisListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the dcim virtual chassis list params -func (o *DcimVirtualChassisListParams) WithNameEmpty(nameEmpty *string) *DcimVirtualChassisListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the dcim virtual chassis list params -func (o *DcimVirtualChassisListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the dcim virtual chassis list params func (o *DcimVirtualChassisListParams) WithNameIc(nameIc *string) *DcimVirtualChassisListParams { o.SetNameIc(nameIc) @@ -1036,23 +1008,6 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.DomainEmpty != nil { - - // query param domain__empty - var qrDomainEmpty string - - if o.DomainEmpty != nil { - qrDomainEmpty = *o.DomainEmpty - } - qDomainEmpty := qrDomainEmpty - if qDomainEmpty != "" { - - if err := r.SetQueryParam("domain__empty", qDomainEmpty); err != nil { - return err - } - } - } - if o.DomainIc != nil { // query param domain__ic @@ -1461,23 +1416,6 @@ func (o *DcimVirtualChassisListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/dcim/dcim_virtual_chassis_list_responses.go b/netbox/client/dcim/dcim_virtual_chassis_list_responses.go index ecba66409..64aa9bcea 100644 --- a/netbox/client/dcim/dcim_virtual_chassis_list_responses.go +++ b/netbox/client/dcim/dcim_virtual_chassis_list_responses.go @@ -182,6 +182,8 @@ func (o *DcimVirtualChassisListOKBody) validateResults(formats strfmt.Registry) if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimVirtualChassisListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimVirtualChassisListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *DcimVirtualChassisListOKBody) contextValidateResults(ctx context.Contex if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dcimVirtualChassisListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dcimVirtualChassisListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_client.go b/netbox/client/extras/extras_client.go index 2428c1545..dee0404eb 100644 --- a/netbox/client/extras/extras_client.go +++ b/netbox/client/extras/extras_client.go @@ -228,7 +228,7 @@ func (a *Client) ExtrasConfigContextsBulkDelete(params *ExtrasConfigContextsBulk PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -267,7 +267,7 @@ func (a *Client) ExtrasConfigContextsBulkPartialUpdate(params *ExtrasConfigConte PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -306,7 +306,7 @@ func (a *Client) ExtrasConfigContextsBulkUpdate(params *ExtrasConfigContextsBulk PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -345,7 +345,7 @@ func (a *Client) ExtrasConfigContextsCreate(params *ExtrasConfigContextsCreatePa PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -384,7 +384,7 @@ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeletePa PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -423,7 +423,7 @@ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams PathPattern: "/extras/config-contexts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -462,7 +462,7 @@ func (a *Client) ExtrasConfigContextsPartialUpdate(params *ExtrasConfigContextsP PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -501,7 +501,7 @@ func (a *Client) ExtrasConfigContextsRead(params *ExtrasConfigContextsReadParams PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -540,7 +540,7 @@ func (a *Client) ExtrasConfigContextsUpdate(params *ExtrasConfigContextsUpdatePa PathPattern: "/extras/config-contexts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasConfigContextsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -579,7 +579,7 @@ func (a *Client) ExtrasContentTypesList(params *ExtrasContentTypesListParams, au PathPattern: "/extras/content-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasContentTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -618,7 +618,7 @@ func (a *Client) ExtrasContentTypesRead(params *ExtrasContentTypesReadParams, au PathPattern: "/extras/content-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasContentTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -657,7 +657,7 @@ func (a *Client) ExtrasCustomFieldsBulkDelete(params *ExtrasCustomFieldsBulkDele PathPattern: "/extras/custom-fields/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -696,7 +696,7 @@ func (a *Client) ExtrasCustomFieldsBulkPartialUpdate(params *ExtrasCustomFieldsB PathPattern: "/extras/custom-fields/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -735,7 +735,7 @@ func (a *Client) ExtrasCustomFieldsBulkUpdate(params *ExtrasCustomFieldsBulkUpda PathPattern: "/extras/custom-fields/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -774,7 +774,7 @@ func (a *Client) ExtrasCustomFieldsCreate(params *ExtrasCustomFieldsCreateParams PathPattern: "/extras/custom-fields/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -813,7 +813,7 @@ func (a *Client) ExtrasCustomFieldsDelete(params *ExtrasCustomFieldsDeleteParams PathPattern: "/extras/custom-fields/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -852,7 +852,7 @@ func (a *Client) ExtrasCustomFieldsList(params *ExtrasCustomFieldsListParams, au PathPattern: "/extras/custom-fields/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -891,7 +891,7 @@ func (a *Client) ExtrasCustomFieldsPartialUpdate(params *ExtrasCustomFieldsParti PathPattern: "/extras/custom-fields/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -930,7 +930,7 @@ func (a *Client) ExtrasCustomFieldsRead(params *ExtrasCustomFieldsReadParams, au PathPattern: "/extras/custom-fields/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -969,7 +969,7 @@ func (a *Client) ExtrasCustomFieldsUpdate(params *ExtrasCustomFieldsUpdateParams PathPattern: "/extras/custom-fields/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomFieldsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1008,7 +1008,7 @@ func (a *Client) ExtrasCustomLinksBulkDelete(params *ExtrasCustomLinksBulkDelete PathPattern: "/extras/custom-links/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1047,7 +1047,7 @@ func (a *Client) ExtrasCustomLinksBulkPartialUpdate(params *ExtrasCustomLinksBul PathPattern: "/extras/custom-links/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1086,7 +1086,7 @@ func (a *Client) ExtrasCustomLinksBulkUpdate(params *ExtrasCustomLinksBulkUpdate PathPattern: "/extras/custom-links/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1125,7 +1125,7 @@ func (a *Client) ExtrasCustomLinksCreate(params *ExtrasCustomLinksCreateParams, PathPattern: "/extras/custom-links/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1164,7 +1164,7 @@ func (a *Client) ExtrasCustomLinksDelete(params *ExtrasCustomLinksDeleteParams, PathPattern: "/extras/custom-links/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1203,7 +1203,7 @@ func (a *Client) ExtrasCustomLinksList(params *ExtrasCustomLinksListParams, auth PathPattern: "/extras/custom-links/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1242,7 +1242,7 @@ func (a *Client) ExtrasCustomLinksPartialUpdate(params *ExtrasCustomLinksPartial PathPattern: "/extras/custom-links/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1281,7 +1281,7 @@ func (a *Client) ExtrasCustomLinksRead(params *ExtrasCustomLinksReadParams, auth PathPattern: "/extras/custom-links/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1320,7 +1320,7 @@ func (a *Client) ExtrasCustomLinksUpdate(params *ExtrasCustomLinksUpdateParams, PathPattern: "/extras/custom-links/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasCustomLinksUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1359,7 +1359,7 @@ func (a *Client) ExtrasExportTemplatesBulkDelete(params *ExtrasExportTemplatesBu PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1398,7 +1398,7 @@ func (a *Client) ExtrasExportTemplatesBulkPartialUpdate(params *ExtrasExportTemp PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1437,7 +1437,7 @@ func (a *Client) ExtrasExportTemplatesBulkUpdate(params *ExtrasExportTemplatesBu PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1476,7 +1476,7 @@ func (a *Client) ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreate PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1515,7 +1515,7 @@ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDelete PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1554,7 +1554,7 @@ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListPara PathPattern: "/extras/export-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1593,7 +1593,7 @@ func (a *Client) ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplate PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1632,7 +1632,7 @@ func (a *Client) ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadPara PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1671,7 +1671,7 @@ func (a *Client) ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdate PathPattern: "/extras/export-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasExportTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1710,7 +1710,7 @@ func (a *Client) ExtrasImageAttachmentsBulkDelete(params *ExtrasImageAttachments PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1749,7 +1749,7 @@ func (a *Client) ExtrasImageAttachmentsBulkPartialUpdate(params *ExtrasImageAtta PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1788,7 +1788,7 @@ func (a *Client) ExtrasImageAttachmentsBulkUpdate(params *ExtrasImageAttachments PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1827,7 +1827,7 @@ func (a *Client) ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCrea PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1866,7 +1866,7 @@ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDele PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1905,7 +1905,7 @@ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListPa PathPattern: "/extras/image-attachments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1944,7 +1944,7 @@ func (a *Client) ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachme PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1983,7 +1983,7 @@ func (a *Client) ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadPa PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2022,7 +2022,7 @@ func (a *Client) ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpda PathPattern: "/extras/image-attachments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasImageAttachmentsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2061,7 +2061,7 @@ func (a *Client) ExtrasJobResultsList(params *ExtrasJobResultsListParams, authIn PathPattern: "/extras/job-results/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJobResultsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2100,7 +2100,7 @@ func (a *Client) ExtrasJobResultsRead(params *ExtrasJobResultsReadParams, authIn PathPattern: "/extras/job-results/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJobResultsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2139,7 +2139,7 @@ func (a *Client) ExtrasJournalEntriesBulkDelete(params *ExtrasJournalEntriesBulk PathPattern: "/extras/journal-entries/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2178,7 +2178,7 @@ func (a *Client) ExtrasJournalEntriesBulkPartialUpdate(params *ExtrasJournalEntr PathPattern: "/extras/journal-entries/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2217,7 +2217,7 @@ func (a *Client) ExtrasJournalEntriesBulkUpdate(params *ExtrasJournalEntriesBulk PathPattern: "/extras/journal-entries/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2256,7 +2256,7 @@ func (a *Client) ExtrasJournalEntriesCreate(params *ExtrasJournalEntriesCreatePa PathPattern: "/extras/journal-entries/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2295,7 +2295,7 @@ func (a *Client) ExtrasJournalEntriesDelete(params *ExtrasJournalEntriesDeletePa PathPattern: "/extras/journal-entries/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2334,7 +2334,7 @@ func (a *Client) ExtrasJournalEntriesList(params *ExtrasJournalEntriesListParams PathPattern: "/extras/journal-entries/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2373,7 +2373,7 @@ func (a *Client) ExtrasJournalEntriesPartialUpdate(params *ExtrasJournalEntriesP PathPattern: "/extras/journal-entries/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2412,7 +2412,7 @@ func (a *Client) ExtrasJournalEntriesRead(params *ExtrasJournalEntriesReadParams PathPattern: "/extras/journal-entries/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2451,7 +2451,7 @@ func (a *Client) ExtrasJournalEntriesUpdate(params *ExtrasJournalEntriesUpdatePa PathPattern: "/extras/journal-entries/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasJournalEntriesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2490,7 +2490,7 @@ func (a *Client) ExtrasObjectChangesList(params *ExtrasObjectChangesListParams, PathPattern: "/extras/object-changes/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasObjectChangesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2529,7 +2529,7 @@ func (a *Client) ExtrasObjectChangesRead(params *ExtrasObjectChangesReadParams, PathPattern: "/extras/object-changes/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasObjectChangesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2568,7 +2568,7 @@ func (a *Client) ExtrasReportsList(params *ExtrasReportsListParams, authInfo run PathPattern: "/extras/reports/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasReportsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2607,7 +2607,7 @@ func (a *Client) ExtrasReportsRead(params *ExtrasReportsReadParams, authInfo run PathPattern: "/extras/reports/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasReportsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2646,7 +2646,7 @@ func (a *Client) ExtrasReportsRun(params *ExtrasReportsRunParams, authInfo runti PathPattern: "/extras/reports/{id}/run/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasReportsRunReader{formats: a.formats}, AuthInfo: authInfo, @@ -2685,7 +2685,7 @@ func (a *Client) ExtrasScriptsList(params *ExtrasScriptsListParams, authInfo run PathPattern: "/extras/scripts/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasScriptsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2724,7 +2724,7 @@ func (a *Client) ExtrasScriptsRead(params *ExtrasScriptsReadParams, authInfo run PathPattern: "/extras/scripts/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasScriptsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -2763,7 +2763,7 @@ func (a *Client) ExtrasTagsBulkDelete(params *ExtrasTagsBulkDeleteParams, authIn PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2802,7 +2802,7 @@ func (a *Client) ExtrasTagsBulkPartialUpdate(params *ExtrasTagsBulkPartialUpdate PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2841,7 +2841,7 @@ func (a *Client) ExtrasTagsBulkUpdate(params *ExtrasTagsBulkUpdateParams, authIn PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2880,7 +2880,7 @@ func (a *Client) ExtrasTagsCreate(params *ExtrasTagsCreateParams, authInfo runti PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -2919,7 +2919,7 @@ func (a *Client) ExtrasTagsDelete(params *ExtrasTagsDeleteParams, authInfo runti PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -2958,7 +2958,7 @@ func (a *Client) ExtrasTagsList(params *ExtrasTagsListParams, authInfo runtime.C PathPattern: "/extras/tags/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -2997,7 +2997,7 @@ func (a *Client) ExtrasTagsPartialUpdate(params *ExtrasTagsPartialUpdateParams, PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3036,7 +3036,7 @@ func (a *Client) ExtrasTagsRead(params *ExtrasTagsReadParams, authInfo runtime.C PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3075,7 +3075,7 @@ func (a *Client) ExtrasTagsUpdate(params *ExtrasTagsUpdateParams, authInfo runti PathPattern: "/extras/tags/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasTagsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3114,7 +3114,7 @@ func (a *Client) ExtrasWebhooksBulkDelete(params *ExtrasWebhooksBulkDeleteParams PathPattern: "/extras/webhooks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3153,7 +3153,7 @@ func (a *Client) ExtrasWebhooksBulkPartialUpdate(params *ExtrasWebhooksBulkParti PathPattern: "/extras/webhooks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3192,7 +3192,7 @@ func (a *Client) ExtrasWebhooksBulkUpdate(params *ExtrasWebhooksBulkUpdateParams PathPattern: "/extras/webhooks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3231,7 +3231,7 @@ func (a *Client) ExtrasWebhooksCreate(params *ExtrasWebhooksCreateParams, authIn PathPattern: "/extras/webhooks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3270,7 +3270,7 @@ func (a *Client) ExtrasWebhooksDelete(params *ExtrasWebhooksDeleteParams, authIn PathPattern: "/extras/webhooks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3309,7 +3309,7 @@ func (a *Client) ExtrasWebhooksList(params *ExtrasWebhooksListParams, authInfo r PathPattern: "/extras/webhooks/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3348,7 +3348,7 @@ func (a *Client) ExtrasWebhooksPartialUpdate(params *ExtrasWebhooksPartialUpdate PathPattern: "/extras/webhooks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3387,7 +3387,7 @@ func (a *Client) ExtrasWebhooksRead(params *ExtrasWebhooksReadParams, authInfo r PathPattern: "/extras/webhooks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3426,7 +3426,7 @@ func (a *Client) ExtrasWebhooksUpdate(params *ExtrasWebhooksUpdateParams, authIn PathPattern: "/extras/webhooks/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &ExtrasWebhooksUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/extras/extras_config_contexts_list_parameters.go b/netbox/client/extras/extras_config_contexts_list_parameters.go index b91fd0856..a0e16c45a 100644 --- a/netbox/client/extras/extras_config_contexts_list_parameters.go +++ b/netbox/client/extras/extras_config_contexts_list_parameters.go @@ -93,6 +93,18 @@ type ExtrasConfigContextsListParams struct { // ClusterIDn. ClusterIDn *string + // ClusterType. + ClusterType *string + + // ClusterTypen. + ClusterTypen *string + + // ClusterTypeID. + ClusterTypeID *string + + // ClusterTypeIDn. + ClusterTypeIDn *string + // Created. Created *string @@ -147,9 +159,6 @@ type ExtrasConfigContextsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -252,6 +261,12 @@ type ExtrasConfigContextsListParams struct { // Tagn. Tagn *string + // TagID. + TagID *string + + // TagIDn. + TagIDn *string + // Tenant. Tenant *string @@ -395,6 +410,50 @@ func (o *ExtrasConfigContextsListParams) SetClusterIDn(clusterIDn *string) { o.ClusterIDn = clusterIDn } +// WithClusterType adds the clusterType to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithClusterType(clusterType *string) *ExtrasConfigContextsListParams { + o.SetClusterType(clusterType) + return o +} + +// SetClusterType adds the clusterType to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetClusterType(clusterType *string) { + o.ClusterType = clusterType +} + +// WithClusterTypen adds the clusterTypen to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithClusterTypen(clusterTypen *string) *ExtrasConfigContextsListParams { + o.SetClusterTypen(clusterTypen) + return o +} + +// SetClusterTypen adds the clusterTypeN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetClusterTypen(clusterTypen *string) { + o.ClusterTypen = clusterTypen +} + +// WithClusterTypeID adds the clusterTypeID to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithClusterTypeID(clusterTypeID *string) *ExtrasConfigContextsListParams { + o.SetClusterTypeID(clusterTypeID) + return o +} + +// SetClusterTypeID adds the clusterTypeId to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetClusterTypeID(clusterTypeID *string) { + o.ClusterTypeID = clusterTypeID +} + +// WithClusterTypeIDn adds the clusterTypeIDn to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithClusterTypeIDn(clusterTypeIDn *string) *ExtrasConfigContextsListParams { + o.SetClusterTypeIDn(clusterTypeIDn) + return o +} + +// SetClusterTypeIDn adds the clusterTypeIdN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetClusterTypeIDn(clusterTypeIDn *string) { + o.ClusterTypeIDn = clusterTypeIDn +} + // WithCreated adds the created to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithCreated(created *string) *ExtrasConfigContextsListParams { o.SetCreated(created) @@ -582,17 +641,6 @@ func (o *ExtrasConfigContextsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras config contexts list params -func (o *ExtrasConfigContextsListParams) WithNameEmpty(nameEmpty *string) *ExtrasConfigContextsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras config contexts list params -func (o *ExtrasConfigContextsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithNameIc(nameIc *string) *ExtrasConfigContextsListParams { o.SetNameIc(nameIc) @@ -956,6 +1004,28 @@ func (o *ExtrasConfigContextsListParams) SetTagn(tagn *string) { o.Tagn = tagn } +// WithTagID adds the tagID to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithTagID(tagID *string) *ExtrasConfigContextsListParams { + o.SetTagID(tagID) + return o +} + +// SetTagID adds the tagId to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetTagID(tagID *string) { + o.TagID = tagID +} + +// WithTagIDn adds the tagIDn to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) WithTagIDn(tagIDn *string) *ExtrasConfigContextsListParams { + o.SetTagIDn(tagIDn) + return o +} + +// SetTagIDn adds the tagIdN to the extras config contexts list params +func (o *ExtrasConfigContextsListParams) SetTagIDn(tagIDn *string) { + o.TagIDn = tagIDn +} + // WithTenant adds the tenant to the extras config contexts list params func (o *ExtrasConfigContextsListParams) WithTenant(tenant *string) *ExtrasConfigContextsListParams { o.SetTenant(tenant) @@ -1154,6 +1224,74 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.ClusterType != nil { + + // query param cluster_type + var qrClusterType string + + if o.ClusterType != nil { + qrClusterType = *o.ClusterType + } + qClusterType := qrClusterType + if qClusterType != "" { + + if err := r.SetQueryParam("cluster_type", qClusterType); err != nil { + return err + } + } + } + + if o.ClusterTypen != nil { + + // query param cluster_type__n + var qrClusterTypen string + + if o.ClusterTypen != nil { + qrClusterTypen = *o.ClusterTypen + } + qClusterTypen := qrClusterTypen + if qClusterTypen != "" { + + if err := r.SetQueryParam("cluster_type__n", qClusterTypen); err != nil { + return err + } + } + } + + if o.ClusterTypeID != nil { + + // query param cluster_type_id + var qrClusterTypeID string + + if o.ClusterTypeID != nil { + qrClusterTypeID = *o.ClusterTypeID + } + qClusterTypeID := qrClusterTypeID + if qClusterTypeID != "" { + + if err := r.SetQueryParam("cluster_type_id", qClusterTypeID); err != nil { + return err + } + } + } + + if o.ClusterTypeIDn != nil { + + // query param cluster_type_id__n + var qrClusterTypeIDn string + + if o.ClusterTypeIDn != nil { + qrClusterTypeIDn = *o.ClusterTypeIDn + } + qClusterTypeIDn := qrClusterTypeIDn + if qClusterTypeIDn != "" { + + if err := r.SetQueryParam("cluster_type_id__n", qClusterTypeIDn); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1443,23 +1581,6 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -2021,6 +2142,40 @@ func (o *ExtrasConfigContextsListParams) WriteToRequest(r runtime.ClientRequest, } } + if o.TagID != nil { + + // query param tag_id + var qrTagID string + + if o.TagID != nil { + qrTagID = *o.TagID + } + qTagID := qrTagID + if qTagID != "" { + + if err := r.SetQueryParam("tag_id", qTagID); err != nil { + return err + } + } + } + + if o.TagIDn != nil { + + // query param tag_id__n + var qrTagIDn string + + if o.TagIDn != nil { + qrTagIDn = *o.TagIDn + } + qTagIDn := qrTagIDn + if qTagIDn != "" { + + if err := r.SetQueryParam("tag_id__n", qTagIDn); err != nil { + return err + } + } + } + if o.Tenant != nil { // query param tenant diff --git a/netbox/client/extras/extras_config_contexts_list_responses.go b/netbox/client/extras/extras_config_contexts_list_responses.go index 8857d3233..cc8405290 100644 --- a/netbox/client/extras/extras_config_contexts_list_responses.go +++ b/netbox/client/extras/extras_config_contexts_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasConfigContextsListOKBody) validateResults(formats strfmt.Registry if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasConfigContextsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasConfigContextsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasConfigContextsListOKBody) contextValidateResults(ctx context.Cont if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasConfigContextsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasConfigContextsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_content_types_list_responses.go b/netbox/client/extras/extras_content_types_list_responses.go index 770deec89..58abff028 100644 --- a/netbox/client/extras/extras_content_types_list_responses.go +++ b/netbox/client/extras/extras_content_types_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasContentTypesListOKBody) validateResults(formats strfmt.Registry) if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasContentTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasContentTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasContentTypesListOKBody) contextValidateResults(ctx context.Contex if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasContentTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasContentTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_custom_fields_list_parameters.go b/netbox/client/extras/extras_custom_fields_list_parameters.go index ab83ceee3..75930b8b2 100644 --- a/netbox/client/extras/extras_custom_fields_list_parameters.go +++ b/netbox/client/extras/extras_custom_fields_list_parameters.go @@ -78,11 +78,86 @@ type ExtrasCustomFieldsListParams struct { // ContentTypes. ContentTypes *string + // ContentTypesIc. + ContentTypesIc *string + + // ContentTypesIe. + ContentTypesIe *string + + // ContentTypesIew. + ContentTypesIew *string + + // ContentTypesIsw. + ContentTypesIsw *string + + // ContentTypesn. + ContentTypesn *string + + // ContentTypesNic. + ContentTypesNic *string + + // ContentTypesNie. + ContentTypesNie *string + + // ContentTypesNiew. + ContentTypesNiew *string + + // ContentTypesNisw. + ContentTypesNisw *string + + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // FilterLogic. FilterLogic *string + // FilterLogicn. + FilterLogicn *string + // ID. - ID *float64 + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string /* Limit. @@ -93,17 +168,62 @@ type ExtrasCustomFieldsListParams struct { // Name. Name *string + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + /* Offset. The initial index from which to return the results. */ Offset *int64 + // Q. + Q *string + // Required. Required *string // Weight. - Weight *float64 + Weight *string + + // WeightGt. + WeightGt *string + + // WeightGte. + WeightGte *string + + // WeightLt. + WeightLt *string + + // WeightLte. + WeightLte *string + + // Weightn. + Weightn *string timeout time.Duration Context context.Context @@ -169,6 +289,215 @@ func (o *ExtrasCustomFieldsListParams) SetContentTypes(contentTypes *string) { o.ContentTypes = contentTypes } +// WithContentTypesIc adds the contentTypesIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesIc(contentTypesIc *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesIc(contentTypesIc) + return o +} + +// SetContentTypesIc adds the contentTypesIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesIc(contentTypesIc *string) { + o.ContentTypesIc = contentTypesIc +} + +// WithContentTypesIe adds the contentTypesIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesIe(contentTypesIe *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesIe(contentTypesIe) + return o +} + +// SetContentTypesIe adds the contentTypesIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesIe(contentTypesIe *string) { + o.ContentTypesIe = contentTypesIe +} + +// WithContentTypesIew adds the contentTypesIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesIew(contentTypesIew *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesIew(contentTypesIew) + return o +} + +// SetContentTypesIew adds the contentTypesIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesIew(contentTypesIew *string) { + o.ContentTypesIew = contentTypesIew +} + +// WithContentTypesIsw adds the contentTypesIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesIsw(contentTypesIsw *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesIsw(contentTypesIsw) + return o +} + +// SetContentTypesIsw adds the contentTypesIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesIsw(contentTypesIsw *string) { + o.ContentTypesIsw = contentTypesIsw +} + +// WithContentTypesn adds the contentTypesn to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesn(contentTypesn *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesn(contentTypesn) + return o +} + +// SetContentTypesn adds the contentTypesN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesn(contentTypesn *string) { + o.ContentTypesn = contentTypesn +} + +// WithContentTypesNic adds the contentTypesNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesNic(contentTypesNic *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesNic(contentTypesNic) + return o +} + +// SetContentTypesNic adds the contentTypesNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesNic(contentTypesNic *string) { + o.ContentTypesNic = contentTypesNic +} + +// WithContentTypesNie adds the contentTypesNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesNie(contentTypesNie *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesNie(contentTypesNie) + return o +} + +// SetContentTypesNie adds the contentTypesNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesNie(contentTypesNie *string) { + o.ContentTypesNie = contentTypesNie +} + +// WithContentTypesNiew adds the contentTypesNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesNiew(contentTypesNiew *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesNiew(contentTypesNiew) + return o +} + +// SetContentTypesNiew adds the contentTypesNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesNiew(contentTypesNiew *string) { + o.ContentTypesNiew = contentTypesNiew +} + +// WithContentTypesNisw adds the contentTypesNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithContentTypesNisw(contentTypesNisw *string) *ExtrasCustomFieldsListParams { + o.SetContentTypesNisw(contentTypesNisw) + return o +} + +// SetContentTypesNisw adds the contentTypesNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetContentTypesNisw(contentTypesNisw *string) { + o.ContentTypesNisw = contentTypesNisw +} + +// WithDescription adds the description to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescription(description *string) *ExtrasCustomFieldsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionIc(descriptionIc *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionIe(descriptionIe *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionIew(descriptionIew *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionIsw(descriptionIsw *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionn(descriptionn *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionNic(descriptionNic *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionNie(descriptionNie *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionNiew(descriptionNiew *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithDescriptionNisw(descriptionNisw *string) *ExtrasCustomFieldsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithFilterLogic adds the filterLogic to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithFilterLogic(filterLogic *string) *ExtrasCustomFieldsListParams { o.SetFilterLogic(filterLogic) @@ -180,17 +509,83 @@ func (o *ExtrasCustomFieldsListParams) SetFilterLogic(filterLogic *string) { o.FilterLogic = filterLogic } +// WithFilterLogicn adds the filterLogicn to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithFilterLogicn(filterLogicn *string) *ExtrasCustomFieldsListParams { + o.SetFilterLogicn(filterLogicn) + return o +} + +// SetFilterLogicn adds the filterLogicN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetFilterLogicn(filterLogicn *string) { + o.FilterLogicn = filterLogicn +} + // WithID adds the id to the extras custom fields list params -func (o *ExtrasCustomFieldsListParams) WithID(id *float64) *ExtrasCustomFieldsListParams { +func (o *ExtrasCustomFieldsListParams) WithID(id *string) *ExtrasCustomFieldsListParams { o.SetID(id) return o } // SetID adds the id to the extras custom fields list params -func (o *ExtrasCustomFieldsListParams) SetID(id *float64) { +func (o *ExtrasCustomFieldsListParams) SetID(id *string) { o.ID = id } +// WithIDGt adds the iDGt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithIDGt(iDGt *string) *ExtrasCustomFieldsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithIDGte(iDGte *string) *ExtrasCustomFieldsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithIDLt(iDLt *string) *ExtrasCustomFieldsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithIDLte(iDLte *string) *ExtrasCustomFieldsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithIDn(iDn *string) *ExtrasCustomFieldsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + // WithLimit adds the limit to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithLimit(limit *int64) *ExtrasCustomFieldsListParams { o.SetLimit(limit) @@ -213,6 +608,105 @@ func (o *ExtrasCustomFieldsListParams) SetName(name *string) { o.Name = name } +// WithNameIc adds the nameIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameIc(nameIc *string) *ExtrasCustomFieldsListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameIe(nameIe *string) *ExtrasCustomFieldsListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameIew(nameIew *string) *ExtrasCustomFieldsListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameIsw(nameIsw *string) *ExtrasCustomFieldsListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNamen(namen *string) *ExtrasCustomFieldsListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameNic(nameNic *string) *ExtrasCustomFieldsListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameNie(nameNie *string) *ExtrasCustomFieldsListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameNiew(nameNiew *string) *ExtrasCustomFieldsListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithNameNisw(nameNisw *string) *ExtrasCustomFieldsListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + // WithOffset adds the offset to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithOffset(offset *int64) *ExtrasCustomFieldsListParams { o.SetOffset(offset) @@ -224,6 +718,17 @@ func (o *ExtrasCustomFieldsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithQ(q *string) *ExtrasCustomFieldsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetQ(q *string) { + o.Q = q +} + // WithRequired adds the required to the extras custom fields list params func (o *ExtrasCustomFieldsListParams) WithRequired(required *string) *ExtrasCustomFieldsListParams { o.SetRequired(required) @@ -236,16 +741,71 @@ func (o *ExtrasCustomFieldsListParams) SetRequired(required *string) { } // WithWeight adds the weight to the extras custom fields list params -func (o *ExtrasCustomFieldsListParams) WithWeight(weight *float64) *ExtrasCustomFieldsListParams { +func (o *ExtrasCustomFieldsListParams) WithWeight(weight *string) *ExtrasCustomFieldsListParams { o.SetWeight(weight) return o } // SetWeight adds the weight to the extras custom fields list params -func (o *ExtrasCustomFieldsListParams) SetWeight(weight *float64) { +func (o *ExtrasCustomFieldsListParams) SetWeight(weight *string) { o.Weight = weight } +// WithWeightGt adds the weightGt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithWeightGt(weightGt *string) *ExtrasCustomFieldsListParams { + o.SetWeightGt(weightGt) + return o +} + +// SetWeightGt adds the weightGt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetWeightGt(weightGt *string) { + o.WeightGt = weightGt +} + +// WithWeightGte adds the weightGte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithWeightGte(weightGte *string) *ExtrasCustomFieldsListParams { + o.SetWeightGte(weightGte) + return o +} + +// SetWeightGte adds the weightGte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetWeightGte(weightGte *string) { + o.WeightGte = weightGte +} + +// WithWeightLt adds the weightLt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithWeightLt(weightLt *string) *ExtrasCustomFieldsListParams { + o.SetWeightLt(weightLt) + return o +} + +// SetWeightLt adds the weightLt to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetWeightLt(weightLt *string) { + o.WeightLt = weightLt +} + +// WithWeightLte adds the weightLte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithWeightLte(weightLte *string) *ExtrasCustomFieldsListParams { + o.SetWeightLte(weightLte) + return o +} + +// SetWeightLte adds the weightLte to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetWeightLte(weightLte *string) { + o.WeightLte = weightLte +} + +// WithWeightn adds the weightn to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) WithWeightn(weightn *string) *ExtrasCustomFieldsListParams { + o.SetWeightn(weightn) + return o +} + +// SetWeightn adds the weightN to the extras custom fields list params +func (o *ExtrasCustomFieldsListParams) SetWeightn(weightn *string) { + o.Weightn = weightn +} + // WriteToRequest writes these params to a swagger request func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -271,43 +831,468 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } - if o.FilterLogic != nil { + if o.ContentTypesIc != nil { - // query param filter_logic - var qrFilterLogic string + // query param content_types__ic + var qrContentTypesIc string - if o.FilterLogic != nil { - qrFilterLogic = *o.FilterLogic + if o.ContentTypesIc != nil { + qrContentTypesIc = *o.ContentTypesIc } - qFilterLogic := qrFilterLogic - if qFilterLogic != "" { + qContentTypesIc := qrContentTypesIc + if qContentTypesIc != "" { - if err := r.SetQueryParam("filter_logic", qFilterLogic); err != nil { + if err := r.SetQueryParam("content_types__ic", qContentTypesIc); err != nil { return err } } } - if o.ID != nil { + if o.ContentTypesIe != nil { - // query param id - var qrID float64 + // query param content_types__ie + var qrContentTypesIe string - if o.ID != nil { - qrID = *o.ID + if o.ContentTypesIe != nil { + qrContentTypesIe = *o.ContentTypesIe } - qID := swag.FormatFloat64(qrID) - if qID != "" { + qContentTypesIe := qrContentTypesIe + if qContentTypesIe != "" { - if err := r.SetQueryParam("id", qID); err != nil { + if err := r.SetQueryParam("content_types__ie", qContentTypesIe); err != nil { return err } } } - if o.Limit != nil { + if o.ContentTypesIew != nil { - // query param limit + // query param content_types__iew + var qrContentTypesIew string + + if o.ContentTypesIew != nil { + qrContentTypesIew = *o.ContentTypesIew + } + qContentTypesIew := qrContentTypesIew + if qContentTypesIew != "" { + + if err := r.SetQueryParam("content_types__iew", qContentTypesIew); err != nil { + return err + } + } + } + + if o.ContentTypesIsw != nil { + + // query param content_types__isw + var qrContentTypesIsw string + + if o.ContentTypesIsw != nil { + qrContentTypesIsw = *o.ContentTypesIsw + } + qContentTypesIsw := qrContentTypesIsw + if qContentTypesIsw != "" { + + if err := r.SetQueryParam("content_types__isw", qContentTypesIsw); err != nil { + return err + } + } + } + + if o.ContentTypesn != nil { + + // query param content_types__n + var qrContentTypesn string + + if o.ContentTypesn != nil { + qrContentTypesn = *o.ContentTypesn + } + qContentTypesn := qrContentTypesn + if qContentTypesn != "" { + + if err := r.SetQueryParam("content_types__n", qContentTypesn); err != nil { + return err + } + } + } + + if o.ContentTypesNic != nil { + + // query param content_types__nic + var qrContentTypesNic string + + if o.ContentTypesNic != nil { + qrContentTypesNic = *o.ContentTypesNic + } + qContentTypesNic := qrContentTypesNic + if qContentTypesNic != "" { + + if err := r.SetQueryParam("content_types__nic", qContentTypesNic); err != nil { + return err + } + } + } + + if o.ContentTypesNie != nil { + + // query param content_types__nie + var qrContentTypesNie string + + if o.ContentTypesNie != nil { + qrContentTypesNie = *o.ContentTypesNie + } + qContentTypesNie := qrContentTypesNie + if qContentTypesNie != "" { + + if err := r.SetQueryParam("content_types__nie", qContentTypesNie); err != nil { + return err + } + } + } + + if o.ContentTypesNiew != nil { + + // query param content_types__niew + var qrContentTypesNiew string + + if o.ContentTypesNiew != nil { + qrContentTypesNiew = *o.ContentTypesNiew + } + qContentTypesNiew := qrContentTypesNiew + if qContentTypesNiew != "" { + + if err := r.SetQueryParam("content_types__niew", qContentTypesNiew); err != nil { + return err + } + } + } + + if o.ContentTypesNisw != nil { + + // query param content_types__nisw + var qrContentTypesNisw string + + if o.ContentTypesNisw != nil { + qrContentTypesNisw = *o.ContentTypesNisw + } + qContentTypesNisw := qrContentTypesNisw + if qContentTypesNisw != "" { + + if err := r.SetQueryParam("content_types__nisw", qContentTypesNisw); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.FilterLogic != nil { + + // query param filter_logic + var qrFilterLogic string + + if o.FilterLogic != nil { + qrFilterLogic = *o.FilterLogic + } + qFilterLogic := qrFilterLogic + if qFilterLogic != "" { + + if err := r.SetQueryParam("filter_logic", qFilterLogic); err != nil { + return err + } + } + } + + if o.FilterLogicn != nil { + + // query param filter_logic__n + var qrFilterLogicn string + + if o.FilterLogicn != nil { + qrFilterLogicn = *o.FilterLogicn + } + qFilterLogicn := qrFilterLogicn + if qFilterLogicn != "" { + + if err := r.SetQueryParam("filter_logic__n", qFilterLogicn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit var qrLimit int64 if o.Limit != nil { @@ -339,6 +1324,159 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + if o.Offset != nil { // query param offset @@ -356,6 +1494,23 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Required != nil { // query param required @@ -376,12 +1531,12 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r if o.Weight != nil { // query param weight - var qrWeight float64 + var qrWeight string if o.Weight != nil { qrWeight = *o.Weight } - qWeight := swag.FormatFloat64(qrWeight) + qWeight := qrWeight if qWeight != "" { if err := r.SetQueryParam("weight", qWeight); err != nil { @@ -390,6 +1545,91 @@ func (o *ExtrasCustomFieldsListParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.WeightGt != nil { + + // query param weight__gt + var qrWeightGt string + + if o.WeightGt != nil { + qrWeightGt = *o.WeightGt + } + qWeightGt := qrWeightGt + if qWeightGt != "" { + + if err := r.SetQueryParam("weight__gt", qWeightGt); err != nil { + return err + } + } + } + + if o.WeightGte != nil { + + // query param weight__gte + var qrWeightGte string + + if o.WeightGte != nil { + qrWeightGte = *o.WeightGte + } + qWeightGte := qrWeightGte + if qWeightGte != "" { + + if err := r.SetQueryParam("weight__gte", qWeightGte); err != nil { + return err + } + } + } + + if o.WeightLt != nil { + + // query param weight__lt + var qrWeightLt string + + if o.WeightLt != nil { + qrWeightLt = *o.WeightLt + } + qWeightLt := qrWeightLt + if qWeightLt != "" { + + if err := r.SetQueryParam("weight__lt", qWeightLt); err != nil { + return err + } + } + } + + if o.WeightLte != nil { + + // query param weight__lte + var qrWeightLte string + + if o.WeightLte != nil { + qrWeightLte = *o.WeightLte + } + qWeightLte := qrWeightLte + if qWeightLte != "" { + + if err := r.SetQueryParam("weight__lte", qWeightLte); err != nil { + return err + } + } + } + + if o.Weightn != nil { + + // query param weight__n + var qrWeightn string + + if o.Weightn != nil { + qrWeightn = *o.Weightn + } + qWeightn := qrWeightn + if qWeightn != "" { + + if err := r.SetQueryParam("weight__n", qWeightn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/extras/extras_custom_fields_list_responses.go b/netbox/client/extras/extras_custom_fields_list_responses.go index 7a4010f8a..214aacac6 100644 --- a/netbox/client/extras/extras_custom_fields_list_responses.go +++ b/netbox/client/extras/extras_custom_fields_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasCustomFieldsListOKBody) validateResults(formats strfmt.Registry) if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasCustomFieldsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasCustomFieldsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasCustomFieldsListOKBody) contextValidateResults(ctx context.Contex if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasCustomFieldsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasCustomFieldsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_custom_links_list_parameters.go b/netbox/client/extras/extras_custom_links_list_parameters.go index d85fd2e0d..5cd2c09db 100644 --- a/netbox/client/extras/extras_custom_links_list_parameters.go +++ b/netbox/client/extras/extras_custom_links_list_parameters.go @@ -81,12 +81,12 @@ type ExtrasCustomLinksListParams struct { // ContentTypen. ContentTypen *string + // Enabled. + Enabled *string + // GroupName. GroupName *string - // GroupNameEmpty. - GroupNameEmpty *string - // GroupNameIc. GroupNameIc *string @@ -141,9 +141,6 @@ type ExtrasCustomLinksListParams struct { // LinkText. LinkText *string - // LinkTextEmpty. - LinkTextEmpty *string - // LinkTextIc. LinkTextIc *string @@ -174,9 +171,6 @@ type ExtrasCustomLinksListParams struct { // LinkURL. LinkURL *string - // LinkURLEmpty. - LinkURLEmpty *string - // LinkURLIc. LinkURLIc *string @@ -207,9 +201,6 @@ type ExtrasCustomLinksListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -246,6 +237,9 @@ type ExtrasCustomLinksListParams struct { */ Offset *int64 + // Q. + Q *string + // Weight. Weight *string @@ -339,6 +333,17 @@ func (o *ExtrasCustomLinksListParams) SetContentTypen(contentTypen *string) { o.ContentTypen = contentTypen } +// WithEnabled adds the enabled to the extras custom links list params +func (o *ExtrasCustomLinksListParams) WithEnabled(enabled *string) *ExtrasCustomLinksListParams { + o.SetEnabled(enabled) + return o +} + +// SetEnabled adds the enabled to the extras custom links list params +func (o *ExtrasCustomLinksListParams) SetEnabled(enabled *string) { + o.Enabled = enabled +} + // WithGroupName adds the groupName to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithGroupName(groupName *string) *ExtrasCustomLinksListParams { o.SetGroupName(groupName) @@ -350,17 +355,6 @@ func (o *ExtrasCustomLinksListParams) SetGroupName(groupName *string) { o.GroupName = groupName } -// WithGroupNameEmpty adds the groupNameEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) WithGroupNameEmpty(groupNameEmpty *string) *ExtrasCustomLinksListParams { - o.SetGroupNameEmpty(groupNameEmpty) - return o -} - -// SetGroupNameEmpty adds the groupNameEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) SetGroupNameEmpty(groupNameEmpty *string) { - o.GroupNameEmpty = groupNameEmpty -} - // WithGroupNameIc adds the groupNameIc to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithGroupNameIc(groupNameIc *string) *ExtrasCustomLinksListParams { o.SetGroupNameIc(groupNameIc) @@ -548,17 +542,6 @@ func (o *ExtrasCustomLinksListParams) SetLinkText(linkText *string) { o.LinkText = linkText } -// WithLinkTextEmpty adds the linkTextEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) WithLinkTextEmpty(linkTextEmpty *string) *ExtrasCustomLinksListParams { - o.SetLinkTextEmpty(linkTextEmpty) - return o -} - -// SetLinkTextEmpty adds the linkTextEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) SetLinkTextEmpty(linkTextEmpty *string) { - o.LinkTextEmpty = linkTextEmpty -} - // WithLinkTextIc adds the linkTextIc to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithLinkTextIc(linkTextIc *string) *ExtrasCustomLinksListParams { o.SetLinkTextIc(linkTextIc) @@ -669,17 +652,6 @@ func (o *ExtrasCustomLinksListParams) SetLinkURL(linkURL *string) { o.LinkURL = linkURL } -// WithLinkURLEmpty adds the linkURLEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) WithLinkURLEmpty(linkURLEmpty *string) *ExtrasCustomLinksListParams { - o.SetLinkURLEmpty(linkURLEmpty) - return o -} - -// SetLinkURLEmpty adds the linkUrlEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) SetLinkURLEmpty(linkURLEmpty *string) { - o.LinkURLEmpty = linkURLEmpty -} - // WithLinkURLIc adds the linkURLIc to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithLinkURLIc(linkURLIc *string) *ExtrasCustomLinksListParams { o.SetLinkURLIc(linkURLIc) @@ -790,17 +762,6 @@ func (o *ExtrasCustomLinksListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) WithNameEmpty(nameEmpty *string) *ExtrasCustomLinksListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras custom links list params -func (o *ExtrasCustomLinksListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithNameIc(nameIc *string) *ExtrasCustomLinksListParams { o.SetNameIc(nameIc) @@ -922,6 +883,17 @@ func (o *ExtrasCustomLinksListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the extras custom links list params +func (o *ExtrasCustomLinksListParams) WithQ(q *string) *ExtrasCustomLinksListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the extras custom links list params +func (o *ExtrasCustomLinksListParams) SetQ(q *string) { + o.Q = q +} + // WithWeight adds the weight to the extras custom links list params func (o *ExtrasCustomLinksListParams) WithWeight(weight *string) *ExtrasCustomLinksListParams { o.SetWeight(weight) @@ -1030,35 +1002,35 @@ func (o *ExtrasCustomLinksListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.GroupName != nil { + if o.Enabled != nil { - // query param group_name - var qrGroupName string + // query param enabled + var qrEnabled string - if o.GroupName != nil { - qrGroupName = *o.GroupName + if o.Enabled != nil { + qrEnabled = *o.Enabled } - qGroupName := qrGroupName - if qGroupName != "" { + qEnabled := qrEnabled + if qEnabled != "" { - if err := r.SetQueryParam("group_name", qGroupName); err != nil { + if err := r.SetQueryParam("enabled", qEnabled); err != nil { return err } } } - if o.GroupNameEmpty != nil { + if o.GroupName != nil { - // query param group_name__empty - var qrGroupNameEmpty string + // query param group_name + var qrGroupName string - if o.GroupNameEmpty != nil { - qrGroupNameEmpty = *o.GroupNameEmpty + if o.GroupName != nil { + qrGroupName = *o.GroupName } - qGroupNameEmpty := qrGroupNameEmpty - if qGroupNameEmpty != "" { + qGroupName := qrGroupName + if qGroupName != "" { - if err := r.SetQueryParam("group_name__empty", qGroupNameEmpty); err != nil { + if err := r.SetQueryParam("group_name", qGroupName); err != nil { return err } } @@ -1353,23 +1325,6 @@ func (o *ExtrasCustomLinksListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.LinkTextEmpty != nil { - - // query param link_text__empty - var qrLinkTextEmpty string - - if o.LinkTextEmpty != nil { - qrLinkTextEmpty = *o.LinkTextEmpty - } - qLinkTextEmpty := qrLinkTextEmpty - if qLinkTextEmpty != "" { - - if err := r.SetQueryParam("link_text__empty", qLinkTextEmpty); err != nil { - return err - } - } - } - if o.LinkTextIc != nil { // query param link_text__ic @@ -1540,23 +1495,6 @@ func (o *ExtrasCustomLinksListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.LinkURLEmpty != nil { - - // query param link_url__empty - var qrLinkURLEmpty string - - if o.LinkURLEmpty != nil { - qrLinkURLEmpty = *o.LinkURLEmpty - } - qLinkURLEmpty := qrLinkURLEmpty - if qLinkURLEmpty != "" { - - if err := r.SetQueryParam("link_url__empty", qLinkURLEmpty); err != nil { - return err - } - } - } - if o.LinkURLIc != nil { // query param link_url__ic @@ -1727,23 +1665,6 @@ func (o *ExtrasCustomLinksListParams) WriteToRequest(r runtime.ClientRequest, re } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1931,6 +1852,23 @@ func (o *ExtrasCustomLinksListParams) WriteToRequest(r runtime.ClientRequest, re } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.Weight != nil { // query param weight diff --git a/netbox/client/extras/extras_custom_links_list_responses.go b/netbox/client/extras/extras_custom_links_list_responses.go index ec18a888c..738411924 100644 --- a/netbox/client/extras/extras_custom_links_list_responses.go +++ b/netbox/client/extras/extras_custom_links_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasCustomLinksListOKBody) validateResults(formats strfmt.Registry) e if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasCustomLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasCustomLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasCustomLinksListOKBody) contextValidateResults(ctx context.Context if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasCustomLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasCustomLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_export_templates_list_parameters.go b/netbox/client/extras/extras_export_templates_list_parameters.go index e6c9ac335..5c0f11817 100644 --- a/netbox/client/extras/extras_export_templates_list_parameters.go +++ b/netbox/client/extras/extras_export_templates_list_parameters.go @@ -81,6 +81,36 @@ type ExtrasExportTemplatesListParams struct { // ContentTypen. ContentTypen *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -108,9 +138,6 @@ type ExtrasExportTemplatesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -144,6 +171,9 @@ type ExtrasExportTemplatesListParams struct { */ Offset *int64 + // Q. + Q *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -219,6 +249,116 @@ func (o *ExtrasExportTemplatesListParams) SetContentTypen(contentTypen *string) o.ContentTypen = contentTypen } +// WithDescription adds the description to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescription(description *string) *ExtrasExportTemplatesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionIc(descriptionIc *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionIe(descriptionIe *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionIew(descriptionIew *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionIsw(descriptionIsw *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionn(descriptionn *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionNic(descriptionNic *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionNie(descriptionNie *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionNiew(descriptionNiew *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithDescriptionNisw(descriptionNisw *string) *ExtrasExportTemplatesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the extras export templates list params func (o *ExtrasExportTemplatesListParams) WithID(id *string) *ExtrasExportTemplatesListParams { o.SetID(id) @@ -307,17 +447,6 @@ func (o *ExtrasExportTemplatesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras export templates list params -func (o *ExtrasExportTemplatesListParams) WithNameEmpty(nameEmpty *string) *ExtrasExportTemplatesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras export templates list params -func (o *ExtrasExportTemplatesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras export templates list params func (o *ExtrasExportTemplatesListParams) WithNameIc(nameIc *string) *ExtrasExportTemplatesListParams { o.SetNameIc(nameIc) @@ -428,6 +557,17 @@ func (o *ExtrasExportTemplatesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) WithQ(q *string) *ExtrasExportTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the extras export templates list params +func (o *ExtrasExportTemplatesListParams) SetQ(q *string) { + o.Q = q +} + // WriteToRequest writes these params to a swagger request func (o *ExtrasExportTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -470,6 +610,176 @@ func (o *ExtrasExportTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -606,23 +916,6 @@ func (o *ExtrasExportTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -793,6 +1086,23 @@ func (o *ExtrasExportTemplatesListParams) WriteToRequest(r runtime.ClientRequest } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/extras/extras_export_templates_list_responses.go b/netbox/client/extras/extras_export_templates_list_responses.go index f1bdc5dbb..8121836c3 100644 --- a/netbox/client/extras/extras_export_templates_list_responses.go +++ b/netbox/client/extras/extras_export_templates_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasExportTemplatesListOKBody) validateResults(formats strfmt.Registr if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasExportTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasExportTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasExportTemplatesListOKBody) contextValidateResults(ctx context.Con if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasExportTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasExportTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_image_attachments_list_parameters.go b/netbox/client/extras/extras_image_attachments_list_parameters.go index 6883ddd02..68c690987 100644 --- a/netbox/client/extras/extras_image_attachments_list_parameters.go +++ b/netbox/client/extras/extras_image_attachments_list_parameters.go @@ -117,9 +117,6 @@ type ExtrasImageAttachmentsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -171,6 +168,9 @@ type ExtrasImageAttachmentsListParams struct { */ Offset *int64 + // Q. + Q *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -367,17 +367,6 @@ func (o *ExtrasImageAttachmentsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras image attachments list params -func (o *ExtrasImageAttachmentsListParams) WithNameEmpty(nameEmpty *string) *ExtrasImageAttachmentsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras image attachments list params -func (o *ExtrasImageAttachmentsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras image attachments list params func (o *ExtrasImageAttachmentsListParams) WithNameIc(nameIc *string) *ExtrasImageAttachmentsListParams { o.SetNameIc(nameIc) @@ -554,6 +543,17 @@ func (o *ExtrasImageAttachmentsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the extras image attachments list params +func (o *ExtrasImageAttachmentsListParams) WithQ(q *string) *ExtrasImageAttachmentsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the extras image attachments list params +func (o *ExtrasImageAttachmentsListParams) SetQ(q *string) { + o.Q = q +} + // WriteToRequest writes these params to a swagger request func (o *ExtrasImageAttachmentsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -783,23 +783,6 @@ func (o *ExtrasImageAttachmentsListParams) WriteToRequest(r runtime.ClientReques } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1072,6 +1055,23 @@ func (o *ExtrasImageAttachmentsListParams) WriteToRequest(r runtime.ClientReques } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/extras/extras_image_attachments_list_responses.go b/netbox/client/extras/extras_image_attachments_list_responses.go index 71d450bee..8b22d2dba 100644 --- a/netbox/client/extras/extras_image_attachments_list_responses.go +++ b/netbox/client/extras/extras_image_attachments_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasImageAttachmentsListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasImageAttachmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasImageAttachmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasImageAttachmentsListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasImageAttachmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasImageAttachmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_job_results_list_parameters.go b/netbox/client/extras/extras_job_results_list_parameters.go index af48f804b..5f3eacd03 100644 --- a/netbox/client/extras/extras_job_results_list_parameters.go +++ b/netbox/client/extras/extras_job_results_list_parameters.go @@ -108,9 +108,6 @@ type ExtrasJobResultsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -328,17 +325,6 @@ func (o *ExtrasJobResultsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras job results list params -func (o *ExtrasJobResultsListParams) WithNameEmpty(nameEmpty *string) *ExtrasJobResultsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras job results list params -func (o *ExtrasJobResultsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras job results list params func (o *ExtrasJobResultsListParams) WithNameIc(nameIc *string) *ExtrasJobResultsListParams { o.SetNameIc(nameIc) @@ -704,23 +690,6 @@ func (o *ExtrasJobResultsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/extras/extras_job_results_list_responses.go b/netbox/client/extras/extras_job_results_list_responses.go index 08b3872a6..d4dc6785f 100644 --- a/netbox/client/extras/extras_job_results_list_responses.go +++ b/netbox/client/extras/extras_job_results_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasJobResultsListOKBody) validateResults(formats strfmt.Registry) er if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasJobResultsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasJobResultsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasJobResultsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasJobResultsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasJobResultsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_journal_entries_list_parameters.go b/netbox/client/extras/extras_journal_entries_list_parameters.go index 99ff84b78..b657c3343 100644 --- a/netbox/client/extras/extras_journal_entries_list_parameters.go +++ b/netbox/client/extras/extras_journal_entries_list_parameters.go @@ -174,6 +174,12 @@ type ExtrasJournalEntriesListParams struct { // Q. Q *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -568,6 +574,28 @@ func (o *ExtrasJournalEntriesListParams) SetQ(q *string) { o.Q = q } +// WithTag adds the tag to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) WithTag(tag *string) *ExtrasJournalEntriesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) WithTagn(tagn *string) *ExtrasJournalEntriesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the extras journal entries list params +func (o *ExtrasJournalEntriesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *ExtrasJournalEntriesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1103,6 +1131,40 @@ func (o *ExtrasJournalEntriesListParams) 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 len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/extras/extras_journal_entries_list_responses.go b/netbox/client/extras/extras_journal_entries_list_responses.go index 8c0ab05fe..47a66712e 100644 --- a/netbox/client/extras/extras_journal_entries_list_responses.go +++ b/netbox/client/extras/extras_journal_entries_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasJournalEntriesListOKBody) validateResults(formats strfmt.Registry if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasJournalEntriesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasJournalEntriesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasJournalEntriesListOKBody) contextValidateResults(ctx context.Cont if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasJournalEntriesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasJournalEntriesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_object_changes_list_parameters.go b/netbox/client/extras/extras_object_changes_list_parameters.go index 32de77207..357a541fa 100644 --- a/netbox/client/extras/extras_object_changes_list_parameters.go +++ b/netbox/client/extras/extras_object_changes_list_parameters.go @@ -138,9 +138,6 @@ type ExtrasObjectChangesListParams struct { // ObjectRepr. ObjectRepr *string - // ObjectReprEmpty. - ObjectReprEmpty *string - // ObjectReprIc. ObjectReprIc *string @@ -198,9 +195,6 @@ type ExtrasObjectChangesListParams struct { // UserName. UserName *string - // UserNameEmpty. - UserNameEmpty *string - // UserNameIc. UserNameIc *string @@ -501,17 +495,6 @@ func (o *ExtrasObjectChangesListParams) SetObjectRepr(objectRepr *string) { o.ObjectRepr = objectRepr } -// WithObjectReprEmpty adds the objectReprEmpty to the extras object changes list params -func (o *ExtrasObjectChangesListParams) WithObjectReprEmpty(objectReprEmpty *string) *ExtrasObjectChangesListParams { - o.SetObjectReprEmpty(objectReprEmpty) - return o -} - -// SetObjectReprEmpty adds the objectReprEmpty to the extras object changes list params -func (o *ExtrasObjectChangesListParams) SetObjectReprEmpty(objectReprEmpty *string) { - o.ObjectReprEmpty = objectReprEmpty -} - // WithObjectReprIc adds the objectReprIc to the extras object changes list params func (o *ExtrasObjectChangesListParams) WithObjectReprIc(objectReprIc *string) *ExtrasObjectChangesListParams { o.SetObjectReprIc(objectReprIc) @@ -710,17 +693,6 @@ func (o *ExtrasObjectChangesListParams) SetUserName(userName *string) { o.UserName = userName } -// WithUserNameEmpty adds the userNameEmpty to the extras object changes list params -func (o *ExtrasObjectChangesListParams) WithUserNameEmpty(userNameEmpty *string) *ExtrasObjectChangesListParams { - o.SetUserNameEmpty(userNameEmpty) - return o -} - -// SetUserNameEmpty adds the userNameEmpty to the extras object changes list params -func (o *ExtrasObjectChangesListParams) SetUserNameEmpty(userNameEmpty *string) { - o.UserNameEmpty = userNameEmpty -} - // WithUserNameIc adds the userNameIc to the extras object changes list params func (o *ExtrasObjectChangesListParams) WithUserNameIc(userNameIc *string) *ExtrasObjectChangesListParams { o.SetUserNameIc(userNameIc) @@ -1168,23 +1140,6 @@ func (o *ExtrasObjectChangesListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.ObjectReprEmpty != nil { - - // query param object_repr__empty - var qrObjectReprEmpty string - - if o.ObjectReprEmpty != nil { - qrObjectReprEmpty = *o.ObjectReprEmpty - } - qObjectReprEmpty := qrObjectReprEmpty - if qObjectReprEmpty != "" { - - if err := r.SetQueryParam("object_repr__empty", qObjectReprEmpty); err != nil { - return err - } - } - } - if o.ObjectReprIc != nil { // query param object_repr__ic @@ -1491,23 +1446,6 @@ func (o *ExtrasObjectChangesListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.UserNameEmpty != nil { - - // query param user_name__empty - var qrUserNameEmpty string - - if o.UserNameEmpty != nil { - qrUserNameEmpty = *o.UserNameEmpty - } - qUserNameEmpty := qrUserNameEmpty - if qUserNameEmpty != "" { - - if err := r.SetQueryParam("user_name__empty", qUserNameEmpty); err != nil { - return err - } - } - } - if o.UserNameIc != nil { // query param user_name__ic diff --git a/netbox/client/extras/extras_object_changes_list_responses.go b/netbox/client/extras/extras_object_changes_list_responses.go index f8d91d827..7151bec4b 100644 --- a/netbox/client/extras/extras_object_changes_list_responses.go +++ b/netbox/client/extras/extras_object_changes_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasObjectChangesListOKBody) validateResults(formats strfmt.Registry) if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasObjectChangesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasObjectChangesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasObjectChangesListOKBody) contextValidateResults(ctx context.Conte if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasObjectChangesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasObjectChangesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_tags_list_parameters.go b/netbox/client/extras/extras_tags_list_parameters.go index 15522b287..decc4f1b6 100644 --- a/netbox/client/extras/extras_tags_list_parameters.go +++ b/netbox/client/extras/extras_tags_list_parameters.go @@ -78,9 +78,6 @@ type ExtrasTagsListParams struct { // Color. Color *string - // ColorEmpty. - ColorEmpty *string - // ColorIc. ColorIc *string @@ -123,6 +120,36 @@ type ExtrasTagsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -159,9 +186,6 @@ type ExtrasTagsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -201,9 +225,6 @@ type ExtrasTagsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -295,17 +316,6 @@ func (o *ExtrasTagsListParams) SetColor(color *string) { o.Color = color } -// WithColorEmpty adds the colorEmpty to the extras tags list params -func (o *ExtrasTagsListParams) WithColorEmpty(colorEmpty *string) *ExtrasTagsListParams { - o.SetColorEmpty(colorEmpty) - return o -} - -// SetColorEmpty adds the colorEmpty to the extras tags list params -func (o *ExtrasTagsListParams) SetColorEmpty(colorEmpty *string) { - o.ColorEmpty = colorEmpty -} - // WithColorIc adds the colorIc to the extras tags list params func (o *ExtrasTagsListParams) WithColorIc(colorIc *string) *ExtrasTagsListParams { o.SetColorIc(colorIc) @@ -460,6 +470,116 @@ func (o *ExtrasTagsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the extras tags list params +func (o *ExtrasTagsListParams) WithDescription(description *string) *ExtrasTagsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the extras tags list params +func (o *ExtrasTagsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionIc(descriptionIc *string) *ExtrasTagsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionIe(descriptionIe *string) *ExtrasTagsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionIew(descriptionIew *string) *ExtrasTagsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionIsw(descriptionIsw *string) *ExtrasTagsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionn(descriptionn *string) *ExtrasTagsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionNic(descriptionNic *string) *ExtrasTagsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionNie(descriptionNie *string) *ExtrasTagsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionNiew(descriptionNiew *string) *ExtrasTagsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the extras tags list params +func (o *ExtrasTagsListParams) WithDescriptionNisw(descriptionNisw *string) *ExtrasTagsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the extras tags list params +func (o *ExtrasTagsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the extras tags list params func (o *ExtrasTagsListParams) WithID(id *string) *ExtrasTagsListParams { o.SetID(id) @@ -581,17 +701,6 @@ func (o *ExtrasTagsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras tags list params -func (o *ExtrasTagsListParams) WithNameEmpty(nameEmpty *string) *ExtrasTagsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras tags list params -func (o *ExtrasTagsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras tags list params func (o *ExtrasTagsListParams) WithNameIc(nameIc *string) *ExtrasTagsListParams { o.SetNameIc(nameIc) @@ -724,17 +833,6 @@ func (o *ExtrasTagsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the extras tags list params -func (o *ExtrasTagsListParams) WithSlugEmpty(slugEmpty *string) *ExtrasTagsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the extras tags list params -func (o *ExtrasTagsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the extras tags list params func (o *ExtrasTagsListParams) WithSlugIc(slugIc *string) *ExtrasTagsListParams { o.SetSlugIc(slugIc) @@ -859,23 +957,6 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } - if o.ColorEmpty != nil { - - // query param color__empty - var qrColorEmpty string - - if o.ColorEmpty != nil { - qrColorEmpty = *o.ColorEmpty - } - qColorEmpty := qrColorEmpty - if qColorEmpty != "" { - - if err := r.SetQueryParam("color__empty", qColorEmpty); err != nil { - return err - } - } - } - if o.ColorIc != nil { // query param color__ic @@ -1114,6 +1195,176 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -1301,23 +1552,6 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1522,23 +1756,6 @@ func (o *ExtrasTagsListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic diff --git a/netbox/client/extras/extras_tags_list_responses.go b/netbox/client/extras/extras_tags_list_responses.go index b42d3cba0..aef7be047 100644 --- a/netbox/client/extras/extras_tags_list_responses.go +++ b/netbox/client/extras/extras_tags_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasTagsListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasTagsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasTagsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasTagsListOKBody) contextValidateResults(ctx context.Context, forma if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasTagsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasTagsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/extras/extras_webhooks_list_parameters.go b/netbox/client/extras/extras_webhooks_list_parameters.go index 57c62e65c..bad61668f 100644 --- a/netbox/client/extras/extras_webhooks_list_parameters.go +++ b/netbox/client/extras/extras_webhooks_list_parameters.go @@ -78,9 +78,6 @@ type ExtrasWebhooksListParams struct { // CaFilePath. CaFilePath *string - // CaFilePathEmpty. - CaFilePathEmpty *string - // CaFilePathIc. CaFilePathIc *string @@ -144,9 +141,6 @@ type ExtrasWebhooksListParams struct { // HTTPContentType. HTTPContentType *string - // HTTPContentTypeEmpty. - HTTPContentTypeEmpty *string - // HTTPContentTypeIc. HTTPContentTypeIc *string @@ -207,9 +201,6 @@ type ExtrasWebhooksListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -246,9 +237,6 @@ type ExtrasWebhooksListParams struct { // PayloadURL. PayloadURL *string - // PayloadURLEmpty. - PayloadURLEmpty *string - // PayloadURLIc. PayloadURLIc *string @@ -276,12 +264,12 @@ type ExtrasWebhooksListParams struct { // PayloadURLNisw. PayloadURLNisw *string + // Q. + Q *string + // Secret. Secret *string - // SecretEmpty. - SecretEmpty *string - // SecretIc. SecretIc *string @@ -385,17 +373,6 @@ func (o *ExtrasWebhooksListParams) SetCaFilePath(caFilePath *string) { o.CaFilePath = caFilePath } -// WithCaFilePathEmpty adds the caFilePathEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) WithCaFilePathEmpty(caFilePathEmpty *string) *ExtrasWebhooksListParams { - o.SetCaFilePathEmpty(caFilePathEmpty) - return o -} - -// SetCaFilePathEmpty adds the caFilePathEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) SetCaFilePathEmpty(caFilePathEmpty *string) { - o.CaFilePathEmpty = caFilePathEmpty -} - // WithCaFilePathIc adds the caFilePathIc to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithCaFilePathIc(caFilePathIc *string) *ExtrasWebhooksListParams { o.SetCaFilePathIc(caFilePathIc) @@ -627,17 +604,6 @@ func (o *ExtrasWebhooksListParams) SetHTTPContentType(hTTPContentType *string) { o.HTTPContentType = hTTPContentType } -// WithHTTPContentTypeEmpty adds the hTTPContentTypeEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) WithHTTPContentTypeEmpty(hTTPContentTypeEmpty *string) *ExtrasWebhooksListParams { - o.SetHTTPContentTypeEmpty(hTTPContentTypeEmpty) - return o -} - -// SetHTTPContentTypeEmpty adds the httpContentTypeEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) SetHTTPContentTypeEmpty(hTTPContentTypeEmpty *string) { - o.HTTPContentTypeEmpty = hTTPContentTypeEmpty -} - // WithHTTPContentTypeIc adds the hTTPContentTypeIc to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithHTTPContentTypeIc(hTTPContentTypeIc *string) *ExtrasWebhooksListParams { o.SetHTTPContentTypeIc(hTTPContentTypeIc) @@ -847,17 +813,6 @@ func (o *ExtrasWebhooksListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) WithNameEmpty(nameEmpty *string) *ExtrasWebhooksListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithNameIc(nameIc *string) *ExtrasWebhooksListParams { o.SetNameIc(nameIc) @@ -979,17 +934,6 @@ func (o *ExtrasWebhooksListParams) SetPayloadURL(payloadURL *string) { o.PayloadURL = payloadURL } -// WithPayloadURLEmpty adds the payloadURLEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) WithPayloadURLEmpty(payloadURLEmpty *string) *ExtrasWebhooksListParams { - o.SetPayloadURLEmpty(payloadURLEmpty) - return o -} - -// SetPayloadURLEmpty adds the payloadUrlEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) SetPayloadURLEmpty(payloadURLEmpty *string) { - o.PayloadURLEmpty = payloadURLEmpty -} - // WithPayloadURLIc adds the payloadURLIc to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithPayloadURLIc(payloadURLIc *string) *ExtrasWebhooksListParams { o.SetPayloadURLIc(payloadURLIc) @@ -1089,6 +1033,17 @@ func (o *ExtrasWebhooksListParams) SetPayloadURLNisw(payloadURLNisw *string) { o.PayloadURLNisw = payloadURLNisw } +// WithQ adds the q to the extras webhooks list params +func (o *ExtrasWebhooksListParams) WithQ(q *string) *ExtrasWebhooksListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the extras webhooks list params +func (o *ExtrasWebhooksListParams) SetQ(q *string) { + o.Q = q +} + // WithSecret adds the secret to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithSecret(secret *string) *ExtrasWebhooksListParams { o.SetSecret(secret) @@ -1100,17 +1055,6 @@ func (o *ExtrasWebhooksListParams) SetSecret(secret *string) { o.Secret = secret } -// WithSecretEmpty adds the secretEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) WithSecretEmpty(secretEmpty *string) *ExtrasWebhooksListParams { - o.SetSecretEmpty(secretEmpty) - return o -} - -// SetSecretEmpty adds the secretEmpty to the extras webhooks list params -func (o *ExtrasWebhooksListParams) SetSecretEmpty(secretEmpty *string) { - o.SecretEmpty = secretEmpty -} - // WithSecretIc adds the secretIc to the extras webhooks list params func (o *ExtrasWebhooksListParams) WithSecretIc(secretIc *string) *ExtrasWebhooksListParams { o.SetSecretIc(secretIc) @@ -1279,23 +1223,6 @@ func (o *ExtrasWebhooksListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.CaFilePathEmpty != nil { - - // query param ca_file_path__empty - var qrCaFilePathEmpty string - - if o.CaFilePathEmpty != nil { - qrCaFilePathEmpty = *o.CaFilePathEmpty - } - qCaFilePathEmpty := qrCaFilePathEmpty - if qCaFilePathEmpty != "" { - - if err := r.SetQueryParam("ca_file_path__empty", qCaFilePathEmpty); err != nil { - return err - } - } - } - if o.CaFilePathIc != nil { // query param ca_file_path__ic @@ -1653,23 +1580,6 @@ func (o *ExtrasWebhooksListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.HTTPContentTypeEmpty != nil { - - // query param http_content_type__empty - var qrHTTPContentTypeEmpty string - - if o.HTTPContentTypeEmpty != nil { - qrHTTPContentTypeEmpty = *o.HTTPContentTypeEmpty - } - qHTTPContentTypeEmpty := qrHTTPContentTypeEmpty - if qHTTPContentTypeEmpty != "" { - - if err := r.SetQueryParam("http_content_type__empty", qHTTPContentTypeEmpty); err != nil { - return err - } - } - } - if o.HTTPContentTypeIc != nil { // query param http_content_type__ic @@ -1993,23 +1903,6 @@ func (o *ExtrasWebhooksListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -2197,23 +2090,6 @@ func (o *ExtrasWebhooksListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.PayloadURLEmpty != nil { - - // query param payload_url__empty - var qrPayloadURLEmpty string - - if o.PayloadURLEmpty != nil { - qrPayloadURLEmpty = *o.PayloadURLEmpty - } - qPayloadURLEmpty := qrPayloadURLEmpty - if qPayloadURLEmpty != "" { - - if err := r.SetQueryParam("payload_url__empty", qPayloadURLEmpty); err != nil { - return err - } - } - } - if o.PayloadURLIc != nil { // query param payload_url__ic @@ -2367,35 +2243,35 @@ func (o *ExtrasWebhooksListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.Secret != nil { + if o.Q != nil { - // query param secret - var qrSecret string + // query param q + var qrQ string - if o.Secret != nil { - qrSecret = *o.Secret + if o.Q != nil { + qrQ = *o.Q } - qSecret := qrSecret - if qSecret != "" { + qQ := qrQ + if qQ != "" { - if err := r.SetQueryParam("secret", qSecret); err != nil { + if err := r.SetQueryParam("q", qQ); err != nil { return err } } } - if o.SecretEmpty != nil { + if o.Secret != nil { - // query param secret__empty - var qrSecretEmpty string + // query param secret + var qrSecret string - if o.SecretEmpty != nil { - qrSecretEmpty = *o.SecretEmpty + if o.Secret != nil { + qrSecret = *o.Secret } - qSecretEmpty := qrSecretEmpty - if qSecretEmpty != "" { + qSecret := qrSecret + if qSecret != "" { - if err := r.SetQueryParam("secret__empty", qSecretEmpty); err != nil { + if err := r.SetQueryParam("secret", qSecret); err != nil { return err } } diff --git a/netbox/client/extras/extras_webhooks_list_responses.go b/netbox/client/extras/extras_webhooks_list_responses.go index 1fc2922a2..f20c1da34 100644 --- a/netbox/client/extras/extras_webhooks_list_responses.go +++ b/netbox/client/extras/extras_webhooks_list_responses.go @@ -182,6 +182,8 @@ func (o *ExtrasWebhooksListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasWebhooksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasWebhooksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *ExtrasWebhooksListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extrasWebhooksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("extrasWebhooksListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_aggregates_list_parameters.go b/netbox/client/ipam/ipam_aggregates_list_parameters.go index f98031bc5..2426fcacd 100644 --- a/netbox/client/ipam/ipam_aggregates_list_parameters.go +++ b/netbox/client/ipam/ipam_aggregates_list_parameters.go @@ -102,6 +102,36 @@ type IpamAggregatesListParams struct { // DateAddedn. DateAddedn *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Family. Family *float64 @@ -344,6 +374,116 @@ func (o *IpamAggregatesListParams) SetDateAddedn(dateAddedn *string) { o.DateAddedn = dateAddedn } +// WithDescription adds the description to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescription(description *string) *IpamAggregatesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionIc(descriptionIc *string) *IpamAggregatesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionIe(descriptionIe *string) *IpamAggregatesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionIew(descriptionIew *string) *IpamAggregatesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionIsw(descriptionIsw *string) *IpamAggregatesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionn(descriptionn *string) *IpamAggregatesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionNic(descriptionNic *string) *IpamAggregatesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionNie(descriptionNie *string) *IpamAggregatesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionNiew(descriptionNiew *string) *IpamAggregatesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam aggregates list params +func (o *IpamAggregatesListParams) WithDescriptionNisw(descriptionNisw *string) *IpamAggregatesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam aggregates list params +func (o *IpamAggregatesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithFamily adds the family to the ipam aggregates list params func (o *IpamAggregatesListParams) WithFamily(family *float64) *IpamAggregatesListParams { o.SetFamily(family) @@ -813,6 +953,176 @@ func (o *IpamAggregatesListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Family != nil { // query param family diff --git a/netbox/client/ipam/ipam_aggregates_list_responses.go b/netbox/client/ipam/ipam_aggregates_list_responses.go index 7c4ebe9e0..9d72c0d4a 100644 --- a/netbox/client/ipam/ipam_aggregates_list_responses.go +++ b/netbox/client/ipam/ipam_aggregates_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamAggregatesListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamAggregatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamAggregatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamAggregatesListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamAggregatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamAggregatesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_asns_bulk_delete_parameters.go b/netbox/client/ipam/ipam_asns_bulk_delete_parameters.go new file mode 100644 index 000000000..062888595 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 ipam + +// 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" +) + +// NewIpamAsnsBulkDeleteParams creates a new IpamAsnsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsBulkDeleteParams() *IpamAsnsBulkDeleteParams { + return &IpamAsnsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsBulkDeleteParamsWithTimeout creates a new IpamAsnsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamAsnsBulkDeleteParams { + return &IpamAsnsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamAsnsBulkDeleteParamsWithContext creates a new IpamAsnsBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamAsnsBulkDeleteParamsWithContext(ctx context.Context) *IpamAsnsBulkDeleteParams { + return &IpamAsnsBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamAsnsBulkDeleteParamsWithHTTPClient creates a new IpamAsnsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamAsnsBulkDeleteParams { + return &IpamAsnsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* IpamAsnsBulkDeleteParams contains all the parameters to send to the API endpoint + for the ipam asns bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsBulkDeleteParams) WithDefaults() *IpamAsnsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns bulk delete params +func (o *IpamAsnsBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamAsnsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns bulk delete params +func (o *IpamAsnsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns bulk delete params +func (o *IpamAsnsBulkDeleteParams) WithContext(ctx context.Context) *IpamAsnsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns bulk delete params +func (o *IpamAsnsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns bulk delete params +func (o *IpamAsnsBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamAsnsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns bulk delete params +func (o *IpamAsnsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsBulkDeleteParams) 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/netbox/client/ipam/ipam_asns_bulk_delete_responses.go b/netbox/client/ipam/ipam_asns_bulk_delete_responses.go new file mode 100644 index 000000000..b9f591c18 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamAsnsBulkDeleteReader is a Reader for the IpamAsnsBulkDelete structure. +type IpamAsnsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamAsnsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsBulkDeleteNoContent creates a IpamAsnsBulkDeleteNoContent with default headers values +func NewIpamAsnsBulkDeleteNoContent() *IpamAsnsBulkDeleteNoContent { + return &IpamAsnsBulkDeleteNoContent{} +} + +/* IpamAsnsBulkDeleteNoContent describes a response with status code 204, with default header values. + +IpamAsnsBulkDeleteNoContent ipam asns bulk delete no content +*/ +type IpamAsnsBulkDeleteNoContent struct { +} + +func (o *IpamAsnsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/asns/][%d] ipamAsnsBulkDeleteNoContent ", 204) +} + +func (o *IpamAsnsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_bulk_partial_update_parameters.go b/netbox/client/ipam/ipam_asns_bulk_partial_update_parameters.go new file mode 100644 index 000000000..0382bf337 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamAsnsBulkPartialUpdateParams creates a new IpamAsnsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsBulkPartialUpdateParams() *IpamAsnsBulkPartialUpdateParams { + return &IpamAsnsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsBulkPartialUpdateParamsWithTimeout creates a new IpamAsnsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamAsnsBulkPartialUpdateParams { + return &IpamAsnsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamAsnsBulkPartialUpdateParamsWithContext creates a new IpamAsnsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamAsnsBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamAsnsBulkPartialUpdateParams { + return &IpamAsnsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamAsnsBulkPartialUpdateParamsWithHTTPClient creates a new IpamAsnsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamAsnsBulkPartialUpdateParams { + return &IpamAsnsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamAsnsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam asns bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableASN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsBulkPartialUpdateParams) WithDefaults() *IpamAsnsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamAsnsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamAsnsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamAsnsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) WithData(data *models.WritableASN) *IpamAsnsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam asns bulk partial update params +func (o *IpamAsnsBulkPartialUpdateParams) SetData(data *models.WritableASN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_asns_bulk_partial_update_responses.go b/netbox/client/ipam/ipam_asns_bulk_partial_update_responses.go new file mode 100644 index 000000000..f59cc451b --- /dev/null +++ b/netbox/client/ipam/ipam_asns_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsBulkPartialUpdateReader is a Reader for the IpamAsnsBulkPartialUpdate structure. +type IpamAsnsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamAsnsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsBulkPartialUpdateOK creates a IpamAsnsBulkPartialUpdateOK with default headers values +func NewIpamAsnsBulkPartialUpdateOK() *IpamAsnsBulkPartialUpdateOK { + return &IpamAsnsBulkPartialUpdateOK{} +} + +/* IpamAsnsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +IpamAsnsBulkPartialUpdateOK ipam asns bulk partial update o k +*/ +type IpamAsnsBulkPartialUpdateOK struct { + Payload *models.ASN +} + +func (o *IpamAsnsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/asns/][%d] ipamAsnsBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamAsnsBulkPartialUpdateOK) GetPayload() *models.ASN { + return o.Payload +} + +func (o *IpamAsnsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ASN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_bulk_update_parameters.go b/netbox/client/ipam/ipam_asns_bulk_update_parameters.go new file mode 100644 index 000000000..bb764b152 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamAsnsBulkUpdateParams creates a new IpamAsnsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsBulkUpdateParams() *IpamAsnsBulkUpdateParams { + return &IpamAsnsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsBulkUpdateParamsWithTimeout creates a new IpamAsnsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamAsnsBulkUpdateParams { + return &IpamAsnsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamAsnsBulkUpdateParamsWithContext creates a new IpamAsnsBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamAsnsBulkUpdateParamsWithContext(ctx context.Context) *IpamAsnsBulkUpdateParams { + return &IpamAsnsBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamAsnsBulkUpdateParamsWithHTTPClient creates a new IpamAsnsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamAsnsBulkUpdateParams { + return &IpamAsnsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* IpamAsnsBulkUpdateParams contains all the parameters to send to the API endpoint + for the ipam asns bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsBulkUpdateParams struct { + + // Data. + Data *models.WritableASN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsBulkUpdateParams) WithDefaults() *IpamAsnsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamAsnsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) WithContext(ctx context.Context) *IpamAsnsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamAsnsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) WithData(data *models.WritableASN) *IpamAsnsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam asns bulk update params +func (o *IpamAsnsBulkUpdateParams) SetData(data *models.WritableASN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_asns_bulk_update_responses.go b/netbox/client/ipam/ipam_asns_bulk_update_responses.go new file mode 100644 index 000000000..07fd82128 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsBulkUpdateReader is a Reader for the IpamAsnsBulkUpdate structure. +type IpamAsnsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamAsnsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsBulkUpdateOK creates a IpamAsnsBulkUpdateOK with default headers values +func NewIpamAsnsBulkUpdateOK() *IpamAsnsBulkUpdateOK { + return &IpamAsnsBulkUpdateOK{} +} + +/* IpamAsnsBulkUpdateOK describes a response with status code 200, with default header values. + +IpamAsnsBulkUpdateOK ipam asns bulk update o k +*/ +type IpamAsnsBulkUpdateOK struct { + Payload *models.ASN +} + +func (o *IpamAsnsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/asns/][%d] ipamAsnsBulkUpdateOK %+v", 200, o.Payload) +} +func (o *IpamAsnsBulkUpdateOK) GetPayload() *models.ASN { + return o.Payload +} + +func (o *IpamAsnsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ASN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_create_parameters.go b/netbox/client/ipam/ipam_asns_create_parameters.go new file mode 100644 index 000000000..08dd5dcfc --- /dev/null +++ b/netbox/client/ipam/ipam_asns_create_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamAsnsCreateParams creates a new IpamAsnsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsCreateParams() *IpamAsnsCreateParams { + return &IpamAsnsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsCreateParamsWithTimeout creates a new IpamAsnsCreateParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsCreateParamsWithTimeout(timeout time.Duration) *IpamAsnsCreateParams { + return &IpamAsnsCreateParams{ + timeout: timeout, + } +} + +// NewIpamAsnsCreateParamsWithContext creates a new IpamAsnsCreateParams object +// with the ability to set a context for a request. +func NewIpamAsnsCreateParamsWithContext(ctx context.Context) *IpamAsnsCreateParams { + return &IpamAsnsCreateParams{ + Context: ctx, + } +} + +// NewIpamAsnsCreateParamsWithHTTPClient creates a new IpamAsnsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsCreateParamsWithHTTPClient(client *http.Client) *IpamAsnsCreateParams { + return &IpamAsnsCreateParams{ + HTTPClient: client, + } +} + +/* IpamAsnsCreateParams contains all the parameters to send to the API endpoint + for the ipam asns create operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsCreateParams struct { + + // Data. + Data *models.WritableASN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsCreateParams) WithDefaults() *IpamAsnsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns create params +func (o *IpamAsnsCreateParams) WithTimeout(timeout time.Duration) *IpamAsnsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns create params +func (o *IpamAsnsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns create params +func (o *IpamAsnsCreateParams) WithContext(ctx context.Context) *IpamAsnsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns create params +func (o *IpamAsnsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns create params +func (o *IpamAsnsCreateParams) WithHTTPClient(client *http.Client) *IpamAsnsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns create params +func (o *IpamAsnsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam asns create params +func (o *IpamAsnsCreateParams) WithData(data *models.WritableASN) *IpamAsnsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam asns create params +func (o *IpamAsnsCreateParams) SetData(data *models.WritableASN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_asns_create_responses.go b/netbox/client/ipam/ipam_asns_create_responses.go new file mode 100644 index 000000000..c91758c7a --- /dev/null +++ b/netbox/client/ipam/ipam_asns_create_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsCreateReader is a Reader for the IpamAsnsCreate structure. +type IpamAsnsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamAsnsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsCreateCreated creates a IpamAsnsCreateCreated with default headers values +func NewIpamAsnsCreateCreated() *IpamAsnsCreateCreated { + return &IpamAsnsCreateCreated{} +} + +/* IpamAsnsCreateCreated describes a response with status code 201, with default header values. + +IpamAsnsCreateCreated ipam asns create created +*/ +type IpamAsnsCreateCreated struct { + Payload *models.ASN +} + +func (o *IpamAsnsCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/asns/][%d] ipamAsnsCreateCreated %+v", 201, o.Payload) +} +func (o *IpamAsnsCreateCreated) GetPayload() *models.ASN { + return o.Payload +} + +func (o *IpamAsnsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ASN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_delete_parameters.go b/netbox/client/ipam/ipam_asns_delete_parameters.go new file mode 100644 index 000000000..1242b1bc0 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamAsnsDeleteParams creates a new IpamAsnsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsDeleteParams() *IpamAsnsDeleteParams { + return &IpamAsnsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsDeleteParamsWithTimeout creates a new IpamAsnsDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsDeleteParamsWithTimeout(timeout time.Duration) *IpamAsnsDeleteParams { + return &IpamAsnsDeleteParams{ + timeout: timeout, + } +} + +// NewIpamAsnsDeleteParamsWithContext creates a new IpamAsnsDeleteParams object +// with the ability to set a context for a request. +func NewIpamAsnsDeleteParamsWithContext(ctx context.Context) *IpamAsnsDeleteParams { + return &IpamAsnsDeleteParams{ + Context: ctx, + } +} + +// NewIpamAsnsDeleteParamsWithHTTPClient creates a new IpamAsnsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsDeleteParamsWithHTTPClient(client *http.Client) *IpamAsnsDeleteParams { + return &IpamAsnsDeleteParams{ + HTTPClient: client, + } +} + +/* IpamAsnsDeleteParams contains all the parameters to send to the API endpoint + for the ipam asns delete operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsDeleteParams struct { + + /* ID. + + A unique integer value identifying this ASN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsDeleteParams) WithDefaults() *IpamAsnsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns delete params +func (o *IpamAsnsDeleteParams) WithTimeout(timeout time.Duration) *IpamAsnsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns delete params +func (o *IpamAsnsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns delete params +func (o *IpamAsnsDeleteParams) WithContext(ctx context.Context) *IpamAsnsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns delete params +func (o *IpamAsnsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns delete params +func (o *IpamAsnsDeleteParams) WithHTTPClient(client *http.Client) *IpamAsnsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns delete params +func (o *IpamAsnsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam asns delete params +func (o *IpamAsnsDeleteParams) WithID(id int64) *IpamAsnsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam asns delete params +func (o *IpamAsnsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsDeleteParams) 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/netbox/client/ipam/ipam_asns_delete_responses.go b/netbox/client/ipam/ipam_asns_delete_responses.go new file mode 100644 index 000000000..222c8e4fc --- /dev/null +++ b/netbox/client/ipam/ipam_asns_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamAsnsDeleteReader is a Reader for the IpamAsnsDelete structure. +type IpamAsnsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamAsnsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsDeleteNoContent creates a IpamAsnsDeleteNoContent with default headers values +func NewIpamAsnsDeleteNoContent() *IpamAsnsDeleteNoContent { + return &IpamAsnsDeleteNoContent{} +} + +/* IpamAsnsDeleteNoContent describes a response with status code 204, with default header values. + +IpamAsnsDeleteNoContent ipam asns delete no content +*/ +type IpamAsnsDeleteNoContent struct { +} + +func (o *IpamAsnsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/asns/{id}/][%d] ipamAsnsDeleteNoContent ", 204) +} + +func (o *IpamAsnsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_list_parameters.go b/netbox/client/ipam/ipam_asns_list_parameters.go new file mode 100644 index 000000000..84f75a9be --- /dev/null +++ b/netbox/client/ipam/ipam_asns_list_parameters.go @@ -0,0 +1,1668 @@ +// 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 ipam + +// 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" +) + +// NewIpamAsnsListParams creates a new IpamAsnsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsListParams() *IpamAsnsListParams { + return &IpamAsnsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsListParamsWithTimeout creates a new IpamAsnsListParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsListParamsWithTimeout(timeout time.Duration) *IpamAsnsListParams { + return &IpamAsnsListParams{ + timeout: timeout, + } +} + +// NewIpamAsnsListParamsWithContext creates a new IpamAsnsListParams object +// with the ability to set a context for a request. +func NewIpamAsnsListParamsWithContext(ctx context.Context) *IpamAsnsListParams { + return &IpamAsnsListParams{ + Context: ctx, + } +} + +// NewIpamAsnsListParamsWithHTTPClient creates a new IpamAsnsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsListParamsWithHTTPClient(client *http.Client) *IpamAsnsListParams { + return &IpamAsnsListParams{ + HTTPClient: client, + } +} + +/* IpamAsnsListParams contains all the parameters to send to the API endpoint + for the ipam asns list operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsListParams struct { + + // Asn. + Asn *string + + // AsnGt. + AsnGt *string + + // AsnGte. + AsnGte *string + + // AsnLt. + AsnLt *string + + // AsnLte. + AsnLte *string + + // Asnn. + Asnn *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Rir. + Rir *string + + // Rirn. + Rirn *string + + // RirID. + RirID *string + + // RirIDn. + RirIDn *string + + // Site. + Site *string + + // Siten. + Siten *string + + // SiteID. + SiteID *string + + // SiteIDn. + SiteIDn *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // Tenant. + Tenant *string + + // Tenantn. + Tenantn *string + + // TenantGroup. + TenantGroup *string + + // TenantGroupn. + TenantGroupn *string + + // TenantGroupID. + TenantGroupID *string + + // TenantGroupIDn. + TenantGroupIDn *string + + // TenantID. + TenantID *string + + // TenantIDn. + TenantIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsListParams) WithDefaults() *IpamAsnsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns list params +func (o *IpamAsnsListParams) WithTimeout(timeout time.Duration) *IpamAsnsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns list params +func (o *IpamAsnsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns list params +func (o *IpamAsnsListParams) WithContext(ctx context.Context) *IpamAsnsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns list params +func (o *IpamAsnsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns list params +func (o *IpamAsnsListParams) WithHTTPClient(client *http.Client) *IpamAsnsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns list params +func (o *IpamAsnsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAsn adds the asn to the ipam asns list params +func (o *IpamAsnsListParams) WithAsn(asn *string) *IpamAsnsListParams { + o.SetAsn(asn) + return o +} + +// SetAsn adds the asn to the ipam asns list params +func (o *IpamAsnsListParams) SetAsn(asn *string) { + o.Asn = asn +} + +// WithAsnGt adds the asnGt to the ipam asns list params +func (o *IpamAsnsListParams) WithAsnGt(asnGt *string) *IpamAsnsListParams { + o.SetAsnGt(asnGt) + return o +} + +// SetAsnGt adds the asnGt to the ipam asns list params +func (o *IpamAsnsListParams) SetAsnGt(asnGt *string) { + o.AsnGt = asnGt +} + +// WithAsnGte adds the asnGte to the ipam asns list params +func (o *IpamAsnsListParams) WithAsnGte(asnGte *string) *IpamAsnsListParams { + o.SetAsnGte(asnGte) + return o +} + +// SetAsnGte adds the asnGte to the ipam asns list params +func (o *IpamAsnsListParams) SetAsnGte(asnGte *string) { + o.AsnGte = asnGte +} + +// WithAsnLt adds the asnLt to the ipam asns list params +func (o *IpamAsnsListParams) WithAsnLt(asnLt *string) *IpamAsnsListParams { + o.SetAsnLt(asnLt) + return o +} + +// SetAsnLt adds the asnLt to the ipam asns list params +func (o *IpamAsnsListParams) SetAsnLt(asnLt *string) { + o.AsnLt = asnLt +} + +// WithAsnLte adds the asnLte to the ipam asns list params +func (o *IpamAsnsListParams) WithAsnLte(asnLte *string) *IpamAsnsListParams { + o.SetAsnLte(asnLte) + return o +} + +// SetAsnLte adds the asnLte to the ipam asns list params +func (o *IpamAsnsListParams) SetAsnLte(asnLte *string) { + o.AsnLte = asnLte +} + +// WithAsnn adds the asnn to the ipam asns list params +func (o *IpamAsnsListParams) WithAsnn(asnn *string) *IpamAsnsListParams { + o.SetAsnn(asnn) + return o +} + +// SetAsnn adds the asnN to the ipam asns list params +func (o *IpamAsnsListParams) SetAsnn(asnn *string) { + o.Asnn = asnn +} + +// WithCreated adds the created to the ipam asns list params +func (o *IpamAsnsListParams) WithCreated(created *string) *IpamAsnsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam asns list params +func (o *IpamAsnsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam asns list params +func (o *IpamAsnsListParams) WithCreatedGte(createdGte *string) *IpamAsnsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam asns list params +func (o *IpamAsnsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam asns list params +func (o *IpamAsnsListParams) WithCreatedLte(createdLte *string) *IpamAsnsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam asns list params +func (o *IpamAsnsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the ipam asns list params +func (o *IpamAsnsListParams) WithDescription(description *string) *IpamAsnsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam asns list params +func (o *IpamAsnsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionIc(descriptionIc *string) *IpamAsnsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionIe(descriptionIe *string) *IpamAsnsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionIew(descriptionIew *string) *IpamAsnsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionIsw(descriptionIsw *string) *IpamAsnsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionn(descriptionn *string) *IpamAsnsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionNic(descriptionNic *string) *IpamAsnsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionNie(descriptionNie *string) *IpamAsnsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionNiew(descriptionNiew *string) *IpamAsnsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam asns list params +func (o *IpamAsnsListParams) WithDescriptionNisw(descriptionNisw *string) *IpamAsnsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam asns list params +func (o *IpamAsnsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithID adds the id to the ipam asns list params +func (o *IpamAsnsListParams) WithID(id *string) *IpamAsnsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam asns list params +func (o *IpamAsnsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam asns list params +func (o *IpamAsnsListParams) WithIDGt(iDGt *string) *IpamAsnsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam asns list params +func (o *IpamAsnsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam asns list params +func (o *IpamAsnsListParams) WithIDGte(iDGte *string) *IpamAsnsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam asns list params +func (o *IpamAsnsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam asns list params +func (o *IpamAsnsListParams) WithIDLt(iDLt *string) *IpamAsnsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam asns list params +func (o *IpamAsnsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam asns list params +func (o *IpamAsnsListParams) WithIDLte(iDLte *string) *IpamAsnsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam asns list params +func (o *IpamAsnsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam asns list params +func (o *IpamAsnsListParams) WithIDn(iDn *string) *IpamAsnsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam asns list params +func (o *IpamAsnsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the ipam asns list params +func (o *IpamAsnsListParams) WithLastUpdated(lastUpdated *string) *IpamAsnsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam asns list params +func (o *IpamAsnsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam asns list params +func (o *IpamAsnsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamAsnsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam asns list params +func (o *IpamAsnsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam asns list params +func (o *IpamAsnsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamAsnsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam asns list params +func (o *IpamAsnsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the ipam asns list params +func (o *IpamAsnsListParams) WithLimit(limit *int64) *IpamAsnsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam asns list params +func (o *IpamAsnsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the ipam asns list params +func (o *IpamAsnsListParams) WithOffset(offset *int64) *IpamAsnsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam asns list params +func (o *IpamAsnsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the ipam asns list params +func (o *IpamAsnsListParams) WithQ(q *string) *IpamAsnsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the ipam asns list params +func (o *IpamAsnsListParams) SetQ(q *string) { + o.Q = q +} + +// WithRir adds the rir to the ipam asns list params +func (o *IpamAsnsListParams) WithRir(rir *string) *IpamAsnsListParams { + o.SetRir(rir) + return o +} + +// SetRir adds the rir to the ipam asns list params +func (o *IpamAsnsListParams) SetRir(rir *string) { + o.Rir = rir +} + +// WithRirn adds the rirn to the ipam asns list params +func (o *IpamAsnsListParams) WithRirn(rirn *string) *IpamAsnsListParams { + o.SetRirn(rirn) + return o +} + +// SetRirn adds the rirN to the ipam asns list params +func (o *IpamAsnsListParams) SetRirn(rirn *string) { + o.Rirn = rirn +} + +// WithRirID adds the rirID to the ipam asns list params +func (o *IpamAsnsListParams) WithRirID(rirID *string) *IpamAsnsListParams { + o.SetRirID(rirID) + return o +} + +// SetRirID adds the rirId to the ipam asns list params +func (o *IpamAsnsListParams) SetRirID(rirID *string) { + o.RirID = rirID +} + +// WithRirIDn adds the rirIDn to the ipam asns list params +func (o *IpamAsnsListParams) WithRirIDn(rirIDn *string) *IpamAsnsListParams { + o.SetRirIDn(rirIDn) + return o +} + +// SetRirIDn adds the rirIdN to the ipam asns list params +func (o *IpamAsnsListParams) SetRirIDn(rirIDn *string) { + o.RirIDn = rirIDn +} + +// WithSite adds the site to the ipam asns list params +func (o *IpamAsnsListParams) WithSite(site *string) *IpamAsnsListParams { + o.SetSite(site) + return o +} + +// SetSite adds the site to the ipam asns list params +func (o *IpamAsnsListParams) SetSite(site *string) { + o.Site = site +} + +// WithSiten adds the siten to the ipam asns list params +func (o *IpamAsnsListParams) WithSiten(siten *string) *IpamAsnsListParams { + o.SetSiten(siten) + return o +} + +// SetSiten adds the siteN to the ipam asns list params +func (o *IpamAsnsListParams) SetSiten(siten *string) { + o.Siten = siten +} + +// WithSiteID adds the siteID to the ipam asns list params +func (o *IpamAsnsListParams) WithSiteID(siteID *string) *IpamAsnsListParams { + o.SetSiteID(siteID) + return o +} + +// SetSiteID adds the siteId to the ipam asns list params +func (o *IpamAsnsListParams) SetSiteID(siteID *string) { + o.SiteID = siteID +} + +// WithSiteIDn adds the siteIDn to the ipam asns list params +func (o *IpamAsnsListParams) WithSiteIDn(siteIDn *string) *IpamAsnsListParams { + o.SetSiteIDn(siteIDn) + return o +} + +// SetSiteIDn adds the siteIdN to the ipam asns list params +func (o *IpamAsnsListParams) SetSiteIDn(siteIDn *string) { + o.SiteIDn = siteIDn +} + +// WithTag adds the tag to the ipam asns list params +func (o *IpamAsnsListParams) WithTag(tag *string) *IpamAsnsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam asns list params +func (o *IpamAsnsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam asns list params +func (o *IpamAsnsListParams) WithTagn(tagn *string) *IpamAsnsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam asns list params +func (o *IpamAsnsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithTenant adds the tenant to the ipam asns list params +func (o *IpamAsnsListParams) WithTenant(tenant *string) *IpamAsnsListParams { + o.SetTenant(tenant) + return o +} + +// SetTenant adds the tenant to the ipam asns list params +func (o *IpamAsnsListParams) SetTenant(tenant *string) { + o.Tenant = tenant +} + +// WithTenantn adds the tenantn to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantn(tenantn *string) *IpamAsnsListParams { + o.SetTenantn(tenantn) + return o +} + +// SetTenantn adds the tenantN to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantn(tenantn *string) { + o.Tenantn = tenantn +} + +// WithTenantGroup adds the tenantGroup to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantGroup(tenantGroup *string) *IpamAsnsListParams { + o.SetTenantGroup(tenantGroup) + return o +} + +// SetTenantGroup adds the tenantGroup to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantGroup(tenantGroup *string) { + o.TenantGroup = tenantGroup +} + +// WithTenantGroupn adds the tenantGroupn to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantGroupn(tenantGroupn *string) *IpamAsnsListParams { + o.SetTenantGroupn(tenantGroupn) + return o +} + +// SetTenantGroupn adds the tenantGroupN to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantGroupn(tenantGroupn *string) { + o.TenantGroupn = tenantGroupn +} + +// WithTenantGroupID adds the tenantGroupID to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantGroupID(tenantGroupID *string) *IpamAsnsListParams { + o.SetTenantGroupID(tenantGroupID) + return o +} + +// SetTenantGroupID adds the tenantGroupId to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantGroupID(tenantGroupID *string) { + o.TenantGroupID = tenantGroupID +} + +// WithTenantGroupIDn adds the tenantGroupIDn to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantGroupIDn(tenantGroupIDn *string) *IpamAsnsListParams { + o.SetTenantGroupIDn(tenantGroupIDn) + return o +} + +// SetTenantGroupIDn adds the tenantGroupIdN to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantGroupIDn(tenantGroupIDn *string) { + o.TenantGroupIDn = tenantGroupIDn +} + +// WithTenantID adds the tenantID to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantID(tenantID *string) *IpamAsnsListParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WithTenantIDn adds the tenantIDn to the ipam asns list params +func (o *IpamAsnsListParams) WithTenantIDn(tenantIDn *string) *IpamAsnsListParams { + o.SetTenantIDn(tenantIDn) + return o +} + +// SetTenantIDn adds the tenantIdN to the ipam asns list params +func (o *IpamAsnsListParams) SetTenantIDn(tenantIDn *string) { + o.TenantIDn = tenantIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Asn != nil { + + // query param asn + var qrAsn string + + if o.Asn != nil { + qrAsn = *o.Asn + } + qAsn := qrAsn + if qAsn != "" { + + if err := r.SetQueryParam("asn", qAsn); err != nil { + return err + } + } + } + + if o.AsnGt != nil { + + // query param asn__gt + var qrAsnGt string + + if o.AsnGt != nil { + qrAsnGt = *o.AsnGt + } + qAsnGt := qrAsnGt + if qAsnGt != "" { + + if err := r.SetQueryParam("asn__gt", qAsnGt); err != nil { + return err + } + } + } + + if o.AsnGte != nil { + + // query param asn__gte + var qrAsnGte string + + if o.AsnGte != nil { + qrAsnGte = *o.AsnGte + } + qAsnGte := qrAsnGte + if qAsnGte != "" { + + if err := r.SetQueryParam("asn__gte", qAsnGte); err != nil { + return err + } + } + } + + if o.AsnLt != nil { + + // query param asn__lt + var qrAsnLt string + + if o.AsnLt != nil { + qrAsnLt = *o.AsnLt + } + qAsnLt := qrAsnLt + if qAsnLt != "" { + + if err := r.SetQueryParam("asn__lt", qAsnLt); err != nil { + return err + } + } + } + + if o.AsnLte != nil { + + // query param asn__lte + var qrAsnLte string + + if o.AsnLte != nil { + qrAsnLte = *o.AsnLte + } + qAsnLte := qrAsnLte + if qAsnLte != "" { + + if err := r.SetQueryParam("asn__lte", qAsnLte); err != nil { + return err + } + } + } + + if o.Asnn != nil { + + // query param asn__n + var qrAsnn string + + if o.Asnn != nil { + qrAsnn = *o.Asnn + } + qAsnn := qrAsnn + if qAsnn != "" { + + if err := r.SetQueryParam("asn__n", qAsnn); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Rir != nil { + + // query param rir + var qrRir string + + if o.Rir != nil { + qrRir = *o.Rir + } + qRir := qrRir + if qRir != "" { + + if err := r.SetQueryParam("rir", qRir); err != nil { + return err + } + } + } + + if o.Rirn != nil { + + // query param rir__n + var qrRirn string + + if o.Rirn != nil { + qrRirn = *o.Rirn + } + qRirn := qrRirn + if qRirn != "" { + + if err := r.SetQueryParam("rir__n", qRirn); err != nil { + return err + } + } + } + + if o.RirID != nil { + + // query param rir_id + var qrRirID string + + if o.RirID != nil { + qrRirID = *o.RirID + } + qRirID := qrRirID + if qRirID != "" { + + if err := r.SetQueryParam("rir_id", qRirID); err != nil { + return err + } + } + } + + if o.RirIDn != nil { + + // query param rir_id__n + var qrRirIDn string + + if o.RirIDn != nil { + qrRirIDn = *o.RirIDn + } + qRirIDn := qrRirIDn + if qRirIDn != "" { + + if err := r.SetQueryParam("rir_id__n", qRirIDn); err != nil { + return err + } + } + } + + if o.Site != nil { + + // query param site + var qrSite string + + if o.Site != nil { + qrSite = *o.Site + } + qSite := qrSite + if qSite != "" { + + if err := r.SetQueryParam("site", qSite); err != nil { + return err + } + } + } + + if o.Siten != nil { + + // query param site__n + var qrSiten string + + if o.Siten != nil { + qrSiten = *o.Siten + } + qSiten := qrSiten + if qSiten != "" { + + if err := r.SetQueryParam("site__n", qSiten); err != nil { + return err + } + } + } + + if o.SiteID != nil { + + // query param site_id + var qrSiteID string + + if o.SiteID != nil { + qrSiteID = *o.SiteID + } + qSiteID := qrSiteID + if qSiteID != "" { + + if err := r.SetQueryParam("site_id", qSiteID); err != nil { + return err + } + } + } + + if o.SiteIDn != nil { + + // query param site_id__n + var qrSiteIDn string + + if o.SiteIDn != nil { + qrSiteIDn = *o.SiteIDn + } + qSiteIDn := qrSiteIDn + if qSiteIDn != "" { + + if err := r.SetQueryParam("site_id__n", qSiteIDn); err != nil { + return err + } + } + } + + 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 + var qrTenant string + + if o.Tenant != nil { + qrTenant = *o.Tenant + } + qTenant := qrTenant + if qTenant != "" { + + if err := r.SetQueryParam("tenant", qTenant); err != nil { + return err + } + } + } + + if o.Tenantn != nil { + + // query param tenant__n + var qrTenantn string + + if o.Tenantn != nil { + qrTenantn = *o.Tenantn + } + qTenantn := qrTenantn + if qTenantn != "" { + + if err := r.SetQueryParam("tenant__n", qTenantn); err != nil { + return err + } + } + } + + if o.TenantGroup != nil { + + // query param tenant_group + var qrTenantGroup string + + if o.TenantGroup != nil { + qrTenantGroup = *o.TenantGroup + } + qTenantGroup := qrTenantGroup + if qTenantGroup != "" { + + if err := r.SetQueryParam("tenant_group", qTenantGroup); err != nil { + return err + } + } + } + + if o.TenantGroupn != nil { + + // query param tenant_group__n + var qrTenantGroupn string + + if o.TenantGroupn != nil { + qrTenantGroupn = *o.TenantGroupn + } + qTenantGroupn := qrTenantGroupn + if qTenantGroupn != "" { + + if err := r.SetQueryParam("tenant_group__n", qTenantGroupn); err != nil { + return err + } + } + } + + if o.TenantGroupID != nil { + + // query param tenant_group_id + var qrTenantGroupID string + + if o.TenantGroupID != nil { + qrTenantGroupID = *o.TenantGroupID + } + qTenantGroupID := qrTenantGroupID + if qTenantGroupID != "" { + + if err := r.SetQueryParam("tenant_group_id", qTenantGroupID); err != nil { + return err + } + } + } + + if o.TenantGroupIDn != nil { + + // query param tenant_group_id__n + var qrTenantGroupIDn string + + if o.TenantGroupIDn != nil { + qrTenantGroupIDn = *o.TenantGroupIDn + } + qTenantGroupIDn := qrTenantGroupIDn + if qTenantGroupIDn != "" { + + if err := r.SetQueryParam("tenant_group_id__n", qTenantGroupIDn); err != nil { + return err + } + } + } + + if o.TenantID != nil { + + // query param tenant_id + var qrTenantID string + + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + + if err := r.SetQueryParam("tenant_id", qTenantID); err != nil { + return err + } + } + } + + if o.TenantIDn != nil { + + // query param tenant_id__n + var qrTenantIDn string + + if o.TenantIDn != nil { + qrTenantIDn = *o.TenantIDn + } + qTenantIDn := qrTenantIDn + if qTenantIDn != "" { + + if err := r.SetQueryParam("tenant_id__n", qTenantIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_asns_list_responses.go b/netbox/client/ipam/ipam_asns_list_responses.go new file mode 100644 index 000000000..9a5cbe871 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_list_responses.go @@ -0,0 +1,247 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsListReader is a Reader for the IpamAsnsList structure. +type IpamAsnsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamAsnsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsListOK creates a IpamAsnsListOK with default headers values +func NewIpamAsnsListOK() *IpamAsnsListOK { + return &IpamAsnsListOK{} +} + +/* IpamAsnsListOK describes a response with status code 200, with default header values. + +IpamAsnsListOK ipam asns list o k +*/ +type IpamAsnsListOK struct { + Payload *IpamAsnsListOKBody +} + +func (o *IpamAsnsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/asns/][%d] ipamAsnsListOK %+v", 200, o.Payload) +} +func (o *IpamAsnsListOK) GetPayload() *IpamAsnsListOKBody { + return o.Payload +} + +func (o *IpamAsnsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(IpamAsnsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*IpamAsnsListOKBody ipam asns list o k body +swagger:model IpamAsnsListOKBody +*/ +type IpamAsnsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ASN `json:"results"` +} + +// Validate validates this ipam asns list o k body +func (o *IpamAsnsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamAsnsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("ipamAsnsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *IpamAsnsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("ipamAsnsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamAsnsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("ipamAsnsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamAsnsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("ipamAsnsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamAsnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamAsnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this ipam asns list o k body based on the context it is used +func (o *IpamAsnsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamAsnsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamAsnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamAsnsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *IpamAsnsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *IpamAsnsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamAsnsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/ipam/ipam_asns_partial_update_parameters.go b/netbox/client/ipam/ipam_asns_partial_update_parameters.go new file mode 100644 index 000000000..9a25293b9 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamAsnsPartialUpdateParams creates a new IpamAsnsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsPartialUpdateParams() *IpamAsnsPartialUpdateParams { + return &IpamAsnsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsPartialUpdateParamsWithTimeout creates a new IpamAsnsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamAsnsPartialUpdateParams { + return &IpamAsnsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamAsnsPartialUpdateParamsWithContext creates a new IpamAsnsPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamAsnsPartialUpdateParamsWithContext(ctx context.Context) *IpamAsnsPartialUpdateParams { + return &IpamAsnsPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamAsnsPartialUpdateParamsWithHTTPClient creates a new IpamAsnsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamAsnsPartialUpdateParams { + return &IpamAsnsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamAsnsPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam asns partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsPartialUpdateParams struct { + + // Data. + Data *models.WritableASN + + /* ID. + + A unique integer value identifying this ASN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsPartialUpdateParams) WithDefaults() *IpamAsnsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamAsnsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) WithContext(ctx context.Context) *IpamAsnsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamAsnsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) WithData(data *models.WritableASN) *IpamAsnsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) SetData(data *models.WritableASN) { + o.Data = data +} + +// WithID adds the id to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) WithID(id int64) *IpamAsnsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam asns partial update params +func (o *IpamAsnsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_asns_partial_update_responses.go b/netbox/client/ipam/ipam_asns_partial_update_responses.go new file mode 100644 index 000000000..fb1427aca --- /dev/null +++ b/netbox/client/ipam/ipam_asns_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsPartialUpdateReader is a Reader for the IpamAsnsPartialUpdate structure. +type IpamAsnsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamAsnsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsPartialUpdateOK creates a IpamAsnsPartialUpdateOK with default headers values +func NewIpamAsnsPartialUpdateOK() *IpamAsnsPartialUpdateOK { + return &IpamAsnsPartialUpdateOK{} +} + +/* IpamAsnsPartialUpdateOK describes a response with status code 200, with default header values. + +IpamAsnsPartialUpdateOK ipam asns partial update o k +*/ +type IpamAsnsPartialUpdateOK struct { + Payload *models.ASN +} + +func (o *IpamAsnsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/asns/{id}/][%d] ipamAsnsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamAsnsPartialUpdateOK) GetPayload() *models.ASN { + return o.Payload +} + +func (o *IpamAsnsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ASN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_read_parameters.go b/netbox/client/ipam/ipam_asns_read_parameters.go new file mode 100644 index 000000000..3b87f111d --- /dev/null +++ b/netbox/client/ipam/ipam_asns_read_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamAsnsReadParams creates a new IpamAsnsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsReadParams() *IpamAsnsReadParams { + return &IpamAsnsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsReadParamsWithTimeout creates a new IpamAsnsReadParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsReadParamsWithTimeout(timeout time.Duration) *IpamAsnsReadParams { + return &IpamAsnsReadParams{ + timeout: timeout, + } +} + +// NewIpamAsnsReadParamsWithContext creates a new IpamAsnsReadParams object +// with the ability to set a context for a request. +func NewIpamAsnsReadParamsWithContext(ctx context.Context) *IpamAsnsReadParams { + return &IpamAsnsReadParams{ + Context: ctx, + } +} + +// NewIpamAsnsReadParamsWithHTTPClient creates a new IpamAsnsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsReadParamsWithHTTPClient(client *http.Client) *IpamAsnsReadParams { + return &IpamAsnsReadParams{ + HTTPClient: client, + } +} + +/* IpamAsnsReadParams contains all the parameters to send to the API endpoint + for the ipam asns read operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsReadParams struct { + + /* ID. + + A unique integer value identifying this ASN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsReadParams) WithDefaults() *IpamAsnsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns read params +func (o *IpamAsnsReadParams) WithTimeout(timeout time.Duration) *IpamAsnsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns read params +func (o *IpamAsnsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns read params +func (o *IpamAsnsReadParams) WithContext(ctx context.Context) *IpamAsnsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns read params +func (o *IpamAsnsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns read params +func (o *IpamAsnsReadParams) WithHTTPClient(client *http.Client) *IpamAsnsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns read params +func (o *IpamAsnsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam asns read params +func (o *IpamAsnsReadParams) WithID(id int64) *IpamAsnsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam asns read params +func (o *IpamAsnsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsReadParams) 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/netbox/client/ipam/ipam_asns_read_responses.go b/netbox/client/ipam/ipam_asns_read_responses.go new file mode 100644 index 000000000..925cf4a80 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_read_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsReadReader is a Reader for the IpamAsnsRead structure. +type IpamAsnsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamAsnsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsReadOK creates a IpamAsnsReadOK with default headers values +func NewIpamAsnsReadOK() *IpamAsnsReadOK { + return &IpamAsnsReadOK{} +} + +/* IpamAsnsReadOK describes a response with status code 200, with default header values. + +IpamAsnsReadOK ipam asns read o k +*/ +type IpamAsnsReadOK struct { + Payload *models.ASN +} + +func (o *IpamAsnsReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/asns/{id}/][%d] ipamAsnsReadOK %+v", 200, o.Payload) +} +func (o *IpamAsnsReadOK) GetPayload() *models.ASN { + return o.Payload +} + +func (o *IpamAsnsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ASN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_asns_update_parameters.go b/netbox/client/ipam/ipam_asns_update_parameters.go new file mode 100644 index 000000000..a9aa4b42c --- /dev/null +++ b/netbox/client/ipam/ipam_asns_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamAsnsUpdateParams creates a new IpamAsnsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamAsnsUpdateParams() *IpamAsnsUpdateParams { + return &IpamAsnsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamAsnsUpdateParamsWithTimeout creates a new IpamAsnsUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamAsnsUpdateParamsWithTimeout(timeout time.Duration) *IpamAsnsUpdateParams { + return &IpamAsnsUpdateParams{ + timeout: timeout, + } +} + +// NewIpamAsnsUpdateParamsWithContext creates a new IpamAsnsUpdateParams object +// with the ability to set a context for a request. +func NewIpamAsnsUpdateParamsWithContext(ctx context.Context) *IpamAsnsUpdateParams { + return &IpamAsnsUpdateParams{ + Context: ctx, + } +} + +// NewIpamAsnsUpdateParamsWithHTTPClient creates a new IpamAsnsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamAsnsUpdateParamsWithHTTPClient(client *http.Client) *IpamAsnsUpdateParams { + return &IpamAsnsUpdateParams{ + HTTPClient: client, + } +} + +/* IpamAsnsUpdateParams contains all the parameters to send to the API endpoint + for the ipam asns update operation. + + Typically these are written to a http.Request. +*/ +type IpamAsnsUpdateParams struct { + + // Data. + Data *models.WritableASN + + /* ID. + + A unique integer value identifying this ASN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam asns update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsUpdateParams) WithDefaults() *IpamAsnsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam asns update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamAsnsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam asns update params +func (o *IpamAsnsUpdateParams) WithTimeout(timeout time.Duration) *IpamAsnsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam asns update params +func (o *IpamAsnsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam asns update params +func (o *IpamAsnsUpdateParams) WithContext(ctx context.Context) *IpamAsnsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam asns update params +func (o *IpamAsnsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam asns update params +func (o *IpamAsnsUpdateParams) WithHTTPClient(client *http.Client) *IpamAsnsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam asns update params +func (o *IpamAsnsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam asns update params +func (o *IpamAsnsUpdateParams) WithData(data *models.WritableASN) *IpamAsnsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam asns update params +func (o *IpamAsnsUpdateParams) SetData(data *models.WritableASN) { + o.Data = data +} + +// WithID adds the id to the ipam asns update params +func (o *IpamAsnsUpdateParams) WithID(id int64) *IpamAsnsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam asns update params +func (o *IpamAsnsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamAsnsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_asns_update_responses.go b/netbox/client/ipam/ipam_asns_update_responses.go new file mode 100644 index 000000000..34fbef2a7 --- /dev/null +++ b/netbox/client/ipam/ipam_asns_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamAsnsUpdateReader is a Reader for the IpamAsnsUpdate structure. +type IpamAsnsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamAsnsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamAsnsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamAsnsUpdateOK creates a IpamAsnsUpdateOK with default headers values +func NewIpamAsnsUpdateOK() *IpamAsnsUpdateOK { + return &IpamAsnsUpdateOK{} +} + +/* IpamAsnsUpdateOK describes a response with status code 200, with default header values. + +IpamAsnsUpdateOK ipam asns update o k +*/ +type IpamAsnsUpdateOK struct { + Payload *models.ASN +} + +func (o *IpamAsnsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/asns/{id}/][%d] ipamAsnsUpdateOK %+v", 200, o.Payload) +} +func (o *IpamAsnsUpdateOK) GetPayload() *models.ASN { + return o.Payload +} + +func (o *IpamAsnsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ASN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_client.go b/netbox/client/ipam/ipam_client.go index 3faa1e04d..f5e08b905 100644 --- a/netbox/client/ipam/ipam_client.go +++ b/netbox/client/ipam/ipam_client.go @@ -63,6 +63,60 @@ type ClientService interface { IpamAggregatesUpdate(params *IpamAggregatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAggregatesUpdateOK, error) + IpamAsnsBulkDelete(params *IpamAsnsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsBulkDeleteNoContent, error) + + IpamAsnsBulkPartialUpdate(params *IpamAsnsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsBulkPartialUpdateOK, error) + + IpamAsnsBulkUpdate(params *IpamAsnsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsBulkUpdateOK, error) + + IpamAsnsCreate(params *IpamAsnsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsCreateCreated, error) + + IpamAsnsDelete(params *IpamAsnsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsDeleteNoContent, error) + + IpamAsnsList(params *IpamAsnsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsListOK, error) + + IpamAsnsPartialUpdate(params *IpamAsnsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsPartialUpdateOK, error) + + IpamAsnsRead(params *IpamAsnsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsReadOK, error) + + IpamAsnsUpdate(params *IpamAsnsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsUpdateOK, error) + + IpamFhrpGroupAssignmentsBulkDelete(params *IpamFhrpGroupAssignmentsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsBulkDeleteNoContent, error) + + IpamFhrpGroupAssignmentsBulkPartialUpdate(params *IpamFhrpGroupAssignmentsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsBulkPartialUpdateOK, error) + + IpamFhrpGroupAssignmentsBulkUpdate(params *IpamFhrpGroupAssignmentsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsBulkUpdateOK, error) + + IpamFhrpGroupAssignmentsCreate(params *IpamFhrpGroupAssignmentsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsCreateCreated, error) + + IpamFhrpGroupAssignmentsDelete(params *IpamFhrpGroupAssignmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsDeleteNoContent, error) + + IpamFhrpGroupAssignmentsList(params *IpamFhrpGroupAssignmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsListOK, error) + + IpamFhrpGroupAssignmentsPartialUpdate(params *IpamFhrpGroupAssignmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsPartialUpdateOK, error) + + IpamFhrpGroupAssignmentsRead(params *IpamFhrpGroupAssignmentsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsReadOK, error) + + IpamFhrpGroupAssignmentsUpdate(params *IpamFhrpGroupAssignmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsUpdateOK, error) + + IpamFhrpGroupsBulkDelete(params *IpamFhrpGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsBulkDeleteNoContent, error) + + IpamFhrpGroupsBulkPartialUpdate(params *IpamFhrpGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsBulkPartialUpdateOK, error) + + IpamFhrpGroupsBulkUpdate(params *IpamFhrpGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsBulkUpdateOK, error) + + IpamFhrpGroupsCreate(params *IpamFhrpGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsCreateCreated, error) + + IpamFhrpGroupsDelete(params *IpamFhrpGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsDeleteNoContent, error) + + IpamFhrpGroupsList(params *IpamFhrpGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsListOK, error) + + IpamFhrpGroupsPartialUpdate(params *IpamFhrpGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsPartialUpdateOK, error) + + IpamFhrpGroupsRead(params *IpamFhrpGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsReadOK, error) + + IpamFhrpGroupsUpdate(params *IpamFhrpGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsUpdateOK, error) + IpamIPAddressesBulkDelete(params *IpamIPAddressesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkDeleteNoContent, error) IpamIPAddressesBulkPartialUpdate(params *IpamIPAddressesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkPartialUpdateOK, error) @@ -83,7 +137,7 @@ type ClientService interface { IpamIPRangesAvailableIpsCreate(params *IpamIPRangesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsCreateCreated, error) - IpamIPRangesAvailableIpsRead(params *IpamIPRangesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsReadOK, error) + IpamIPRangesAvailableIpsList(params *IpamIPRangesAvailableIpsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsListOK, error) IpamIPRangesBulkDelete(params *IpamIPRangesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkDeleteNoContent, error) @@ -105,11 +159,11 @@ type ClientService interface { IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsCreateCreated, error) - IpamPrefixesAvailableIpsRead(params *IpamPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsReadOK, error) + IpamPrefixesAvailableIpsList(params *IpamPrefixesAvailableIpsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsListOK, error) IpamPrefixesAvailablePrefixesCreate(params *IpamPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesCreateCreated, error) - IpamPrefixesAvailablePrefixesRead(params *IpamPrefixesAvailablePrefixesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesReadOK, error) + IpamPrefixesAvailablePrefixesList(params *IpamPrefixesAvailablePrefixesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesListOK, error) IpamPrefixesBulkDelete(params *IpamPrefixesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkDeleteNoContent, error) @@ -183,6 +237,24 @@ type ClientService interface { IpamRouteTargetsUpdate(params *IpamRouteTargetsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsUpdateOK, error) + IpamServiceTemplatesBulkDelete(params *IpamServiceTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesBulkDeleteNoContent, error) + + IpamServiceTemplatesBulkPartialUpdate(params *IpamServiceTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesBulkPartialUpdateOK, error) + + IpamServiceTemplatesBulkUpdate(params *IpamServiceTemplatesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesBulkUpdateOK, error) + + IpamServiceTemplatesCreate(params *IpamServiceTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesCreateCreated, error) + + IpamServiceTemplatesDelete(params *IpamServiceTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesDeleteNoContent, error) + + IpamServiceTemplatesList(params *IpamServiceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesListOK, error) + + IpamServiceTemplatesPartialUpdate(params *IpamServiceTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesPartialUpdateOK, error) + + IpamServiceTemplatesRead(params *IpamServiceTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesReadOK, error) + + IpamServiceTemplatesUpdate(params *IpamServiceTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesUpdateOK, error) + IpamServicesBulkDelete(params *IpamServicesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServicesBulkDeleteNoContent, error) IpamServicesBulkPartialUpdate(params *IpamServicesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServicesBulkPartialUpdateOK, error) @@ -201,6 +273,10 @@ type ClientService interface { IpamServicesUpdate(params *IpamServicesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServicesUpdateOK, error) + IpamVlanGroupsAvailableVlansCreate(params *IpamVlanGroupsAvailableVlansCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsAvailableVlansCreateCreated, error) + + IpamVlanGroupsAvailableVlansList(params *IpamVlanGroupsAvailableVlansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsAvailableVlansListOK, error) + IpamVlanGroupsBulkDelete(params *IpamVlanGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsBulkDeleteNoContent, error) IpamVlanGroupsBulkPartialUpdate(params *IpamVlanGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsBulkPartialUpdateOK, error) @@ -272,7 +348,7 @@ func (a *Client) IpamAggregatesBulkDelete(params *IpamAggregatesBulkDeleteParams PathPattern: "/ipam/aggregates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -311,7 +387,7 @@ func (a *Client) IpamAggregatesBulkPartialUpdate(params *IpamAggregatesBulkParti PathPattern: "/ipam/aggregates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -350,7 +426,7 @@ func (a *Client) IpamAggregatesBulkUpdate(params *IpamAggregatesBulkUpdateParams PathPattern: "/ipam/aggregates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -389,7 +465,7 @@ func (a *Client) IpamAggregatesCreate(params *IpamAggregatesCreateParams, authIn PathPattern: "/ipam/aggregates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -428,7 +504,7 @@ func (a *Client) IpamAggregatesDelete(params *IpamAggregatesDeleteParams, authIn PathPattern: "/ipam/aggregates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -467,7 +543,7 @@ func (a *Client) IpamAggregatesList(params *IpamAggregatesListParams, authInfo r PathPattern: "/ipam/aggregates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -506,7 +582,7 @@ func (a *Client) IpamAggregatesPartialUpdate(params *IpamAggregatesPartialUpdate PathPattern: "/ipam/aggregates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -545,7 +621,7 @@ func (a *Client) IpamAggregatesRead(params *IpamAggregatesReadParams, authInfo r PathPattern: "/ipam/aggregates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -584,7 +660,7 @@ func (a *Client) IpamAggregatesUpdate(params *IpamAggregatesUpdateParams, authIn PathPattern: "/ipam/aggregates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamAggregatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -610,22 +686,22 @@ func (a *Client) IpamAggregatesUpdate(params *IpamAggregatesUpdateParams, authIn } /* - IpamIPAddressesBulkDelete ipam ip addresses bulk delete API + IpamAsnsBulkDelete ipam asns bulk delete API */ -func (a *Client) IpamIPAddressesBulkDelete(params *IpamIPAddressesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkDeleteNoContent, error) { +func (a *Client) IpamAsnsBulkDelete(params *IpamAsnsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesBulkDeleteParams() + params = NewIpamAsnsBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_bulk_delete", + ID: "ipam_asns_bulk_delete", Method: "DELETE", - PathPattern: "/ipam/ip-addresses/", + PathPattern: "/ipam/asns/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesBulkDeleteReader{formats: a.formats}, + Reader: &IpamAsnsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -638,33 +714,33 @@ func (a *Client) IpamIPAddressesBulkDelete(params *IpamIPAddressesBulkDeletePara if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesBulkDeleteNoContent) + success, ok := result.(*IpamAsnsBulkDeleteNoContent) 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 ipam_ip-addresses_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesBulkPartialUpdate ipam ip addresses bulk partial update API + IpamAsnsBulkPartialUpdate ipam asns bulk partial update API */ -func (a *Client) IpamIPAddressesBulkPartialUpdate(params *IpamIPAddressesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkPartialUpdateOK, error) { +func (a *Client) IpamAsnsBulkPartialUpdate(params *IpamAsnsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesBulkPartialUpdateParams() + params = NewIpamAsnsBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_bulk_partial_update", + ID: "ipam_asns_bulk_partial_update", Method: "PATCH", - PathPattern: "/ipam/ip-addresses/", + PathPattern: "/ipam/asns/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesBulkPartialUpdateReader{formats: a.formats}, + Reader: &IpamAsnsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -677,33 +753,33 @@ func (a *Client) IpamIPAddressesBulkPartialUpdate(params *IpamIPAddressesBulkPar if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesBulkPartialUpdateOK) + success, ok := result.(*IpamAsnsBulkPartialUpdateOK) 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 ipam_ip-addresses_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesBulkUpdate ipam ip addresses bulk update API + IpamAsnsBulkUpdate ipam asns bulk update API */ -func (a *Client) IpamIPAddressesBulkUpdate(params *IpamIPAddressesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkUpdateOK, error) { +func (a *Client) IpamAsnsBulkUpdate(params *IpamAsnsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesBulkUpdateParams() + params = NewIpamAsnsBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_bulk_update", + ID: "ipam_asns_bulk_update", Method: "PUT", - PathPattern: "/ipam/ip-addresses/", + PathPattern: "/ipam/asns/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesBulkUpdateReader{formats: a.formats}, + Reader: &IpamAsnsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -716,33 +792,33 @@ func (a *Client) IpamIPAddressesBulkUpdate(params *IpamIPAddressesBulkUpdatePara if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesBulkUpdateOK) + success, ok := result.(*IpamAsnsBulkUpdateOK) 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 ipam_ip-addresses_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesCreate ipam ip addresses create API + IpamAsnsCreate ipam asns create API */ -func (a *Client) IpamIPAddressesCreate(params *IpamIPAddressesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesCreateCreated, error) { +func (a *Client) IpamAsnsCreate(params *IpamAsnsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesCreateParams() + params = NewIpamAsnsCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_create", + ID: "ipam_asns_create", Method: "POST", - PathPattern: "/ipam/ip-addresses/", + PathPattern: "/ipam/asns/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesCreateReader{formats: a.formats}, + Reader: &IpamAsnsCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -755,33 +831,33 @@ func (a *Client) IpamIPAddressesCreate(params *IpamIPAddressesCreateParams, auth if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesCreateCreated) + success, ok := result.(*IpamAsnsCreateCreated) 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 ipam_ip-addresses_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesDelete ipam ip addresses delete API + IpamAsnsDelete ipam asns delete API */ -func (a *Client) IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesDeleteNoContent, error) { +func (a *Client) IpamAsnsDelete(params *IpamAsnsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesDeleteParams() + params = NewIpamAsnsDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_delete", + ID: "ipam_asns_delete", Method: "DELETE", - PathPattern: "/ipam/ip-addresses/{id}/", + PathPattern: "/ipam/asns/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesDeleteReader{formats: a.formats}, + Reader: &IpamAsnsDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -794,33 +870,33 @@ func (a *Client) IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, auth if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesDeleteNoContent) + success, ok := result.(*IpamAsnsDeleteNoContent) 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 ipam_ip-addresses_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesList Overrides ListModelMixin to allow processing ExportTemplates. + IpamAsnsList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesListOK, error) { +func (a *Client) IpamAsnsList(params *IpamAsnsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesListParams() + params = NewIpamAsnsListParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_list", + ID: "ipam_asns_list", Method: "GET", - PathPattern: "/ipam/ip-addresses/", + PathPattern: "/ipam/asns/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesListReader{formats: a.formats}, + Reader: &IpamAsnsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -833,33 +909,33 @@ func (a *Client) IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesListOK) + success, ok := result.(*IpamAsnsListOK) 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 ipam_ip-addresses_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesPartialUpdate ipam ip addresses partial update API + IpamAsnsPartialUpdate ipam asns partial update API */ -func (a *Client) IpamIPAddressesPartialUpdate(params *IpamIPAddressesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesPartialUpdateOK, error) { +func (a *Client) IpamAsnsPartialUpdate(params *IpamAsnsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesPartialUpdateParams() + params = NewIpamAsnsPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_partial_update", + ID: "ipam_asns_partial_update", Method: "PATCH", - PathPattern: "/ipam/ip-addresses/{id}/", + PathPattern: "/ipam/asns/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesPartialUpdateReader{formats: a.formats}, + Reader: &IpamAsnsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -872,33 +948,33 @@ func (a *Client) IpamIPAddressesPartialUpdate(params *IpamIPAddressesPartialUpda if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesPartialUpdateOK) + success, ok := result.(*IpamAsnsPartialUpdateOK) 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 ipam_ip-addresses_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesRead ipam ip addresses read API + IpamAsnsRead ipam asns read API */ -func (a *Client) IpamIPAddressesRead(params *IpamIPAddressesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesReadOK, error) { +func (a *Client) IpamAsnsRead(params *IpamAsnsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesReadParams() + params = NewIpamAsnsReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_read", + ID: "ipam_asns_read", Method: "GET", - PathPattern: "/ipam/ip-addresses/{id}/", + PathPattern: "/ipam/asns/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesReadReader{formats: a.formats}, + Reader: &IpamAsnsReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -911,33 +987,33 @@ func (a *Client) IpamIPAddressesRead(params *IpamIPAddressesReadParams, authInfo if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesReadOK) + success, ok := result.(*IpamAsnsReadOK) 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 ipam_ip-addresses_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPAddressesUpdate ipam ip addresses update API + IpamAsnsUpdate ipam asns update API */ -func (a *Client) IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesUpdateOK, error) { +func (a *Client) IpamAsnsUpdate(params *IpamAsnsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamAsnsUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPAddressesUpdateParams() + params = NewIpamAsnsUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-addresses_update", + ID: "ipam_asns_update", Method: "PUT", - PathPattern: "/ipam/ip-addresses/{id}/", + PathPattern: "/ipam/asns/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPAddressesUpdateReader{formats: a.formats}, + Reader: &IpamAsnsUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -950,38 +1026,33 @@ func (a *Client) IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, auth if err != nil { return nil, err } - success, ok := result.(*IpamIPAddressesUpdateOK) + success, ok := result.(*IpamAsnsUpdateOK) 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 ipam_ip-addresses_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_asns_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesAvailableIpsCreate A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of -IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be -passed, however results will not be paginated. - -The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being -invoked in parallel, which results in a race condition where multiple insertions can occur. + IpamFhrpGroupAssignmentsBulkDelete ipam fhrp group assignments bulk delete API */ -func (a *Client) IpamIPRangesAvailableIpsCreate(params *IpamIPRangesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsCreateCreated, error) { +func (a *Client) IpamFhrpGroupAssignmentsBulkDelete(params *IpamFhrpGroupAssignmentsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesAvailableIpsCreateParams() + params = NewIpamFhrpGroupAssignmentsBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_available-ips_create", - Method: "POST", - PathPattern: "/ipam/ip-ranges/{id}/available-ips/", + ID: "ipam_fhrp-group-assignments_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/fhrp-group-assignments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesAvailableIpsCreateReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -994,38 +1065,33 @@ func (a *Client) IpamIPRangesAvailableIpsCreate(params *IpamIPRangesAvailableIps if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesAvailableIpsCreateCreated) + success, ok := result.(*IpamFhrpGroupAssignmentsBulkDeleteNoContent) 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 ipam_ip-ranges_available-ips_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesAvailableIpsRead A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of -IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be -passed, however results will not be paginated. - -The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being -invoked in parallel, which results in a race condition where multiple insertions can occur. + IpamFhrpGroupAssignmentsBulkPartialUpdate ipam fhrp group assignments bulk partial update API */ -func (a *Client) IpamIPRangesAvailableIpsRead(params *IpamIPRangesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsReadOK, error) { +func (a *Client) IpamFhrpGroupAssignmentsBulkPartialUpdate(params *IpamFhrpGroupAssignmentsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesAvailableIpsReadParams() + params = NewIpamFhrpGroupAssignmentsBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_available-ips_read", - Method: "GET", - PathPattern: "/ipam/ip-ranges/{id}/available-ips/", + ID: "ipam_fhrp-group-assignments_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/fhrp-group-assignments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesAvailableIpsReadReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1038,33 +1104,33 @@ func (a *Client) IpamIPRangesAvailableIpsRead(params *IpamIPRangesAvailableIpsRe if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesAvailableIpsReadOK) + success, ok := result.(*IpamFhrpGroupAssignmentsBulkPartialUpdateOK) 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 ipam_ip-ranges_available-ips_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesBulkDelete ipam ip ranges bulk delete API + IpamFhrpGroupAssignmentsBulkUpdate ipam fhrp group assignments bulk update API */ -func (a *Client) IpamIPRangesBulkDelete(params *IpamIPRangesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkDeleteNoContent, error) { +func (a *Client) IpamFhrpGroupAssignmentsBulkUpdate(params *IpamFhrpGroupAssignmentsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesBulkDeleteParams() + params = NewIpamFhrpGroupAssignmentsBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_bulk_delete", - Method: "DELETE", - PathPattern: "/ipam/ip-ranges/", + ID: "ipam_fhrp-group-assignments_bulk_update", + Method: "PUT", + PathPattern: "/ipam/fhrp-group-assignments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesBulkDeleteReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1077,33 +1143,33 @@ func (a *Client) IpamIPRangesBulkDelete(params *IpamIPRangesBulkDeleteParams, au if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesBulkDeleteNoContent) + success, ok := result.(*IpamFhrpGroupAssignmentsBulkUpdateOK) 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 ipam_ip-ranges_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesBulkPartialUpdate ipam ip ranges bulk partial update API + IpamFhrpGroupAssignmentsCreate ipam fhrp group assignments create API */ -func (a *Client) IpamIPRangesBulkPartialUpdate(params *IpamIPRangesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkPartialUpdateOK, error) { +func (a *Client) IpamFhrpGroupAssignmentsCreate(params *IpamFhrpGroupAssignmentsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesBulkPartialUpdateParams() + params = NewIpamFhrpGroupAssignmentsCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_bulk_partial_update", - Method: "PATCH", - PathPattern: "/ipam/ip-ranges/", + ID: "ipam_fhrp-group-assignments_create", + Method: "POST", + PathPattern: "/ipam/fhrp-group-assignments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesBulkPartialUpdateReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1116,33 +1182,33 @@ func (a *Client) IpamIPRangesBulkPartialUpdate(params *IpamIPRangesBulkPartialUp if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesBulkPartialUpdateOK) + success, ok := result.(*IpamFhrpGroupAssignmentsCreateCreated) 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 ipam_ip-ranges_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesBulkUpdate ipam ip ranges bulk update API + IpamFhrpGroupAssignmentsDelete ipam fhrp group assignments delete API */ -func (a *Client) IpamIPRangesBulkUpdate(params *IpamIPRangesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkUpdateOK, error) { +func (a *Client) IpamFhrpGroupAssignmentsDelete(params *IpamFhrpGroupAssignmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesBulkUpdateParams() + params = NewIpamFhrpGroupAssignmentsDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_bulk_update", - Method: "PUT", - PathPattern: "/ipam/ip-ranges/", + ID: "ipam_fhrp-group-assignments_delete", + Method: "DELETE", + PathPattern: "/ipam/fhrp-group-assignments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesBulkUpdateReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1155,33 +1221,33 @@ func (a *Client) IpamIPRangesBulkUpdate(params *IpamIPRangesBulkUpdateParams, au if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesBulkUpdateOK) + success, ok := result.(*IpamFhrpGroupAssignmentsDeleteNoContent) 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 ipam_ip-ranges_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesCreate ipam ip ranges create API + IpamFhrpGroupAssignmentsList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamIPRangesCreate(params *IpamIPRangesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesCreateCreated, error) { +func (a *Client) IpamFhrpGroupAssignmentsList(params *IpamFhrpGroupAssignmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesCreateParams() + params = NewIpamFhrpGroupAssignmentsListParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_create", - Method: "POST", - PathPattern: "/ipam/ip-ranges/", + ID: "ipam_fhrp-group-assignments_list", + Method: "GET", + PathPattern: "/ipam/fhrp-group-assignments/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesCreateReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1194,33 +1260,33 @@ func (a *Client) IpamIPRangesCreate(params *IpamIPRangesCreateParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesCreateCreated) + success, ok := result.(*IpamFhrpGroupAssignmentsListOK) 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 ipam_ip-ranges_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesDelete ipam ip ranges delete API + IpamFhrpGroupAssignmentsPartialUpdate ipam fhrp group assignments partial update API */ -func (a *Client) IpamIPRangesDelete(params *IpamIPRangesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesDeleteNoContent, error) { +func (a *Client) IpamFhrpGroupAssignmentsPartialUpdate(params *IpamFhrpGroupAssignmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesDeleteParams() + params = NewIpamFhrpGroupAssignmentsPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_delete", - Method: "DELETE", - PathPattern: "/ipam/ip-ranges/{id}/", + ID: "ipam_fhrp-group-assignments_partial_update", + Method: "PATCH", + PathPattern: "/ipam/fhrp-group-assignments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesDeleteReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1233,33 +1299,33 @@ func (a *Client) IpamIPRangesDelete(params *IpamIPRangesDeleteParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesDeleteNoContent) + success, ok := result.(*IpamFhrpGroupAssignmentsPartialUpdateOK) 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 ipam_ip-ranges_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesList Overrides ListModelMixin to allow processing ExportTemplates. + IpamFhrpGroupAssignmentsRead ipam fhrp group assignments read API */ -func (a *Client) IpamIPRangesList(params *IpamIPRangesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesListOK, error) { +func (a *Client) IpamFhrpGroupAssignmentsRead(params *IpamFhrpGroupAssignmentsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesListParams() + params = NewIpamFhrpGroupAssignmentsReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_list", + ID: "ipam_fhrp-group-assignments_read", Method: "GET", - PathPattern: "/ipam/ip-ranges/", + PathPattern: "/ipam/fhrp-group-assignments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesListReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1272,33 +1338,33 @@ func (a *Client) IpamIPRangesList(params *IpamIPRangesListParams, authInfo runti if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesListOK) + success, ok := result.(*IpamFhrpGroupAssignmentsReadOK) 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 ipam_ip-ranges_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesPartialUpdate ipam ip ranges partial update API + IpamFhrpGroupAssignmentsUpdate ipam fhrp group assignments update API */ -func (a *Client) IpamIPRangesPartialUpdate(params *IpamIPRangesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesPartialUpdateOK, error) { +func (a *Client) IpamFhrpGroupAssignmentsUpdate(params *IpamFhrpGroupAssignmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupAssignmentsUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesPartialUpdateParams() + params = NewIpamFhrpGroupAssignmentsUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_partial_update", - Method: "PATCH", - PathPattern: "/ipam/ip-ranges/{id}/", + ID: "ipam_fhrp-group-assignments_update", + Method: "PUT", + PathPattern: "/ipam/fhrp-group-assignments/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesPartialUpdateReader{formats: a.formats}, + Reader: &IpamFhrpGroupAssignmentsUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1311,33 +1377,33 @@ func (a *Client) IpamIPRangesPartialUpdate(params *IpamIPRangesPartialUpdatePara if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesPartialUpdateOK) + success, ok := result.(*IpamFhrpGroupAssignmentsUpdateOK) 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 ipam_ip-ranges_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-group-assignments_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesRead ipam ip ranges read API + IpamFhrpGroupsBulkDelete ipam fhrp groups bulk delete API */ -func (a *Client) IpamIPRangesRead(params *IpamIPRangesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesReadOK, error) { +func (a *Client) IpamFhrpGroupsBulkDelete(params *IpamFhrpGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesReadParams() + params = NewIpamFhrpGroupsBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_read", - Method: "GET", - PathPattern: "/ipam/ip-ranges/{id}/", + ID: "ipam_fhrp-groups_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/fhrp-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesReadReader{formats: a.formats}, + Reader: &IpamFhrpGroupsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1350,33 +1416,33 @@ func (a *Client) IpamIPRangesRead(params *IpamIPRangesReadParams, authInfo runti if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesReadOK) + success, ok := result.(*IpamFhrpGroupsBulkDeleteNoContent) 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 ipam_ip-ranges_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamIPRangesUpdate ipam ip ranges update API + IpamFhrpGroupsBulkPartialUpdate ipam fhrp groups bulk partial update API */ -func (a *Client) IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesUpdateOK, error) { +func (a *Client) IpamFhrpGroupsBulkPartialUpdate(params *IpamFhrpGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamIPRangesUpdateParams() + params = NewIpamFhrpGroupsBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_ip-ranges_update", - Method: "PUT", - PathPattern: "/ipam/ip-ranges/{id}/", + ID: "ipam_fhrp-groups_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/fhrp-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamIPRangesUpdateReader{formats: a.formats}, + Reader: &IpamFhrpGroupsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1389,38 +1455,33 @@ func (a *Client) IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamIPRangesUpdateOK) + success, ok := result.(*IpamFhrpGroupsBulkPartialUpdateOK) 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 ipam_ip-ranges_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesAvailableIpsCreate A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of -IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be -passed, however results will not be paginated. - -The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being -invoked in parallel, which results in a race condition where multiple insertions can occur. + IpamFhrpGroupsBulkUpdate ipam fhrp groups bulk update API */ -func (a *Client) IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsCreateCreated, error) { +func (a *Client) IpamFhrpGroupsBulkUpdate(params *IpamFhrpGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesAvailableIpsCreateParams() + params = NewIpamFhrpGroupsBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_available-ips_create", - Method: "POST", - PathPattern: "/ipam/prefixes/{id}/available-ips/", + ID: "ipam_fhrp-groups_bulk_update", + Method: "PUT", + PathPattern: "/ipam/fhrp-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesAvailableIpsCreateReader{formats: a.formats}, + Reader: &IpamFhrpGroupsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1433,38 +1494,33 @@ func (a *Client) IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIps if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesAvailableIpsCreateCreated) + success, ok := result.(*IpamFhrpGroupsBulkUpdateOK) 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 ipam_prefixes_available-ips_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesAvailableIpsRead A convenience method for returning available IP addresses within a Prefix or IPRange. By default, the number of -IPs returned will be equivalent to PAGINATE_COUNT. An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be -passed, however results will not be paginated. - -The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being -invoked in parallel, which results in a race condition where multiple insertions can occur. + IpamFhrpGroupsCreate ipam fhrp groups create API */ -func (a *Client) IpamPrefixesAvailableIpsRead(params *IpamPrefixesAvailableIpsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsReadOK, error) { +func (a *Client) IpamFhrpGroupsCreate(params *IpamFhrpGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesAvailableIpsReadParams() + params = NewIpamFhrpGroupsCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_available-ips_read", - Method: "GET", - PathPattern: "/ipam/prefixes/{id}/available-ips/", + ID: "ipam_fhrp-groups_create", + Method: "POST", + PathPattern: "/ipam/fhrp-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesAvailableIpsReadReader{formats: a.formats}, + Reader: &IpamFhrpGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1477,36 +1533,33 @@ func (a *Client) IpamPrefixesAvailableIpsRead(params *IpamPrefixesAvailableIpsRe if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesAvailableIpsReadOK) + success, ok := result.(*IpamFhrpGroupsCreateCreated) 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 ipam_prefixes_available-ips_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesAvailablePrefixesCreate as convenience method for returning available child prefixes within a parent - - The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being -invoked in parallel, which results in a race condition where multiple insertions can occur. + IpamFhrpGroupsDelete ipam fhrp groups delete API */ -func (a *Client) IpamPrefixesAvailablePrefixesCreate(params *IpamPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesCreateCreated, error) { +func (a *Client) IpamFhrpGroupsDelete(params *IpamFhrpGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesAvailablePrefixesCreateParams() + params = NewIpamFhrpGroupsDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_available-prefixes_create", - Method: "POST", - PathPattern: "/ipam/prefixes/{id}/available-prefixes/", + ID: "ipam_fhrp-groups_delete", + Method: "DELETE", + PathPattern: "/ipam/fhrp-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesAvailablePrefixesCreateReader{formats: a.formats}, + Reader: &IpamFhrpGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1519,36 +1572,33 @@ func (a *Client) IpamPrefixesAvailablePrefixesCreate(params *IpamPrefixesAvailab if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesAvailablePrefixesCreateCreated) + success, ok := result.(*IpamFhrpGroupsDeleteNoContent) 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 ipam_prefixes_available-prefixes_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesAvailablePrefixesRead as convenience method for returning available child prefixes within a parent - - The advisory lock decorator uses a PostgreSQL advisory lock to prevent this API from being -invoked in parallel, which results in a race condition where multiple insertions can occur. + IpamFhrpGroupsList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamPrefixesAvailablePrefixesRead(params *IpamPrefixesAvailablePrefixesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesReadOK, error) { +func (a *Client) IpamFhrpGroupsList(params *IpamFhrpGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesAvailablePrefixesReadParams() + params = NewIpamFhrpGroupsListParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_available-prefixes_read", + ID: "ipam_fhrp-groups_list", Method: "GET", - PathPattern: "/ipam/prefixes/{id}/available-prefixes/", + PathPattern: "/ipam/fhrp-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesAvailablePrefixesReadReader{formats: a.formats}, + Reader: &IpamFhrpGroupsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1561,33 +1611,33 @@ func (a *Client) IpamPrefixesAvailablePrefixesRead(params *IpamPrefixesAvailable if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesAvailablePrefixesReadOK) + success, ok := result.(*IpamFhrpGroupsListOK) 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 ipam_prefixes_available-prefixes_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesBulkDelete ipam prefixes bulk delete API + IpamFhrpGroupsPartialUpdate ipam fhrp groups partial update API */ -func (a *Client) IpamPrefixesBulkDelete(params *IpamPrefixesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkDeleteNoContent, error) { +func (a *Client) IpamFhrpGroupsPartialUpdate(params *IpamFhrpGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesBulkDeleteParams() + params = NewIpamFhrpGroupsPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_bulk_delete", - Method: "DELETE", - PathPattern: "/ipam/prefixes/", + ID: "ipam_fhrp-groups_partial_update", + Method: "PATCH", + PathPattern: "/ipam/fhrp-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesBulkDeleteReader{formats: a.formats}, + Reader: &IpamFhrpGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1600,33 +1650,1086 @@ func (a *Client) IpamPrefixesBulkDelete(params *IpamPrefixesBulkDeleteParams, au if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesBulkDeleteNoContent) + success, ok := result.(*IpamFhrpGroupsPartialUpdateOK) 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 ipam_prefixes_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_fhrp-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesBulkPartialUpdate ipam prefixes bulk partial update API + IpamFhrpGroupsRead ipam fhrp groups read API */ -func (a *Client) IpamPrefixesBulkPartialUpdate(params *IpamPrefixesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkPartialUpdateOK, error) { +func (a *Client) IpamFhrpGroupsRead(params *IpamFhrpGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesBulkPartialUpdateParams() + params = NewIpamFhrpGroupsReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_bulk_partial_update", - Method: "PATCH", - PathPattern: "/ipam/prefixes/", + ID: "ipam_fhrp-groups_read", + Method: "GET", + PathPattern: "/ipam/fhrp-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesBulkPartialUpdateReader{formats: a.formats}, + Reader: &IpamFhrpGroupsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamFhrpGroupsReadOK) + 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 ipam_fhrp-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamFhrpGroupsUpdate ipam fhrp groups update API +*/ +func (a *Client) IpamFhrpGroupsUpdate(params *IpamFhrpGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamFhrpGroupsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamFhrpGroupsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_fhrp-groups_update", + Method: "PUT", + PathPattern: "/ipam/fhrp-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamFhrpGroupsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamFhrpGroupsUpdateOK) + 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 ipam_fhrp-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesBulkDelete ipam ip addresses bulk delete API +*/ +func (a *Client) IpamIPAddressesBulkDelete(params *IpamIPAddressesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesBulkDeleteNoContent) + 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 ipam_ip-addresses_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesBulkPartialUpdate ipam ip addresses bulk partial update API +*/ +func (a *Client) IpamIPAddressesBulkPartialUpdate(params *IpamIPAddressesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesBulkPartialUpdateOK) + 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 ipam_ip-addresses_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesBulkUpdate ipam ip addresses bulk update API +*/ +func (a *Client) IpamIPAddressesBulkUpdate(params *IpamIPAddressesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_bulk_update", + Method: "PUT", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesBulkUpdateOK) + 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 ipam_ip-addresses_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesCreate ipam ip addresses create API +*/ +func (a *Client) IpamIPAddressesCreate(params *IpamIPAddressesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_create", + Method: "POST", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesCreateCreated) + 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 ipam_ip-addresses_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesDelete ipam ip addresses delete API +*/ +func (a *Client) IpamIPAddressesDelete(params *IpamIPAddressesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesDeleteNoContent) + 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 ipam_ip-addresses_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) IpamIPAddressesList(params *IpamIPAddressesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_list", + Method: "GET", + PathPattern: "/ipam/ip-addresses/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesListOK) + 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 ipam_ip-addresses_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesPartialUpdate ipam ip addresses partial update API +*/ +func (a *Client) IpamIPAddressesPartialUpdate(params *IpamIPAddressesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesPartialUpdateOK) + 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 ipam_ip-addresses_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesRead ipam ip addresses read API +*/ +func (a *Client) IpamIPAddressesRead(params *IpamIPAddressesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_read", + Method: "GET", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesReadOK) + 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 ipam_ip-addresses_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPAddressesUpdate ipam ip addresses update API +*/ +func (a *Client) IpamIPAddressesUpdate(params *IpamIPAddressesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPAddressesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPAddressesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-addresses_update", + Method: "PUT", + PathPattern: "/ipam/ip-addresses/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPAddressesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPAddressesUpdateOK) + 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 ipam_ip-addresses_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesAvailableIpsCreate ipam ip ranges available ips create API +*/ +func (a *Client) IpamIPRangesAvailableIpsCreate(params *IpamIPRangesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesAvailableIpsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_available-ips_create", + Method: "POST", + PathPattern: "/ipam/ip-ranges/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesAvailableIpsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesAvailableIpsCreateCreated) + 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 ipam_ip-ranges_available-ips_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesAvailableIpsList ipam ip ranges available ips list API +*/ +func (a *Client) IpamIPRangesAvailableIpsList(params *IpamIPRangesAvailableIpsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesAvailableIpsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesAvailableIpsListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_available-ips_list", + Method: "GET", + PathPattern: "/ipam/ip-ranges/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesAvailableIpsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesAvailableIpsListOK) + 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 ipam_ip-ranges_available-ips_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesBulkDelete ipam ip ranges bulk delete API +*/ +func (a *Client) IpamIPRangesBulkDelete(params *IpamIPRangesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesBulkDeleteNoContent) + 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 ipam_ip-ranges_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesBulkPartialUpdate ipam ip ranges bulk partial update API +*/ +func (a *Client) IpamIPRangesBulkPartialUpdate(params *IpamIPRangesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesBulkPartialUpdateOK) + 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 ipam_ip-ranges_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesBulkUpdate ipam ip ranges bulk update API +*/ +func (a *Client) IpamIPRangesBulkUpdate(params *IpamIPRangesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_bulk_update", + Method: "PUT", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesBulkUpdateOK) + 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 ipam_ip-ranges_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesCreate ipam ip ranges create API +*/ +func (a *Client) IpamIPRangesCreate(params *IpamIPRangesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_create", + Method: "POST", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesCreateCreated) + 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 ipam_ip-ranges_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesDelete ipam ip ranges delete API +*/ +func (a *Client) IpamIPRangesDelete(params *IpamIPRangesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_delete", + Method: "DELETE", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesDeleteNoContent) + 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 ipam_ip-ranges_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) IpamIPRangesList(params *IpamIPRangesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_list", + Method: "GET", + PathPattern: "/ipam/ip-ranges/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesListOK) + 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 ipam_ip-ranges_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesPartialUpdate ipam ip ranges partial update API +*/ +func (a *Client) IpamIPRangesPartialUpdate(params *IpamIPRangesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_partial_update", + Method: "PATCH", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesPartialUpdateOK) + 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 ipam_ip-ranges_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesRead ipam ip ranges read API +*/ +func (a *Client) IpamIPRangesRead(params *IpamIPRangesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_read", + Method: "GET", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesReadOK) + 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 ipam_ip-ranges_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamIPRangesUpdate ipam ip ranges update API +*/ +func (a *Client) IpamIPRangesUpdate(params *IpamIPRangesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamIPRangesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamIPRangesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_ip-ranges_update", + Method: "PUT", + PathPattern: "/ipam/ip-ranges/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamIPRangesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamIPRangesUpdateOK) + 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 ipam_ip-ranges_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailableIpsCreate ipam prefixes available ips create API +*/ +func (a *Client) IpamPrefixesAvailableIpsCreate(params *IpamPrefixesAvailableIpsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailableIpsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_available-ips_create", + Method: "POST", + PathPattern: "/ipam/prefixes/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailableIpsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailableIpsCreateCreated) + 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 ipam_prefixes_available-ips_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailableIpsList ipam prefixes available ips list API +*/ +func (a *Client) IpamPrefixesAvailableIpsList(params *IpamPrefixesAvailableIpsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailableIpsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailableIpsListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_available-ips_list", + Method: "GET", + PathPattern: "/ipam/prefixes/{id}/available-ips/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailableIpsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailableIpsListOK) + 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 ipam_prefixes_available-ips_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailablePrefixesCreate ipam prefixes available prefixes create API +*/ +func (a *Client) IpamPrefixesAvailablePrefixesCreate(params *IpamPrefixesAvailablePrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailablePrefixesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_available-prefixes_create", + Method: "POST", + PathPattern: "/ipam/prefixes/{id}/available-prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailablePrefixesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailablePrefixesCreateCreated) + 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 ipam_prefixes_available-prefixes_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesAvailablePrefixesList ipam prefixes available prefixes list API +*/ +func (a *Client) IpamPrefixesAvailablePrefixesList(params *IpamPrefixesAvailablePrefixesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesAvailablePrefixesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesAvailablePrefixesListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_available-prefixes_list", + Method: "GET", + PathPattern: "/ipam/prefixes/{id}/available-prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesAvailablePrefixesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesAvailablePrefixesListOK) + 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 ipam_prefixes_available-prefixes_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesBulkDelete ipam prefixes bulk delete API +*/ +func (a *Client) IpamPrefixesBulkDelete(params *IpamPrefixesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesBulkDeleteNoContent) + 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 ipam_prefixes_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesBulkPartialUpdate ipam prefixes bulk partial update API +*/ +func (a *Client) IpamPrefixesBulkPartialUpdate(params *IpamPrefixesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1645,27 +2748,144 @@ func (a *Client) IpamPrefixesBulkPartialUpdate(params *IpamPrefixesBulkPartialUp } // 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 ipam_prefixes_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_prefixes_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesBulkUpdate ipam prefixes bulk update API +*/ +func (a *Client) IpamPrefixesBulkUpdate(params *IpamPrefixesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_bulk_update", + Method: "PUT", + PathPattern: "/ipam/prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesBulkUpdateOK) + 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 ipam_prefixes_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesCreate ipam prefixes create API +*/ +func (a *Client) IpamPrefixesCreate(params *IpamPrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_create", + Method: "POST", + PathPattern: "/ipam/prefixes/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesCreateCreated) + 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 ipam_prefixes_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesDelete ipam prefixes delete API +*/ +func (a *Client) IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_delete", + Method: "DELETE", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesDeleteNoContent) + 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 ipam_prefixes_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesBulkUpdate ipam prefixes bulk update API + IpamPrefixesList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamPrefixesBulkUpdate(params *IpamPrefixesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesBulkUpdateOK, error) { +func (a *Client) IpamPrefixesList(params *IpamPrefixesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesBulkUpdateParams() + params = NewIpamPrefixesListParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_bulk_update", - Method: "PUT", + ID: "ipam_prefixes_list", + Method: "GET", PathPattern: "/ipam/prefixes/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesBulkUpdateReader{formats: a.formats}, + Reader: &IpamPrefixesListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1678,33 +2898,267 @@ func (a *Client) IpamPrefixesBulkUpdate(params *IpamPrefixesBulkUpdateParams, au if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesBulkUpdateOK) + success, ok := result.(*IpamPrefixesListOK) 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 ipam_prefixes_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_prefixes_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesCreate ipam prefixes create API + IpamPrefixesPartialUpdate ipam prefixes partial update API */ -func (a *Client) IpamPrefixesCreate(params *IpamPrefixesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesCreateCreated, error) { +func (a *Client) IpamPrefixesPartialUpdate(params *IpamPrefixesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_partial_update", + Method: "PATCH", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesPartialUpdateOK) + 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 ipam_prefixes_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesRead ipam prefixes read API +*/ +func (a *Client) IpamPrefixesRead(params *IpamPrefixesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesReadParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_read", + Method: "GET", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesReadOK) + 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 ipam_prefixes_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamPrefixesUpdate ipam prefixes update API +*/ +func (a *Client) IpamPrefixesUpdate(params *IpamPrefixesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamPrefixesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_prefixes_update", + Method: "PUT", + PathPattern: "/ipam/prefixes/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamPrefixesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamPrefixesUpdateOK) + 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 ipam_prefixes_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsBulkDelete ipam rirs bulk delete API +*/ +func (a *Client) IpamRirsBulkDelete(params *IpamRirsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_rirs_bulk_delete", + Method: "DELETE", + PathPattern: "/ipam/rirs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsBulkDeleteNoContent) + 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 ipam_rirs_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsBulkPartialUpdate ipam rirs bulk partial update API +*/ +func (a *Client) IpamRirsBulkPartialUpdate(params *IpamRirsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_rirs_bulk_partial_update", + Method: "PATCH", + PathPattern: "/ipam/rirs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsBulkPartialUpdateOK) + 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 ipam_rirs_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsBulkUpdate ipam rirs bulk update API +*/ +func (a *Client) IpamRirsBulkUpdate(params *IpamRirsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamRirsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_rirs_bulk_update", + Method: "PUT", + PathPattern: "/ipam/rirs/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamRirsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamRirsBulkUpdateOK) + 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 ipam_rirs_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamRirsCreate ipam rirs create API +*/ +func (a *Client) IpamRirsCreate(params *IpamRirsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesCreateParams() + params = NewIpamRirsCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_create", + ID: "ipam_rirs_create", Method: "POST", - PathPattern: "/ipam/prefixes/", + PathPattern: "/ipam/rirs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesCreateReader{formats: a.formats}, + Reader: &IpamRirsCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1717,33 +3171,33 @@ func (a *Client) IpamPrefixesCreate(params *IpamPrefixesCreateParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesCreateCreated) + success, ok := result.(*IpamRirsCreateCreated) 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 ipam_prefixes_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_rirs_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesDelete ipam prefixes delete API + IpamRirsDelete ipam rirs delete API */ -func (a *Client) IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesDeleteNoContent, error) { +func (a *Client) IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesDeleteParams() + params = NewIpamRirsDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_delete", + ID: "ipam_rirs_delete", Method: "DELETE", - PathPattern: "/ipam/prefixes/{id}/", + PathPattern: "/ipam/rirs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesDeleteReader{formats: a.formats}, + Reader: &IpamRirsDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1756,33 +3210,33 @@ func (a *Client) IpamPrefixesDelete(params *IpamPrefixesDeleteParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesDeleteNoContent) + success, ok := result.(*IpamRirsDeleteNoContent) 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 ipam_prefixes_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_rirs_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesList Overrides ListModelMixin to allow processing ExportTemplates. + IpamRirsList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamPrefixesList(params *IpamPrefixesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesListOK, error) { +func (a *Client) IpamRirsList(params *IpamRirsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesListParams() + params = NewIpamRirsListParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_list", + ID: "ipam_rirs_list", Method: "GET", - PathPattern: "/ipam/prefixes/", + PathPattern: "/ipam/rirs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesListReader{formats: a.formats}, + Reader: &IpamRirsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1795,33 +3249,33 @@ func (a *Client) IpamPrefixesList(params *IpamPrefixesListParams, authInfo runti if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesListOK) + success, ok := result.(*IpamRirsListOK) 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 ipam_prefixes_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_rirs_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesPartialUpdate ipam prefixes partial update API + IpamRirsPartialUpdate ipam rirs partial update API */ -func (a *Client) IpamPrefixesPartialUpdate(params *IpamPrefixesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesPartialUpdateOK, error) { +func (a *Client) IpamRirsPartialUpdate(params *IpamRirsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesPartialUpdateParams() + params = NewIpamRirsPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_partial_update", + ID: "ipam_rirs_partial_update", Method: "PATCH", - PathPattern: "/ipam/prefixes/{id}/", + PathPattern: "/ipam/rirs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesPartialUpdateReader{formats: a.formats}, + Reader: &IpamRirsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1834,33 +3288,33 @@ func (a *Client) IpamPrefixesPartialUpdate(params *IpamPrefixesPartialUpdatePara if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesPartialUpdateOK) + success, ok := result.(*IpamRirsPartialUpdateOK) 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 ipam_prefixes_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_rirs_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesRead ipam prefixes read API + IpamRirsRead ipam rirs read API */ -func (a *Client) IpamPrefixesRead(params *IpamPrefixesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesReadOK, error) { +func (a *Client) IpamRirsRead(params *IpamRirsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesReadParams() + params = NewIpamRirsReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_read", + ID: "ipam_rirs_read", Method: "GET", - PathPattern: "/ipam/prefixes/{id}/", + PathPattern: "/ipam/rirs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesReadReader{formats: a.formats}, + Reader: &IpamRirsReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1873,33 +3327,33 @@ func (a *Client) IpamPrefixesRead(params *IpamPrefixesReadParams, authInfo runti if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesReadOK) + success, ok := result.(*IpamRirsReadOK) 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 ipam_prefixes_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_rirs_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamPrefixesUpdate ipam prefixes update API + IpamRirsUpdate ipam rirs update API */ -func (a *Client) IpamPrefixesUpdate(params *IpamPrefixesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamPrefixesUpdateOK, error) { +func (a *Client) IpamRirsUpdate(params *IpamRirsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamPrefixesUpdateParams() + params = NewIpamRirsUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_prefixes_update", + ID: "ipam_rirs_update", Method: "PUT", - PathPattern: "/ipam/prefixes/{id}/", + PathPattern: "/ipam/rirs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamPrefixesUpdateReader{formats: a.formats}, + Reader: &IpamRirsUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1912,33 +3366,33 @@ func (a *Client) IpamPrefixesUpdate(params *IpamPrefixesUpdateParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamPrefixesUpdateOK) + success, ok := result.(*IpamRirsUpdateOK) 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 ipam_prefixes_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_rirs_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsBulkDelete ipam rirs bulk delete API + IpamRolesBulkDelete ipam roles bulk delete API */ -func (a *Client) IpamRirsBulkDelete(params *IpamRirsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsBulkDeleteNoContent, error) { +func (a *Client) IpamRolesBulkDelete(params *IpamRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsBulkDeleteParams() + params = NewIpamRolesBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_bulk_delete", + ID: "ipam_roles_bulk_delete", Method: "DELETE", - PathPattern: "/ipam/rirs/", + PathPattern: "/ipam/roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsBulkDeleteReader{formats: a.formats}, + Reader: &IpamRolesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1951,33 +3405,33 @@ func (a *Client) IpamRirsBulkDelete(params *IpamRirsBulkDeleteParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamRirsBulkDeleteNoContent) + success, ok := result.(*IpamRolesBulkDeleteNoContent) 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 ipam_rirs_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsBulkPartialUpdate ipam rirs bulk partial update API + IpamRolesBulkPartialUpdate ipam roles bulk partial update API */ -func (a *Client) IpamRirsBulkPartialUpdate(params *IpamRirsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsBulkPartialUpdateOK, error) { +func (a *Client) IpamRolesBulkPartialUpdate(params *IpamRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsBulkPartialUpdateParams() + params = NewIpamRolesBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_bulk_partial_update", + ID: "ipam_roles_bulk_partial_update", Method: "PATCH", - PathPattern: "/ipam/rirs/", + PathPattern: "/ipam/roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsBulkPartialUpdateReader{formats: a.formats}, + Reader: &IpamRolesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -1990,33 +3444,33 @@ func (a *Client) IpamRirsBulkPartialUpdate(params *IpamRirsBulkPartialUpdatePara if err != nil { return nil, err } - success, ok := result.(*IpamRirsBulkPartialUpdateOK) + success, ok := result.(*IpamRolesBulkPartialUpdateOK) 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 ipam_rirs_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsBulkUpdate ipam rirs bulk update API + IpamRolesBulkUpdate ipam roles bulk update API */ -func (a *Client) IpamRirsBulkUpdate(params *IpamRirsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsBulkUpdateOK, error) { +func (a *Client) IpamRolesBulkUpdate(params *IpamRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsBulkUpdateParams() + params = NewIpamRolesBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_bulk_update", + ID: "ipam_roles_bulk_update", Method: "PUT", - PathPattern: "/ipam/rirs/", + PathPattern: "/ipam/roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsBulkUpdateReader{formats: a.formats}, + Reader: &IpamRolesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2029,33 +3483,33 @@ func (a *Client) IpamRirsBulkUpdate(params *IpamRirsBulkUpdateParams, authInfo r if err != nil { return nil, err } - success, ok := result.(*IpamRirsBulkUpdateOK) + success, ok := result.(*IpamRolesBulkUpdateOK) 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 ipam_rirs_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsCreate ipam rirs create API + IpamRolesCreate ipam roles create API */ -func (a *Client) IpamRirsCreate(params *IpamRirsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsCreateCreated, error) { +func (a *Client) IpamRolesCreate(params *IpamRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsCreateParams() + params = NewIpamRolesCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_create", + ID: "ipam_roles_create", Method: "POST", - PathPattern: "/ipam/rirs/", + PathPattern: "/ipam/roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsCreateReader{formats: a.formats}, + Reader: &IpamRolesCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2068,33 +3522,33 @@ func (a *Client) IpamRirsCreate(params *IpamRirsCreateParams, authInfo runtime.C if err != nil { return nil, err } - success, ok := result.(*IpamRirsCreateCreated) + success, ok := result.(*IpamRolesCreateCreated) 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 ipam_rirs_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsDelete ipam rirs delete API + IpamRolesDelete ipam roles delete API */ -func (a *Client) IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsDeleteNoContent, error) { +func (a *Client) IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsDeleteParams() + params = NewIpamRolesDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_delete", + ID: "ipam_roles_delete", Method: "DELETE", - PathPattern: "/ipam/rirs/{id}/", + PathPattern: "/ipam/roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsDeleteReader{formats: a.formats}, + Reader: &IpamRolesDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2107,33 +3561,33 @@ func (a *Client) IpamRirsDelete(params *IpamRirsDeleteParams, authInfo runtime.C if err != nil { return nil, err } - success, ok := result.(*IpamRirsDeleteNoContent) + success, ok := result.(*IpamRolesDeleteNoContent) 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 ipam_rirs_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsList Overrides ListModelMixin to allow processing ExportTemplates. + IpamRolesList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamRirsList(params *IpamRirsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsListOK, error) { +func (a *Client) IpamRolesList(params *IpamRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsListParams() + params = NewIpamRolesListParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_list", + ID: "ipam_roles_list", Method: "GET", - PathPattern: "/ipam/rirs/", + PathPattern: "/ipam/roles/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsListReader{formats: a.formats}, + Reader: &IpamRolesListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2146,33 +3600,33 @@ func (a *Client) IpamRirsList(params *IpamRirsListParams, authInfo runtime.Clien if err != nil { return nil, err } - success, ok := result.(*IpamRirsListOK) + success, ok := result.(*IpamRolesListOK) 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 ipam_rirs_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsPartialUpdate ipam rirs partial update API + IpamRolesPartialUpdate ipam roles partial update API */ -func (a *Client) IpamRirsPartialUpdate(params *IpamRirsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsPartialUpdateOK, error) { +func (a *Client) IpamRolesPartialUpdate(params *IpamRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsPartialUpdateParams() + params = NewIpamRolesPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_partial_update", + ID: "ipam_roles_partial_update", Method: "PATCH", - PathPattern: "/ipam/rirs/{id}/", + PathPattern: "/ipam/roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsPartialUpdateReader{formats: a.formats}, + Reader: &IpamRolesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2185,33 +3639,33 @@ func (a *Client) IpamRirsPartialUpdate(params *IpamRirsPartialUpdateParams, auth if err != nil { return nil, err } - success, ok := result.(*IpamRirsPartialUpdateOK) + success, ok := result.(*IpamRolesPartialUpdateOK) 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 ipam_rirs_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsRead ipam rirs read API + IpamRolesRead ipam roles read API */ -func (a *Client) IpamRirsRead(params *IpamRirsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsReadOK, error) { +func (a *Client) IpamRolesRead(params *IpamRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsReadParams() + params = NewIpamRolesReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_read", + ID: "ipam_roles_read", Method: "GET", - PathPattern: "/ipam/rirs/{id}/", + PathPattern: "/ipam/roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsReadReader{formats: a.formats}, + Reader: &IpamRolesReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2224,33 +3678,33 @@ func (a *Client) IpamRirsRead(params *IpamRirsReadParams, authInfo runtime.Clien if err != nil { return nil, err } - success, ok := result.(*IpamRirsReadOK) + success, ok := result.(*IpamRolesReadOK) 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 ipam_rirs_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRirsUpdate ipam rirs update API + IpamRolesUpdate ipam roles update API */ -func (a *Client) IpamRirsUpdate(params *IpamRirsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRirsUpdateOK, error) { +func (a *Client) IpamRolesUpdate(params *IpamRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRirsUpdateParams() + params = NewIpamRolesUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_rirs_update", + ID: "ipam_roles_update", Method: "PUT", - PathPattern: "/ipam/rirs/{id}/", + PathPattern: "/ipam/roles/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRirsUpdateReader{formats: a.formats}, + Reader: &IpamRolesUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2263,33 +3717,33 @@ func (a *Client) IpamRirsUpdate(params *IpamRirsUpdateParams, authInfo runtime.C if err != nil { return nil, err } - success, ok := result.(*IpamRirsUpdateOK) + success, ok := result.(*IpamRolesUpdateOK) 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 ipam_rirs_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesBulkDelete ipam roles bulk delete API + IpamRouteTargetsBulkDelete ipam route targets bulk delete API */ -func (a *Client) IpamRolesBulkDelete(params *IpamRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesBulkDeleteNoContent, error) { +func (a *Client) IpamRouteTargetsBulkDelete(params *IpamRouteTargetsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesBulkDeleteParams() + params = NewIpamRouteTargetsBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_bulk_delete", + ID: "ipam_route-targets_bulk_delete", Method: "DELETE", - PathPattern: "/ipam/roles/", + PathPattern: "/ipam/route-targets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesBulkDeleteReader{formats: a.formats}, + Reader: &IpamRouteTargetsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2302,33 +3756,33 @@ func (a *Client) IpamRolesBulkDelete(params *IpamRolesBulkDeleteParams, authInfo if err != nil { return nil, err } - success, ok := result.(*IpamRolesBulkDeleteNoContent) + success, ok := result.(*IpamRouteTargetsBulkDeleteNoContent) 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 ipam_roles_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesBulkPartialUpdate ipam roles bulk partial update API + IpamRouteTargetsBulkPartialUpdate ipam route targets bulk partial update API */ -func (a *Client) IpamRolesBulkPartialUpdate(params *IpamRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesBulkPartialUpdateOK, error) { +func (a *Client) IpamRouteTargetsBulkPartialUpdate(params *IpamRouteTargetsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesBulkPartialUpdateParams() + params = NewIpamRouteTargetsBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_bulk_partial_update", + ID: "ipam_route-targets_bulk_partial_update", Method: "PATCH", - PathPattern: "/ipam/roles/", + PathPattern: "/ipam/route-targets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesBulkPartialUpdateReader{formats: a.formats}, + Reader: &IpamRouteTargetsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2341,33 +3795,33 @@ func (a *Client) IpamRolesBulkPartialUpdate(params *IpamRolesBulkPartialUpdatePa if err != nil { return nil, err } - success, ok := result.(*IpamRolesBulkPartialUpdateOK) + success, ok := result.(*IpamRouteTargetsBulkPartialUpdateOK) 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 ipam_roles_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesBulkUpdate ipam roles bulk update API + IpamRouteTargetsBulkUpdate ipam route targets bulk update API */ -func (a *Client) IpamRolesBulkUpdate(params *IpamRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesBulkUpdateOK, error) { +func (a *Client) IpamRouteTargetsBulkUpdate(params *IpamRouteTargetsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesBulkUpdateParams() + params = NewIpamRouteTargetsBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_bulk_update", + ID: "ipam_route-targets_bulk_update", Method: "PUT", - PathPattern: "/ipam/roles/", + PathPattern: "/ipam/route-targets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesBulkUpdateReader{formats: a.formats}, + Reader: &IpamRouteTargetsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2380,33 +3834,33 @@ func (a *Client) IpamRolesBulkUpdate(params *IpamRolesBulkUpdateParams, authInfo if err != nil { return nil, err } - success, ok := result.(*IpamRolesBulkUpdateOK) + success, ok := result.(*IpamRouteTargetsBulkUpdateOK) 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 ipam_roles_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesCreate ipam roles create API + IpamRouteTargetsCreate ipam route targets create API */ -func (a *Client) IpamRolesCreate(params *IpamRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesCreateCreated, error) { +func (a *Client) IpamRouteTargetsCreate(params *IpamRouteTargetsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesCreateParams() + params = NewIpamRouteTargetsCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_create", + ID: "ipam_route-targets_create", Method: "POST", - PathPattern: "/ipam/roles/", + PathPattern: "/ipam/route-targets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesCreateReader{formats: a.formats}, + Reader: &IpamRouteTargetsCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2419,33 +3873,33 @@ func (a *Client) IpamRolesCreate(params *IpamRolesCreateParams, authInfo runtime if err != nil { return nil, err } - success, ok := result.(*IpamRolesCreateCreated) + success, ok := result.(*IpamRouteTargetsCreateCreated) 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 ipam_roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesDelete ipam roles delete API + IpamRouteTargetsDelete ipam route targets delete API */ -func (a *Client) IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesDeleteNoContent, error) { +func (a *Client) IpamRouteTargetsDelete(params *IpamRouteTargetsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesDeleteParams() + params = NewIpamRouteTargetsDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_delete", + ID: "ipam_route-targets_delete", Method: "DELETE", - PathPattern: "/ipam/roles/{id}/", + PathPattern: "/ipam/route-targets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesDeleteReader{formats: a.formats}, + Reader: &IpamRouteTargetsDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2458,33 +3912,33 @@ func (a *Client) IpamRolesDelete(params *IpamRolesDeleteParams, authInfo runtime if err != nil { return nil, err } - success, ok := result.(*IpamRolesDeleteNoContent) + success, ok := result.(*IpamRouteTargetsDeleteNoContent) 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 ipam_roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesList Overrides ListModelMixin to allow processing ExportTemplates. + IpamRouteTargetsList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamRolesList(params *IpamRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesListOK, error) { +func (a *Client) IpamRouteTargetsList(params *IpamRouteTargetsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesListParams() + params = NewIpamRouteTargetsListParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_list", + ID: "ipam_route-targets_list", Method: "GET", - PathPattern: "/ipam/roles/", + PathPattern: "/ipam/route-targets/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesListReader{formats: a.formats}, + Reader: &IpamRouteTargetsListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2497,33 +3951,33 @@ func (a *Client) IpamRolesList(params *IpamRolesListParams, authInfo runtime.Cli if err != nil { return nil, err } - success, ok := result.(*IpamRolesListOK) + success, ok := result.(*IpamRouteTargetsListOK) 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 ipam_roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesPartialUpdate ipam roles partial update API + IpamRouteTargetsPartialUpdate ipam route targets partial update API */ -func (a *Client) IpamRolesPartialUpdate(params *IpamRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesPartialUpdateOK, error) { +func (a *Client) IpamRouteTargetsPartialUpdate(params *IpamRouteTargetsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesPartialUpdateParams() + params = NewIpamRouteTargetsPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_partial_update", + ID: "ipam_route-targets_partial_update", Method: "PATCH", - PathPattern: "/ipam/roles/{id}/", + PathPattern: "/ipam/route-targets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesPartialUpdateReader{formats: a.formats}, + Reader: &IpamRouteTargetsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2536,33 +3990,33 @@ func (a *Client) IpamRolesPartialUpdate(params *IpamRolesPartialUpdateParams, au if err != nil { return nil, err } - success, ok := result.(*IpamRolesPartialUpdateOK) + success, ok := result.(*IpamRouteTargetsPartialUpdateOK) 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 ipam_roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesRead ipam roles read API + IpamRouteTargetsRead ipam route targets read API */ -func (a *Client) IpamRolesRead(params *IpamRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesReadOK, error) { +func (a *Client) IpamRouteTargetsRead(params *IpamRouteTargetsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesReadParams() + params = NewIpamRouteTargetsReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_read", + ID: "ipam_route-targets_read", Method: "GET", - PathPattern: "/ipam/roles/{id}/", + PathPattern: "/ipam/route-targets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesReadReader{formats: a.formats}, + Reader: &IpamRouteTargetsReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2575,33 +4029,33 @@ func (a *Client) IpamRolesRead(params *IpamRolesReadParams, authInfo runtime.Cli if err != nil { return nil, err } - success, ok := result.(*IpamRolesReadOK) + success, ok := result.(*IpamRouteTargetsReadOK) 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 ipam_roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRolesUpdate ipam roles update API + IpamRouteTargetsUpdate ipam route targets update API */ -func (a *Client) IpamRolesUpdate(params *IpamRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRolesUpdateOK, error) { +func (a *Client) IpamRouteTargetsUpdate(params *IpamRouteTargetsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRolesUpdateParams() + params = NewIpamRouteTargetsUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_roles_update", + ID: "ipam_route-targets_update", Method: "PUT", - PathPattern: "/ipam/roles/{id}/", + PathPattern: "/ipam/route-targets/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRolesUpdateReader{formats: a.formats}, + Reader: &IpamRouteTargetsUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2614,33 +4068,33 @@ func (a *Client) IpamRolesUpdate(params *IpamRolesUpdateParams, authInfo runtime if err != nil { return nil, err } - success, ok := result.(*IpamRolesUpdateOK) + success, ok := result.(*IpamRouteTargetsUpdateOK) 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 ipam_roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_route-targets_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsBulkDelete ipam route targets bulk delete API + IpamServiceTemplatesBulkDelete ipam service templates bulk delete API */ -func (a *Client) IpamRouteTargetsBulkDelete(params *IpamRouteTargetsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsBulkDeleteNoContent, error) { +func (a *Client) IpamServiceTemplatesBulkDelete(params *IpamServiceTemplatesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesBulkDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsBulkDeleteParams() + params = NewIpamServiceTemplatesBulkDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_bulk_delete", + ID: "ipam_service-templates_bulk_delete", Method: "DELETE", - PathPattern: "/ipam/route-targets/", + PathPattern: "/ipam/service-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsBulkDeleteReader{formats: a.formats}, + Reader: &IpamServiceTemplatesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2653,33 +4107,33 @@ func (a *Client) IpamRouteTargetsBulkDelete(params *IpamRouteTargetsBulkDeletePa if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsBulkDeleteNoContent) + success, ok := result.(*IpamServiceTemplatesBulkDeleteNoContent) 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 ipam_route-targets_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsBulkPartialUpdate ipam route targets bulk partial update API + IpamServiceTemplatesBulkPartialUpdate ipam service templates bulk partial update API */ -func (a *Client) IpamRouteTargetsBulkPartialUpdate(params *IpamRouteTargetsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsBulkPartialUpdateOK, error) { +func (a *Client) IpamServiceTemplatesBulkPartialUpdate(params *IpamServiceTemplatesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesBulkPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsBulkPartialUpdateParams() + params = NewIpamServiceTemplatesBulkPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_bulk_partial_update", + ID: "ipam_service-templates_bulk_partial_update", Method: "PATCH", - PathPattern: "/ipam/route-targets/", + PathPattern: "/ipam/service-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsBulkPartialUpdateReader{formats: a.formats}, + Reader: &IpamServiceTemplatesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2692,33 +4146,33 @@ func (a *Client) IpamRouteTargetsBulkPartialUpdate(params *IpamRouteTargetsBulkP if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsBulkPartialUpdateOK) + success, ok := result.(*IpamServiceTemplatesBulkPartialUpdateOK) 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 ipam_route-targets_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsBulkUpdate ipam route targets bulk update API + IpamServiceTemplatesBulkUpdate ipam service templates bulk update API */ -func (a *Client) IpamRouteTargetsBulkUpdate(params *IpamRouteTargetsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsBulkUpdateOK, error) { +func (a *Client) IpamServiceTemplatesBulkUpdate(params *IpamServiceTemplatesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesBulkUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsBulkUpdateParams() + params = NewIpamServiceTemplatesBulkUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_bulk_update", + ID: "ipam_service-templates_bulk_update", Method: "PUT", - PathPattern: "/ipam/route-targets/", + PathPattern: "/ipam/service-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsBulkUpdateReader{formats: a.formats}, + Reader: &IpamServiceTemplatesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2731,33 +4185,33 @@ func (a *Client) IpamRouteTargetsBulkUpdate(params *IpamRouteTargetsBulkUpdatePa if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsBulkUpdateOK) + success, ok := result.(*IpamServiceTemplatesBulkUpdateOK) 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 ipam_route-targets_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsCreate ipam route targets create API + IpamServiceTemplatesCreate ipam service templates create API */ -func (a *Client) IpamRouteTargetsCreate(params *IpamRouteTargetsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsCreateCreated, error) { +func (a *Client) IpamServiceTemplatesCreate(params *IpamServiceTemplatesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesCreateCreated, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsCreateParams() + params = NewIpamServiceTemplatesCreateParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_create", + ID: "ipam_service-templates_create", Method: "POST", - PathPattern: "/ipam/route-targets/", + PathPattern: "/ipam/service-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsCreateReader{formats: a.formats}, + Reader: &IpamServiceTemplatesCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2770,33 +4224,33 @@ func (a *Client) IpamRouteTargetsCreate(params *IpamRouteTargetsCreateParams, au if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsCreateCreated) + success, ok := result.(*IpamServiceTemplatesCreateCreated) 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 ipam_route-targets_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsDelete ipam route targets delete API + IpamServiceTemplatesDelete ipam service templates delete API */ -func (a *Client) IpamRouteTargetsDelete(params *IpamRouteTargetsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsDeleteNoContent, error) { +func (a *Client) IpamServiceTemplatesDelete(params *IpamServiceTemplatesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesDeleteNoContent, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsDeleteParams() + params = NewIpamServiceTemplatesDeleteParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_delete", + ID: "ipam_service-templates_delete", Method: "DELETE", - PathPattern: "/ipam/route-targets/{id}/", + PathPattern: "/ipam/service-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsDeleteReader{formats: a.formats}, + Reader: &IpamServiceTemplatesDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2809,33 +4263,33 @@ func (a *Client) IpamRouteTargetsDelete(params *IpamRouteTargetsDeleteParams, au if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsDeleteNoContent) + success, ok := result.(*IpamServiceTemplatesDeleteNoContent) 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 ipam_route-targets_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsList Overrides ListModelMixin to allow processing ExportTemplates. + IpamServiceTemplatesList Overrides ListModelMixin to allow processing ExportTemplates. */ -func (a *Client) IpamRouteTargetsList(params *IpamRouteTargetsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsListOK, error) { +func (a *Client) IpamServiceTemplatesList(params *IpamServiceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesListOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsListParams() + params = NewIpamServiceTemplatesListParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_list", + ID: "ipam_service-templates_list", Method: "GET", - PathPattern: "/ipam/route-targets/", + PathPattern: "/ipam/service-templates/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsListReader{formats: a.formats}, + Reader: &IpamServiceTemplatesListReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2848,33 +4302,33 @@ func (a *Client) IpamRouteTargetsList(params *IpamRouteTargetsListParams, authIn if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsListOK) + success, ok := result.(*IpamServiceTemplatesListOK) 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 ipam_route-targets_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsPartialUpdate ipam route targets partial update API + IpamServiceTemplatesPartialUpdate ipam service templates partial update API */ -func (a *Client) IpamRouteTargetsPartialUpdate(params *IpamRouteTargetsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsPartialUpdateOK, error) { +func (a *Client) IpamServiceTemplatesPartialUpdate(params *IpamServiceTemplatesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesPartialUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsPartialUpdateParams() + params = NewIpamServiceTemplatesPartialUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_partial_update", + ID: "ipam_service-templates_partial_update", Method: "PATCH", - PathPattern: "/ipam/route-targets/{id}/", + PathPattern: "/ipam/service-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsPartialUpdateReader{formats: a.formats}, + Reader: &IpamServiceTemplatesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2887,33 +4341,33 @@ func (a *Client) IpamRouteTargetsPartialUpdate(params *IpamRouteTargetsPartialUp if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsPartialUpdateOK) + success, ok := result.(*IpamServiceTemplatesPartialUpdateOK) 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 ipam_route-targets_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsRead ipam route targets read API + IpamServiceTemplatesRead ipam service templates read API */ -func (a *Client) IpamRouteTargetsRead(params *IpamRouteTargetsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsReadOK, error) { +func (a *Client) IpamServiceTemplatesRead(params *IpamServiceTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesReadOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsReadParams() + params = NewIpamServiceTemplatesReadParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_read", + ID: "ipam_service-templates_read", Method: "GET", - PathPattern: "/ipam/route-targets/{id}/", + PathPattern: "/ipam/service-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsReadReader{formats: a.formats}, + Reader: &IpamServiceTemplatesReadReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2926,33 +4380,33 @@ func (a *Client) IpamRouteTargetsRead(params *IpamRouteTargetsReadParams, authIn if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsReadOK) + success, ok := result.(*IpamServiceTemplatesReadOK) 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 ipam_route-targets_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } /* - IpamRouteTargetsUpdate ipam route targets update API + IpamServiceTemplatesUpdate ipam service templates update API */ -func (a *Client) IpamRouteTargetsUpdate(params *IpamRouteTargetsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamRouteTargetsUpdateOK, error) { +func (a *Client) IpamServiceTemplatesUpdate(params *IpamServiceTemplatesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamServiceTemplatesUpdateOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewIpamRouteTargetsUpdateParams() + params = NewIpamServiceTemplatesUpdateParams() } op := &runtime.ClientOperation{ - ID: "ipam_route-targets_update", + ID: "ipam_service-templates_update", Method: "PUT", - PathPattern: "/ipam/route-targets/{id}/", + PathPattern: "/ipam/service-templates/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, - Reader: &IpamRouteTargetsUpdateReader{formats: a.formats}, + Reader: &IpamServiceTemplatesUpdateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, @@ -2965,13 +4419,13 @@ func (a *Client) IpamRouteTargetsUpdate(params *IpamRouteTargetsUpdateParams, au if err != nil { return nil, err } - success, ok := result.(*IpamRouteTargetsUpdateOK) + success, ok := result.(*IpamServiceTemplatesUpdateOK) 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 ipam_route-targets_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for ipam_service-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -2989,7 +4443,7 @@ func (a *Client) IpamServicesBulkDelete(params *IpamServicesBulkDeleteParams, au PathPattern: "/ipam/services/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3028,7 +4482,7 @@ func (a *Client) IpamServicesBulkPartialUpdate(params *IpamServicesBulkPartialUp PathPattern: "/ipam/services/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3067,7 +4521,7 @@ func (a *Client) IpamServicesBulkUpdate(params *IpamServicesBulkUpdateParams, au PathPattern: "/ipam/services/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3106,7 +4560,7 @@ func (a *Client) IpamServicesCreate(params *IpamServicesCreateParams, authInfo r PathPattern: "/ipam/services/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3145,7 +4599,7 @@ func (a *Client) IpamServicesDelete(params *IpamServicesDeleteParams, authInfo r PathPattern: "/ipam/services/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3184,7 +4638,7 @@ func (a *Client) IpamServicesList(params *IpamServicesListParams, authInfo runti PathPattern: "/ipam/services/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3223,7 +4677,7 @@ func (a *Client) IpamServicesPartialUpdate(params *IpamServicesPartialUpdatePara PathPattern: "/ipam/services/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3262,7 +4716,7 @@ func (a *Client) IpamServicesRead(params *IpamServicesReadParams, authInfo runti PathPattern: "/ipam/services/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3301,7 +4755,7 @@ func (a *Client) IpamServicesUpdate(params *IpamServicesUpdateParams, authInfo r PathPattern: "/ipam/services/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamServicesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3326,6 +4780,84 @@ func (a *Client) IpamServicesUpdate(params *IpamServicesUpdateParams, authInfo r panic(msg) } +/* + IpamVlanGroupsAvailableVlansCreate ipam vlan groups available vlans create API +*/ +func (a *Client) IpamVlanGroupsAvailableVlansCreate(params *IpamVlanGroupsAvailableVlansCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsAvailableVlansCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsAvailableVlansCreateParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_vlan-groups_available-vlans_create", + Method: "POST", + PathPattern: "/ipam/vlan-groups/{id}/available-vlans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsAvailableVlansCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsAvailableVlansCreateCreated) + 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 ipam_vlan-groups_available-vlans_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IpamVlanGroupsAvailableVlansList ipam vlan groups available vlans list API +*/ +func (a *Client) IpamVlanGroupsAvailableVlansList(params *IpamVlanGroupsAvailableVlansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*IpamVlanGroupsAvailableVlansListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIpamVlanGroupsAvailableVlansListParams() + } + op := &runtime.ClientOperation{ + ID: "ipam_vlan-groups_available-vlans_list", + Method: "GET", + PathPattern: "/ipam/vlan-groups/{id}/available-vlans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &IpamVlanGroupsAvailableVlansListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*IpamVlanGroupsAvailableVlansListOK) + 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 ipam_vlan-groups_available-vlans_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* IpamVlanGroupsBulkDelete ipam vlan groups bulk delete API */ @@ -3340,7 +4872,7 @@ func (a *Client) IpamVlanGroupsBulkDelete(params *IpamVlanGroupsBulkDeleteParams PathPattern: "/ipam/vlan-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3379,7 +4911,7 @@ func (a *Client) IpamVlanGroupsBulkPartialUpdate(params *IpamVlanGroupsBulkParti PathPattern: "/ipam/vlan-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3418,7 +4950,7 @@ func (a *Client) IpamVlanGroupsBulkUpdate(params *IpamVlanGroupsBulkUpdateParams PathPattern: "/ipam/vlan-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3457,7 +4989,7 @@ func (a *Client) IpamVlanGroupsCreate(params *IpamVlanGroupsCreateParams, authIn PathPattern: "/ipam/vlan-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3496,7 +5028,7 @@ func (a *Client) IpamVlanGroupsDelete(params *IpamVlanGroupsDeleteParams, authIn PathPattern: "/ipam/vlan-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3535,7 +5067,7 @@ func (a *Client) IpamVlanGroupsList(params *IpamVlanGroupsListParams, authInfo r PathPattern: "/ipam/vlan-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3574,7 +5106,7 @@ func (a *Client) IpamVlanGroupsPartialUpdate(params *IpamVlanGroupsPartialUpdate PathPattern: "/ipam/vlan-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3613,7 +5145,7 @@ func (a *Client) IpamVlanGroupsRead(params *IpamVlanGroupsReadParams, authInfo r PathPattern: "/ipam/vlan-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -3652,7 +5184,7 @@ func (a *Client) IpamVlanGroupsUpdate(params *IpamVlanGroupsUpdateParams, authIn PathPattern: "/ipam/vlan-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlanGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3691,7 +5223,7 @@ func (a *Client) IpamVlansBulkDelete(params *IpamVlansBulkDeleteParams, authInfo PathPattern: "/ipam/vlans/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3730,7 +5262,7 @@ func (a *Client) IpamVlansBulkPartialUpdate(params *IpamVlansBulkPartialUpdatePa PathPattern: "/ipam/vlans/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3769,7 +5301,7 @@ func (a *Client) IpamVlansBulkUpdate(params *IpamVlansBulkUpdateParams, authInfo PathPattern: "/ipam/vlans/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3808,7 +5340,7 @@ func (a *Client) IpamVlansCreate(params *IpamVlansCreateParams, authInfo runtime PathPattern: "/ipam/vlans/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3847,7 +5379,7 @@ func (a *Client) IpamVlansDelete(params *IpamVlansDeleteParams, authInfo runtime PathPattern: "/ipam/vlans/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -3886,7 +5418,7 @@ func (a *Client) IpamVlansList(params *IpamVlansListParams, authInfo runtime.Cli PathPattern: "/ipam/vlans/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansListReader{formats: a.formats}, AuthInfo: authInfo, @@ -3925,7 +5457,7 @@ func (a *Client) IpamVlansPartialUpdate(params *IpamVlansPartialUpdateParams, au PathPattern: "/ipam/vlans/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -3964,7 +5496,7 @@ func (a *Client) IpamVlansRead(params *IpamVlansReadParams, authInfo runtime.Cli PathPattern: "/ipam/vlans/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4003,7 +5535,7 @@ func (a *Client) IpamVlansUpdate(params *IpamVlansUpdateParams, authInfo runtime PathPattern: "/ipam/vlans/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVlansUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4042,7 +5574,7 @@ func (a *Client) IpamVrfsBulkDelete(params *IpamVrfsBulkDeleteParams, authInfo r PathPattern: "/ipam/vrfs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4081,7 +5613,7 @@ func (a *Client) IpamVrfsBulkPartialUpdate(params *IpamVrfsBulkPartialUpdatePara PathPattern: "/ipam/vrfs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4120,7 +5652,7 @@ func (a *Client) IpamVrfsBulkUpdate(params *IpamVrfsBulkUpdateParams, authInfo r PathPattern: "/ipam/vrfs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4159,7 +5691,7 @@ func (a *Client) IpamVrfsCreate(params *IpamVrfsCreateParams, authInfo runtime.C PathPattern: "/ipam/vrfs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4198,7 +5730,7 @@ func (a *Client) IpamVrfsDelete(params *IpamVrfsDeleteParams, authInfo runtime.C PathPattern: "/ipam/vrfs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -4237,7 +5769,7 @@ func (a *Client) IpamVrfsList(params *IpamVrfsListParams, authInfo runtime.Clien PathPattern: "/ipam/vrfs/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -4276,7 +5808,7 @@ func (a *Client) IpamVrfsPartialUpdate(params *IpamVrfsPartialUpdateParams, auth PathPattern: "/ipam/vrfs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -4315,7 +5847,7 @@ func (a *Client) IpamVrfsRead(params *IpamVrfsReadParams, authInfo runtime.Clien PathPattern: "/ipam/vrfs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -4354,7 +5886,7 @@ func (a *Client) IpamVrfsUpdate(params *IpamVrfsUpdateParams, authInfo runtime.C PathPattern: "/ipam/vrfs/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &IpamVrfsUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_parameters.go new file mode 100644 index 000000000..c59930c13 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupAssignmentsBulkDeleteParams creates a new IpamFhrpGroupAssignmentsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsBulkDeleteParams() *IpamFhrpGroupAssignmentsBulkDeleteParams { + return &IpamFhrpGroupAssignmentsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsBulkDeleteParamsWithTimeout creates a new IpamFhrpGroupAssignmentsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsBulkDeleteParams { + return &IpamFhrpGroupAssignmentsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsBulkDeleteParamsWithContext creates a new IpamFhrpGroupAssignmentsBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsBulkDeleteParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsBulkDeleteParams { + return &IpamFhrpGroupAssignmentsBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsBulkDeleteParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsBulkDeleteParams { + return &IpamFhrpGroupAssignmentsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsBulkDeleteParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) WithDefaults() *IpamFhrpGroupAssignmentsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments bulk delete params +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments bulk delete params +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments bulk delete params +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments bulk delete params +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments bulk delete params +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments bulk delete params +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsBulkDeleteParams) 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/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_responses.go new file mode 100644 index 000000000..f84603b9f --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamFhrpGroupAssignmentsBulkDeleteReader is a Reader for the IpamFhrpGroupAssignmentsBulkDelete structure. +type IpamFhrpGroupAssignmentsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamFhrpGroupAssignmentsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsBulkDeleteNoContent creates a IpamFhrpGroupAssignmentsBulkDeleteNoContent with default headers values +func NewIpamFhrpGroupAssignmentsBulkDeleteNoContent() *IpamFhrpGroupAssignmentsBulkDeleteNoContent { + return &IpamFhrpGroupAssignmentsBulkDeleteNoContent{} +} + +/* IpamFhrpGroupAssignmentsBulkDeleteNoContent describes a response with status code 204, with default header values. + +IpamFhrpGroupAssignmentsBulkDeleteNoContent ipam fhrp group assignments bulk delete no content +*/ +type IpamFhrpGroupAssignmentsBulkDeleteNoContent struct { +} + +func (o *IpamFhrpGroupAssignmentsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/fhrp-group-assignments/][%d] ipamFhrpGroupAssignmentsBulkDeleteNoContent ", 204) +} + +func (o *IpamFhrpGroupAssignmentsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_parameters.go new file mode 100644 index 000000000..548b5613d --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupAssignmentsBulkPartialUpdateParams creates a new IpamFhrpGroupAssignmentsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsBulkPartialUpdateParams() *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + return &IpamFhrpGroupAssignmentsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsBulkPartialUpdateParamsWithTimeout creates a new IpamFhrpGroupAssignmentsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + return &IpamFhrpGroupAssignmentsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsBulkPartialUpdateParamsWithContext creates a new IpamFhrpGroupAssignmentsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + return &IpamFhrpGroupAssignmentsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsBulkPartialUpdateParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + return &IpamFhrpGroupAssignmentsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableFHRPGroupAssignment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) WithDefaults() *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) WithData(data *models.WritableFHRPGroupAssignment) *IpamFhrpGroupAssignmentsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp group assignments bulk partial update params +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) SetData(data *models.WritableFHRPGroupAssignment) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_responses.go new file mode 100644 index 000000000..dd4825a48 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsBulkPartialUpdateReader is a Reader for the IpamFhrpGroupAssignmentsBulkPartialUpdate structure. +type IpamFhrpGroupAssignmentsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupAssignmentsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsBulkPartialUpdateOK creates a IpamFhrpGroupAssignmentsBulkPartialUpdateOK with default headers values +func NewIpamFhrpGroupAssignmentsBulkPartialUpdateOK() *IpamFhrpGroupAssignmentsBulkPartialUpdateOK { + return &IpamFhrpGroupAssignmentsBulkPartialUpdateOK{} +} + +/* IpamFhrpGroupAssignmentsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupAssignmentsBulkPartialUpdateOK ipam fhrp group assignments bulk partial update o k +*/ +type IpamFhrpGroupAssignmentsBulkPartialUpdateOK struct { + Payload *models.FHRPGroupAssignment +} + +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/fhrp-group-assignments/][%d] ipamFhrpGroupAssignmentsBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateOK) GetPayload() *models.FHRPGroupAssignment { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroupAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_parameters.go new file mode 100644 index 000000000..95e91c85a --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupAssignmentsBulkUpdateParams creates a new IpamFhrpGroupAssignmentsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsBulkUpdateParams() *IpamFhrpGroupAssignmentsBulkUpdateParams { + return &IpamFhrpGroupAssignmentsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsBulkUpdateParamsWithTimeout creates a new IpamFhrpGroupAssignmentsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsBulkUpdateParams { + return &IpamFhrpGroupAssignmentsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsBulkUpdateParamsWithContext creates a new IpamFhrpGroupAssignmentsBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsBulkUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsBulkUpdateParams { + return &IpamFhrpGroupAssignmentsBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsBulkUpdateParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsBulkUpdateParams { + return &IpamFhrpGroupAssignmentsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsBulkUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsBulkUpdateParams struct { + + // Data. + Data *models.WritableFHRPGroupAssignment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) WithDefaults() *IpamFhrpGroupAssignmentsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) WithData(data *models.WritableFHRPGroupAssignment) *IpamFhrpGroupAssignmentsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp group assignments bulk update params +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) SetData(data *models.WritableFHRPGroupAssignment) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_responses.go new file mode 100644 index 000000000..8b695e8b4 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsBulkUpdateReader is a Reader for the IpamFhrpGroupAssignmentsBulkUpdate structure. +type IpamFhrpGroupAssignmentsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupAssignmentsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsBulkUpdateOK creates a IpamFhrpGroupAssignmentsBulkUpdateOK with default headers values +func NewIpamFhrpGroupAssignmentsBulkUpdateOK() *IpamFhrpGroupAssignmentsBulkUpdateOK { + return &IpamFhrpGroupAssignmentsBulkUpdateOK{} +} + +/* IpamFhrpGroupAssignmentsBulkUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupAssignmentsBulkUpdateOK ipam fhrp group assignments bulk update o k +*/ +type IpamFhrpGroupAssignmentsBulkUpdateOK struct { + Payload *models.FHRPGroupAssignment +} + +func (o *IpamFhrpGroupAssignmentsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/fhrp-group-assignments/][%d] ipamFhrpGroupAssignmentsBulkUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsBulkUpdateOK) GetPayload() *models.FHRPGroupAssignment { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroupAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_create_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_create_parameters.go new file mode 100644 index 000000000..e6bf2ef9b --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_create_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupAssignmentsCreateParams creates a new IpamFhrpGroupAssignmentsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsCreateParams() *IpamFhrpGroupAssignmentsCreateParams { + return &IpamFhrpGroupAssignmentsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsCreateParamsWithTimeout creates a new IpamFhrpGroupAssignmentsCreateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsCreateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsCreateParams { + return &IpamFhrpGroupAssignmentsCreateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsCreateParamsWithContext creates a new IpamFhrpGroupAssignmentsCreateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsCreateParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsCreateParams { + return &IpamFhrpGroupAssignmentsCreateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsCreateParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsCreateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsCreateParams { + return &IpamFhrpGroupAssignmentsCreateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsCreateParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments create operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsCreateParams struct { + + // Data. + Data *models.WritableFHRPGroupAssignment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsCreateParams) WithDefaults() *IpamFhrpGroupAssignmentsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) WithData(data *models.WritableFHRPGroupAssignment) *IpamFhrpGroupAssignmentsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp group assignments create params +func (o *IpamFhrpGroupAssignmentsCreateParams) SetData(data *models.WritableFHRPGroupAssignment) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_create_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_create_responses.go new file mode 100644 index 000000000..10346dde8 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_create_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsCreateReader is a Reader for the IpamFhrpGroupAssignmentsCreate structure. +type IpamFhrpGroupAssignmentsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamFhrpGroupAssignmentsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsCreateCreated creates a IpamFhrpGroupAssignmentsCreateCreated with default headers values +func NewIpamFhrpGroupAssignmentsCreateCreated() *IpamFhrpGroupAssignmentsCreateCreated { + return &IpamFhrpGroupAssignmentsCreateCreated{} +} + +/* IpamFhrpGroupAssignmentsCreateCreated describes a response with status code 201, with default header values. + +IpamFhrpGroupAssignmentsCreateCreated ipam fhrp group assignments create created +*/ +type IpamFhrpGroupAssignmentsCreateCreated struct { + Payload *models.FHRPGroupAssignment +} + +func (o *IpamFhrpGroupAssignmentsCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/fhrp-group-assignments/][%d] ipamFhrpGroupAssignmentsCreateCreated %+v", 201, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsCreateCreated) GetPayload() *models.FHRPGroupAssignment { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroupAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_delete_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_delete_parameters.go new file mode 100644 index 000000000..e819a0d83 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupAssignmentsDeleteParams creates a new IpamFhrpGroupAssignmentsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsDeleteParams() *IpamFhrpGroupAssignmentsDeleteParams { + return &IpamFhrpGroupAssignmentsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsDeleteParamsWithTimeout creates a new IpamFhrpGroupAssignmentsDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsDeleteParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsDeleteParams { + return &IpamFhrpGroupAssignmentsDeleteParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsDeleteParamsWithContext creates a new IpamFhrpGroupAssignmentsDeleteParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsDeleteParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsDeleteParams { + return &IpamFhrpGroupAssignmentsDeleteParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsDeleteParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsDeleteParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsDeleteParams { + return &IpamFhrpGroupAssignmentsDeleteParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsDeleteParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments delete operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsDeleteParams struct { + + /* ID. + + A unique integer value identifying this FHRP group assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsDeleteParams) WithDefaults() *IpamFhrpGroupAssignmentsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) WithID(id int64) *IpamFhrpGroupAssignmentsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp group assignments delete params +func (o *IpamFhrpGroupAssignmentsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsDeleteParams) 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/netbox/client/ipam/ipam_fhrp_group_assignments_delete_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_delete_responses.go new file mode 100644 index 000000000..660a72e31 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamFhrpGroupAssignmentsDeleteReader is a Reader for the IpamFhrpGroupAssignmentsDelete structure. +type IpamFhrpGroupAssignmentsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamFhrpGroupAssignmentsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsDeleteNoContent creates a IpamFhrpGroupAssignmentsDeleteNoContent with default headers values +func NewIpamFhrpGroupAssignmentsDeleteNoContent() *IpamFhrpGroupAssignmentsDeleteNoContent { + return &IpamFhrpGroupAssignmentsDeleteNoContent{} +} + +/* IpamFhrpGroupAssignmentsDeleteNoContent describes a response with status code 204, with default header values. + +IpamFhrpGroupAssignmentsDeleteNoContent ipam fhrp group assignments delete no content +*/ +type IpamFhrpGroupAssignmentsDeleteNoContent struct { +} + +func (o *IpamFhrpGroupAssignmentsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/fhrp-group-assignments/{id}/][%d] ipamFhrpGroupAssignmentsDeleteNoContent ", 204) +} + +func (o *IpamFhrpGroupAssignmentsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go new file mode 100644 index 000000000..6a2538cf9 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_list_parameters.go @@ -0,0 +1,1079 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupAssignmentsListParams creates a new IpamFhrpGroupAssignmentsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsListParams() *IpamFhrpGroupAssignmentsListParams { + return &IpamFhrpGroupAssignmentsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsListParamsWithTimeout creates a new IpamFhrpGroupAssignmentsListParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsListParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsListParams { + return &IpamFhrpGroupAssignmentsListParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsListParamsWithContext creates a new IpamFhrpGroupAssignmentsListParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsListParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsListParams { + return &IpamFhrpGroupAssignmentsListParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsListParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsListParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsListParams { + return &IpamFhrpGroupAssignmentsListParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsListParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments list operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // GroupID. + GroupID *string + + // GroupIDn. + GroupIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // InterfaceID. + InterfaceID *string + + // InterfaceIDGt. + InterfaceIDGt *string + + // InterfaceIDGte. + InterfaceIDGte *string + + // InterfaceIDLt. + InterfaceIDLt *string + + // InterfaceIDLte. + InterfaceIDLte *string + + // InterfaceIDn. + InterfaceIDn *string + + // InterfaceType. + InterfaceType *string + + // InterfaceTypen. + InterfaceTypen *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Priority. + Priority *string + + // PriorityGt. + PriorityGt *string + + // PriorityGte. + PriorityGte *string + + // PriorityLt. + PriorityLt *string + + // PriorityLte. + PriorityLte *string + + // Priorityn. + Priorityn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsListParams) WithDefaults() *IpamFhrpGroupAssignmentsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithCreated(created *string) *IpamFhrpGroupAssignmentsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedGte(createdGte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithCreatedLte(createdLte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithGroupID adds the groupID to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithGroupID(groupID *string) *IpamFhrpGroupAssignmentsListParams { + o.SetGroupID(groupID) + return o +} + +// SetGroupID adds the groupId to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetGroupID(groupID *string) { + o.GroupID = groupID +} + +// WithGroupIDn adds the groupIDn to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithGroupIDn(groupIDn *string) *IpamFhrpGroupAssignmentsListParams { + o.SetGroupIDn(groupIDn) + return o +} + +// SetGroupIDn adds the groupIdN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetGroupIDn(groupIDn *string) { + o.GroupIDn = groupIDn +} + +// WithID adds the id to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithID(id *string) *IpamFhrpGroupAssignmentsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithIDGt(iDGt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithIDGte(iDGte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithIDLt(iDLt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithIDLte(iDLte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithIDn(iDn *string) *IpamFhrpGroupAssignmentsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithInterfaceID adds the interfaceID to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceID(interfaceID *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceID(interfaceID) + return o +} + +// SetInterfaceID adds the interfaceId to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceID(interfaceID *string) { + o.InterfaceID = interfaceID +} + +// WithInterfaceIDGt adds the interfaceIDGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceIDGt(interfaceIDGt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceIDGt(interfaceIDGt) + return o +} + +// SetInterfaceIDGt adds the interfaceIdGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceIDGt(interfaceIDGt *string) { + o.InterfaceIDGt = interfaceIDGt +} + +// WithInterfaceIDGte adds the interfaceIDGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceIDGte(interfaceIDGte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceIDGte(interfaceIDGte) + return o +} + +// SetInterfaceIDGte adds the interfaceIdGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceIDGte(interfaceIDGte *string) { + o.InterfaceIDGte = interfaceIDGte +} + +// WithInterfaceIDLt adds the interfaceIDLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceIDLt(interfaceIDLt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceIDLt(interfaceIDLt) + return o +} + +// SetInterfaceIDLt adds the interfaceIdLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceIDLt(interfaceIDLt *string) { + o.InterfaceIDLt = interfaceIDLt +} + +// WithInterfaceIDLte adds the interfaceIDLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceIDLte(interfaceIDLte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceIDLte(interfaceIDLte) + return o +} + +// SetInterfaceIDLte adds the interfaceIdLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceIDLte(interfaceIDLte *string) { + o.InterfaceIDLte = interfaceIDLte +} + +// WithInterfaceIDn adds the interfaceIDn to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceIDn(interfaceIDn *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceIDn(interfaceIDn) + return o +} + +// SetInterfaceIDn adds the interfaceIdN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceIDn(interfaceIDn *string) { + o.InterfaceIDn = interfaceIDn +} + +// WithInterfaceType adds the interfaceType to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceType(interfaceType *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceType(interfaceType) + return o +} + +// SetInterfaceType adds the interfaceType to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceType(interfaceType *string) { + o.InterfaceType = interfaceType +} + +// WithInterfaceTypen adds the interfaceTypen to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithInterfaceTypen(interfaceTypen *string) *IpamFhrpGroupAssignmentsListParams { + o.SetInterfaceTypen(interfaceTypen) + return o +} + +// SetInterfaceTypen adds the interfaceTypeN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetInterfaceTypen(interfaceTypen *string) { + o.InterfaceTypen = interfaceTypen +} + +// WithLastUpdated adds the lastUpdated to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdated(lastUpdated *string) *IpamFhrpGroupAssignmentsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithLimit(limit *int64) *IpamFhrpGroupAssignmentsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithOffset(offset *int64) *IpamFhrpGroupAssignmentsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPriority adds the priority to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithPriority(priority *string) *IpamFhrpGroupAssignmentsListParams { + o.SetPriority(priority) + return o +} + +// SetPriority adds the priority to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetPriority(priority *string) { + o.Priority = priority +} + +// WithPriorityGt adds the priorityGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithPriorityGt(priorityGt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetPriorityGt(priorityGt) + return o +} + +// SetPriorityGt adds the priorityGt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetPriorityGt(priorityGt *string) { + o.PriorityGt = priorityGt +} + +// WithPriorityGte adds the priorityGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithPriorityGte(priorityGte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetPriorityGte(priorityGte) + return o +} + +// SetPriorityGte adds the priorityGte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetPriorityGte(priorityGte *string) { + o.PriorityGte = priorityGte +} + +// WithPriorityLt adds the priorityLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithPriorityLt(priorityLt *string) *IpamFhrpGroupAssignmentsListParams { + o.SetPriorityLt(priorityLt) + return o +} + +// SetPriorityLt adds the priorityLt to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetPriorityLt(priorityLt *string) { + o.PriorityLt = priorityLt +} + +// WithPriorityLte adds the priorityLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithPriorityLte(priorityLte *string) *IpamFhrpGroupAssignmentsListParams { + o.SetPriorityLte(priorityLte) + return o +} + +// SetPriorityLte adds the priorityLte to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetPriorityLte(priorityLte *string) { + o.PriorityLte = priorityLte +} + +// WithPriorityn adds the priorityn to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) WithPriorityn(priorityn *string) *IpamFhrpGroupAssignmentsListParams { + o.SetPriorityn(priorityn) + return o +} + +// SetPriorityn adds the priorityN to the ipam fhrp group assignments list params +func (o *IpamFhrpGroupAssignmentsListParams) SetPriorityn(priorityn *string) { + o.Priorityn = priorityn +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.GroupID != nil { + + // query param group_id + var qrGroupID string + + if o.GroupID != nil { + qrGroupID = *o.GroupID + } + qGroupID := qrGroupID + if qGroupID != "" { + + if err := r.SetQueryParam("group_id", qGroupID); err != nil { + return err + } + } + } + + if o.GroupIDn != nil { + + // query param group_id__n + var qrGroupIDn string + + if o.GroupIDn != nil { + qrGroupIDn = *o.GroupIDn + } + qGroupIDn := qrGroupIDn + if qGroupIDn != "" { + + if err := r.SetQueryParam("group_id__n", qGroupIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.InterfaceID != nil { + + // query param interface_id + var qrInterfaceID string + + if o.InterfaceID != nil { + qrInterfaceID = *o.InterfaceID + } + qInterfaceID := qrInterfaceID + if qInterfaceID != "" { + + if err := r.SetQueryParam("interface_id", qInterfaceID); err != nil { + return err + } + } + } + + if o.InterfaceIDGt != nil { + + // query param interface_id__gt + var qrInterfaceIDGt string + + if o.InterfaceIDGt != nil { + qrInterfaceIDGt = *o.InterfaceIDGt + } + qInterfaceIDGt := qrInterfaceIDGt + if qInterfaceIDGt != "" { + + if err := r.SetQueryParam("interface_id__gt", qInterfaceIDGt); err != nil { + return err + } + } + } + + if o.InterfaceIDGte != nil { + + // query param interface_id__gte + var qrInterfaceIDGte string + + if o.InterfaceIDGte != nil { + qrInterfaceIDGte = *o.InterfaceIDGte + } + qInterfaceIDGte := qrInterfaceIDGte + if qInterfaceIDGte != "" { + + if err := r.SetQueryParam("interface_id__gte", qInterfaceIDGte); err != nil { + return err + } + } + } + + if o.InterfaceIDLt != nil { + + // query param interface_id__lt + var qrInterfaceIDLt string + + if o.InterfaceIDLt != nil { + qrInterfaceIDLt = *o.InterfaceIDLt + } + qInterfaceIDLt := qrInterfaceIDLt + if qInterfaceIDLt != "" { + + if err := r.SetQueryParam("interface_id__lt", qInterfaceIDLt); err != nil { + return err + } + } + } + + if o.InterfaceIDLte != nil { + + // query param interface_id__lte + var qrInterfaceIDLte string + + if o.InterfaceIDLte != nil { + qrInterfaceIDLte = *o.InterfaceIDLte + } + qInterfaceIDLte := qrInterfaceIDLte + if qInterfaceIDLte != "" { + + if err := r.SetQueryParam("interface_id__lte", qInterfaceIDLte); err != nil { + return err + } + } + } + + if o.InterfaceIDn != nil { + + // query param interface_id__n + var qrInterfaceIDn string + + if o.InterfaceIDn != nil { + qrInterfaceIDn = *o.InterfaceIDn + } + qInterfaceIDn := qrInterfaceIDn + if qInterfaceIDn != "" { + + if err := r.SetQueryParam("interface_id__n", qInterfaceIDn); err != nil { + return err + } + } + } + + if o.InterfaceType != nil { + + // query param interface_type + var qrInterfaceType string + + if o.InterfaceType != nil { + qrInterfaceType = *o.InterfaceType + } + qInterfaceType := qrInterfaceType + if qInterfaceType != "" { + + if err := r.SetQueryParam("interface_type", qInterfaceType); err != nil { + return err + } + } + } + + if o.InterfaceTypen != nil { + + // query param interface_type__n + var qrInterfaceTypen string + + if o.InterfaceTypen != nil { + qrInterfaceTypen = *o.InterfaceTypen + } + qInterfaceTypen := qrInterfaceTypen + if qInterfaceTypen != "" { + + if err := r.SetQueryParam("interface_type__n", qInterfaceTypen); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Priority != nil { + + // query param priority + var qrPriority string + + if o.Priority != nil { + qrPriority = *o.Priority + } + qPriority := qrPriority + if qPriority != "" { + + if err := r.SetQueryParam("priority", qPriority); err != nil { + return err + } + } + } + + if o.PriorityGt != nil { + + // query param priority__gt + var qrPriorityGt string + + if o.PriorityGt != nil { + qrPriorityGt = *o.PriorityGt + } + qPriorityGt := qrPriorityGt + if qPriorityGt != "" { + + if err := r.SetQueryParam("priority__gt", qPriorityGt); err != nil { + return err + } + } + } + + if o.PriorityGte != nil { + + // query param priority__gte + var qrPriorityGte string + + if o.PriorityGte != nil { + qrPriorityGte = *o.PriorityGte + } + qPriorityGte := qrPriorityGte + if qPriorityGte != "" { + + if err := r.SetQueryParam("priority__gte", qPriorityGte); err != nil { + return err + } + } + } + + if o.PriorityLt != nil { + + // query param priority__lt + var qrPriorityLt string + + if o.PriorityLt != nil { + qrPriorityLt = *o.PriorityLt + } + qPriorityLt := qrPriorityLt + if qPriorityLt != "" { + + if err := r.SetQueryParam("priority__lt", qPriorityLt); err != nil { + return err + } + } + } + + if o.PriorityLte != nil { + + // query param priority__lte + var qrPriorityLte string + + if o.PriorityLte != nil { + qrPriorityLte = *o.PriorityLte + } + qPriorityLte := qrPriorityLte + if qPriorityLte != "" { + + if err := r.SetQueryParam("priority__lte", qPriorityLte); err != nil { + return err + } + } + } + + if o.Priorityn != nil { + + // query param priority__n + var qrPriorityn string + + if o.Priorityn != nil { + qrPriorityn = *o.Priorityn + } + qPriorityn := qrPriorityn + if qPriorityn != "" { + + if err := r.SetQueryParam("priority__n", qPriorityn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_list_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_list_responses.go new file mode 100644 index 000000000..acd9f36de --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_list_responses.go @@ -0,0 +1,247 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsListReader is a Reader for the IpamFhrpGroupAssignmentsList structure. +type IpamFhrpGroupAssignmentsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupAssignmentsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsListOK creates a IpamFhrpGroupAssignmentsListOK with default headers values +func NewIpamFhrpGroupAssignmentsListOK() *IpamFhrpGroupAssignmentsListOK { + return &IpamFhrpGroupAssignmentsListOK{} +} + +/* IpamFhrpGroupAssignmentsListOK describes a response with status code 200, with default header values. + +IpamFhrpGroupAssignmentsListOK ipam fhrp group assignments list o k +*/ +type IpamFhrpGroupAssignmentsListOK struct { + Payload *IpamFhrpGroupAssignmentsListOKBody +} + +func (o *IpamFhrpGroupAssignmentsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/fhrp-group-assignments/][%d] ipamFhrpGroupAssignmentsListOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsListOK) GetPayload() *IpamFhrpGroupAssignmentsListOKBody { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(IpamFhrpGroupAssignmentsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*IpamFhrpGroupAssignmentsListOKBody ipam fhrp group assignments list o k body +swagger:model IpamFhrpGroupAssignmentsListOKBody +*/ +type IpamFhrpGroupAssignmentsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.FHRPGroupAssignment `json:"results"` +} + +// Validate validates this ipam fhrp group assignments list o k body +func (o *IpamFhrpGroupAssignmentsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamFhrpGroupAssignmentsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("ipamFhrpGroupAssignmentsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *IpamFhrpGroupAssignmentsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("ipamFhrpGroupAssignmentsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamFhrpGroupAssignmentsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("ipamFhrpGroupAssignmentsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamFhrpGroupAssignmentsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("ipamFhrpGroupAssignmentsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamFhrpGroupAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamFhrpGroupAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this ipam fhrp group assignments list o k body based on the context it is used +func (o *IpamFhrpGroupAssignmentsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamFhrpGroupAssignmentsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamFhrpGroupAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamFhrpGroupAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *IpamFhrpGroupAssignmentsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *IpamFhrpGroupAssignmentsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamFhrpGroupAssignmentsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_parameters.go new file mode 100644 index 000000000..9755bb67c --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupAssignmentsPartialUpdateParams creates a new IpamFhrpGroupAssignmentsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsPartialUpdateParams() *IpamFhrpGroupAssignmentsPartialUpdateParams { + return &IpamFhrpGroupAssignmentsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsPartialUpdateParamsWithTimeout creates a new IpamFhrpGroupAssignmentsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsPartialUpdateParams { + return &IpamFhrpGroupAssignmentsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsPartialUpdateParamsWithContext creates a new IpamFhrpGroupAssignmentsPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsPartialUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsPartialUpdateParams { + return &IpamFhrpGroupAssignmentsPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsPartialUpdateParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsPartialUpdateParams { + return &IpamFhrpGroupAssignmentsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsPartialUpdateParams struct { + + // Data. + Data *models.WritableFHRPGroupAssignment + + /* ID. + + A unique integer value identifying this FHRP group assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WithDefaults() *IpamFhrpGroupAssignmentsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WithData(data *models.WritableFHRPGroupAssignment) *IpamFhrpGroupAssignmentsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) SetData(data *models.WritableFHRPGroupAssignment) { + o.Data = data +} + +// WithID adds the id to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WithID(id int64) *IpamFhrpGroupAssignmentsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp group assignments partial update params +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_responses.go new file mode 100644 index 000000000..2858c1fd6 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsPartialUpdateReader is a Reader for the IpamFhrpGroupAssignmentsPartialUpdate structure. +type IpamFhrpGroupAssignmentsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupAssignmentsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsPartialUpdateOK creates a IpamFhrpGroupAssignmentsPartialUpdateOK with default headers values +func NewIpamFhrpGroupAssignmentsPartialUpdateOK() *IpamFhrpGroupAssignmentsPartialUpdateOK { + return &IpamFhrpGroupAssignmentsPartialUpdateOK{} +} + +/* IpamFhrpGroupAssignmentsPartialUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupAssignmentsPartialUpdateOK ipam fhrp group assignments partial update o k +*/ +type IpamFhrpGroupAssignmentsPartialUpdateOK struct { + Payload *models.FHRPGroupAssignment +} + +func (o *IpamFhrpGroupAssignmentsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/fhrp-group-assignments/{id}/][%d] ipamFhrpGroupAssignmentsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsPartialUpdateOK) GetPayload() *models.FHRPGroupAssignment { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroupAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_read_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_read_parameters.go new file mode 100644 index 000000000..7bb900a64 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_read_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupAssignmentsReadParams creates a new IpamFhrpGroupAssignmentsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsReadParams() *IpamFhrpGroupAssignmentsReadParams { + return &IpamFhrpGroupAssignmentsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsReadParamsWithTimeout creates a new IpamFhrpGroupAssignmentsReadParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsReadParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsReadParams { + return &IpamFhrpGroupAssignmentsReadParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsReadParamsWithContext creates a new IpamFhrpGroupAssignmentsReadParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsReadParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsReadParams { + return &IpamFhrpGroupAssignmentsReadParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsReadParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsReadParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsReadParams { + return &IpamFhrpGroupAssignmentsReadParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsReadParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments read operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsReadParams struct { + + /* ID. + + A unique integer value identifying this FHRP group assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsReadParams) WithDefaults() *IpamFhrpGroupAssignmentsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) WithID(id int64) *IpamFhrpGroupAssignmentsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp group assignments read params +func (o *IpamFhrpGroupAssignmentsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsReadParams) 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/netbox/client/ipam/ipam_fhrp_group_assignments_read_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_read_responses.go new file mode 100644 index 000000000..bcabefef5 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_read_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsReadReader is a Reader for the IpamFhrpGroupAssignmentsRead structure. +type IpamFhrpGroupAssignmentsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupAssignmentsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsReadOK creates a IpamFhrpGroupAssignmentsReadOK with default headers values +func NewIpamFhrpGroupAssignmentsReadOK() *IpamFhrpGroupAssignmentsReadOK { + return &IpamFhrpGroupAssignmentsReadOK{} +} + +/* IpamFhrpGroupAssignmentsReadOK describes a response with status code 200, with default header values. + +IpamFhrpGroupAssignmentsReadOK ipam fhrp group assignments read o k +*/ +type IpamFhrpGroupAssignmentsReadOK struct { + Payload *models.FHRPGroupAssignment +} + +func (o *IpamFhrpGroupAssignmentsReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/fhrp-group-assignments/{id}/][%d] ipamFhrpGroupAssignmentsReadOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsReadOK) GetPayload() *models.FHRPGroupAssignment { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroupAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_group_assignments_update_parameters.go b/netbox/client/ipam/ipam_fhrp_group_assignments_update_parameters.go new file mode 100644 index 000000000..ddace37a4 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupAssignmentsUpdateParams creates a new IpamFhrpGroupAssignmentsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupAssignmentsUpdateParams() *IpamFhrpGroupAssignmentsUpdateParams { + return &IpamFhrpGroupAssignmentsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupAssignmentsUpdateParamsWithTimeout creates a new IpamFhrpGroupAssignmentsUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupAssignmentsUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsUpdateParams { + return &IpamFhrpGroupAssignmentsUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupAssignmentsUpdateParamsWithContext creates a new IpamFhrpGroupAssignmentsUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupAssignmentsUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupAssignmentsUpdateParams { + return &IpamFhrpGroupAssignmentsUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupAssignmentsUpdateParamsWithHTTPClient creates a new IpamFhrpGroupAssignmentsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupAssignmentsUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsUpdateParams { + return &IpamFhrpGroupAssignmentsUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupAssignmentsUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp group assignments update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupAssignmentsUpdateParams struct { + + // Data. + Data *models.WritableFHRPGroupAssignment + + /* ID. + + A unique integer value identifying this FHRP group assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp group assignments update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsUpdateParams) WithDefaults() *IpamFhrpGroupAssignmentsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp group assignments update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupAssignmentsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupAssignmentsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupAssignmentsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupAssignmentsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) WithData(data *models.WritableFHRPGroupAssignment) *IpamFhrpGroupAssignmentsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) SetData(data *models.WritableFHRPGroupAssignment) { + o.Data = data +} + +// WithID adds the id to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) WithID(id int64) *IpamFhrpGroupAssignmentsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp group assignments update params +func (o *IpamFhrpGroupAssignmentsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupAssignmentsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_fhrp_group_assignments_update_responses.go b/netbox/client/ipam/ipam_fhrp_group_assignments_update_responses.go new file mode 100644 index 000000000..894d0c015 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_group_assignments_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupAssignmentsUpdateReader is a Reader for the IpamFhrpGroupAssignmentsUpdate structure. +type IpamFhrpGroupAssignmentsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupAssignmentsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupAssignmentsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupAssignmentsUpdateOK creates a IpamFhrpGroupAssignmentsUpdateOK with default headers values +func NewIpamFhrpGroupAssignmentsUpdateOK() *IpamFhrpGroupAssignmentsUpdateOK { + return &IpamFhrpGroupAssignmentsUpdateOK{} +} + +/* IpamFhrpGroupAssignmentsUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupAssignmentsUpdateOK ipam fhrp group assignments update o k +*/ +type IpamFhrpGroupAssignmentsUpdateOK struct { + Payload *models.FHRPGroupAssignment +} + +func (o *IpamFhrpGroupAssignmentsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/fhrp-group-assignments/{id}/][%d] ipamFhrpGroupAssignmentsUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupAssignmentsUpdateOK) GetPayload() *models.FHRPGroupAssignment { + return o.Payload +} + +func (o *IpamFhrpGroupAssignmentsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroupAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_bulk_delete_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_bulk_delete_parameters.go new file mode 100644 index 000000000..14d0df628 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupsBulkDeleteParams creates a new IpamFhrpGroupsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsBulkDeleteParams() *IpamFhrpGroupsBulkDeleteParams { + return &IpamFhrpGroupsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsBulkDeleteParamsWithTimeout creates a new IpamFhrpGroupsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsBulkDeleteParams { + return &IpamFhrpGroupsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsBulkDeleteParamsWithContext creates a new IpamFhrpGroupsBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsBulkDeleteParamsWithContext(ctx context.Context) *IpamFhrpGroupsBulkDeleteParams { + return &IpamFhrpGroupsBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsBulkDeleteParamsWithHTTPClient creates a new IpamFhrpGroupsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsBulkDeleteParams { + return &IpamFhrpGroupsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsBulkDeleteParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsBulkDeleteParams) WithDefaults() *IpamFhrpGroupsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups bulk delete params +func (o *IpamFhrpGroupsBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups bulk delete params +func (o *IpamFhrpGroupsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups bulk delete params +func (o *IpamFhrpGroupsBulkDeleteParams) WithContext(ctx context.Context) *IpamFhrpGroupsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups bulk delete params +func (o *IpamFhrpGroupsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups bulk delete params +func (o *IpamFhrpGroupsBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups bulk delete params +func (o *IpamFhrpGroupsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsBulkDeleteParams) 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/netbox/client/ipam/ipam_fhrp_groups_bulk_delete_responses.go b/netbox/client/ipam/ipam_fhrp_groups_bulk_delete_responses.go new file mode 100644 index 000000000..544a412be --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamFhrpGroupsBulkDeleteReader is a Reader for the IpamFhrpGroupsBulkDelete structure. +type IpamFhrpGroupsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamFhrpGroupsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsBulkDeleteNoContent creates a IpamFhrpGroupsBulkDeleteNoContent with default headers values +func NewIpamFhrpGroupsBulkDeleteNoContent() *IpamFhrpGroupsBulkDeleteNoContent { + return &IpamFhrpGroupsBulkDeleteNoContent{} +} + +/* IpamFhrpGroupsBulkDeleteNoContent describes a response with status code 204, with default header values. + +IpamFhrpGroupsBulkDeleteNoContent ipam fhrp groups bulk delete no content +*/ +type IpamFhrpGroupsBulkDeleteNoContent struct { +} + +func (o *IpamFhrpGroupsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/fhrp-groups/][%d] ipamFhrpGroupsBulkDeleteNoContent ", 204) +} + +func (o *IpamFhrpGroupsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_parameters.go new file mode 100644 index 000000000..b7989946f --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupsBulkPartialUpdateParams creates a new IpamFhrpGroupsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsBulkPartialUpdateParams() *IpamFhrpGroupsBulkPartialUpdateParams { + return &IpamFhrpGroupsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsBulkPartialUpdateParamsWithTimeout creates a new IpamFhrpGroupsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsBulkPartialUpdateParams { + return &IpamFhrpGroupsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsBulkPartialUpdateParamsWithContext creates a new IpamFhrpGroupsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupsBulkPartialUpdateParams { + return &IpamFhrpGroupsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsBulkPartialUpdateParamsWithHTTPClient creates a new IpamFhrpGroupsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsBulkPartialUpdateParams { + return &IpamFhrpGroupsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsBulkPartialUpdateParams struct { + + // Data. + Data *models.FHRPGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsBulkPartialUpdateParams) WithDefaults() *IpamFhrpGroupsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) WithData(data *models.FHRPGroup) *IpamFhrpGroupsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp groups bulk partial update params +func (o *IpamFhrpGroupsBulkPartialUpdateParams) SetData(data *models.FHRPGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_responses.go b/netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_responses.go new file mode 100644 index 000000000..17ec4c00f --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsBulkPartialUpdateReader is a Reader for the IpamFhrpGroupsBulkPartialUpdate structure. +type IpamFhrpGroupsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsBulkPartialUpdateOK creates a IpamFhrpGroupsBulkPartialUpdateOK with default headers values +func NewIpamFhrpGroupsBulkPartialUpdateOK() *IpamFhrpGroupsBulkPartialUpdateOK { + return &IpamFhrpGroupsBulkPartialUpdateOK{} +} + +/* IpamFhrpGroupsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupsBulkPartialUpdateOK ipam fhrp groups bulk partial update o k +*/ +type IpamFhrpGroupsBulkPartialUpdateOK struct { + Payload *models.FHRPGroup +} + +func (o *IpamFhrpGroupsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/fhrp-groups/][%d] ipamFhrpGroupsBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupsBulkPartialUpdateOK) GetPayload() *models.FHRPGroup { + return o.Payload +} + +func (o *IpamFhrpGroupsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_bulk_update_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_bulk_update_parameters.go new file mode 100644 index 000000000..d5a4a22d9 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupsBulkUpdateParams creates a new IpamFhrpGroupsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsBulkUpdateParams() *IpamFhrpGroupsBulkUpdateParams { + return &IpamFhrpGroupsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsBulkUpdateParamsWithTimeout creates a new IpamFhrpGroupsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsBulkUpdateParams { + return &IpamFhrpGroupsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsBulkUpdateParamsWithContext creates a new IpamFhrpGroupsBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsBulkUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupsBulkUpdateParams { + return &IpamFhrpGroupsBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsBulkUpdateParamsWithHTTPClient creates a new IpamFhrpGroupsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsBulkUpdateParams { + return &IpamFhrpGroupsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsBulkUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsBulkUpdateParams struct { + + // Data. + Data *models.FHRPGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsBulkUpdateParams) WithDefaults() *IpamFhrpGroupsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) WithData(data *models.FHRPGroup) *IpamFhrpGroupsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp groups bulk update params +func (o *IpamFhrpGroupsBulkUpdateParams) SetData(data *models.FHRPGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_bulk_update_responses.go b/netbox/client/ipam/ipam_fhrp_groups_bulk_update_responses.go new file mode 100644 index 000000000..feb40b8bc --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsBulkUpdateReader is a Reader for the IpamFhrpGroupsBulkUpdate structure. +type IpamFhrpGroupsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsBulkUpdateOK creates a IpamFhrpGroupsBulkUpdateOK with default headers values +func NewIpamFhrpGroupsBulkUpdateOK() *IpamFhrpGroupsBulkUpdateOK { + return &IpamFhrpGroupsBulkUpdateOK{} +} + +/* IpamFhrpGroupsBulkUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupsBulkUpdateOK ipam fhrp groups bulk update o k +*/ +type IpamFhrpGroupsBulkUpdateOK struct { + Payload *models.FHRPGroup +} + +func (o *IpamFhrpGroupsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/fhrp-groups/][%d] ipamFhrpGroupsBulkUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupsBulkUpdateOK) GetPayload() *models.FHRPGroup { + return o.Payload +} + +func (o *IpamFhrpGroupsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_create_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_create_parameters.go new file mode 100644 index 000000000..953ff4270 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_create_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupsCreateParams creates a new IpamFhrpGroupsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsCreateParams() *IpamFhrpGroupsCreateParams { + return &IpamFhrpGroupsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsCreateParamsWithTimeout creates a new IpamFhrpGroupsCreateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsCreateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsCreateParams { + return &IpamFhrpGroupsCreateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsCreateParamsWithContext creates a new IpamFhrpGroupsCreateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsCreateParamsWithContext(ctx context.Context) *IpamFhrpGroupsCreateParams { + return &IpamFhrpGroupsCreateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsCreateParamsWithHTTPClient creates a new IpamFhrpGroupsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsCreateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsCreateParams { + return &IpamFhrpGroupsCreateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsCreateParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups create operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsCreateParams struct { + + // Data. + Data *models.FHRPGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsCreateParams) WithDefaults() *IpamFhrpGroupsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) WithContext(ctx context.Context) *IpamFhrpGroupsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) WithData(data *models.FHRPGroup) *IpamFhrpGroupsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp groups create params +func (o *IpamFhrpGroupsCreateParams) SetData(data *models.FHRPGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_create_responses.go b/netbox/client/ipam/ipam_fhrp_groups_create_responses.go new file mode 100644 index 000000000..c74d33d3f --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_create_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsCreateReader is a Reader for the IpamFhrpGroupsCreate structure. +type IpamFhrpGroupsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamFhrpGroupsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsCreateCreated creates a IpamFhrpGroupsCreateCreated with default headers values +func NewIpamFhrpGroupsCreateCreated() *IpamFhrpGroupsCreateCreated { + return &IpamFhrpGroupsCreateCreated{} +} + +/* IpamFhrpGroupsCreateCreated describes a response with status code 201, with default header values. + +IpamFhrpGroupsCreateCreated ipam fhrp groups create created +*/ +type IpamFhrpGroupsCreateCreated struct { + Payload *models.FHRPGroup +} + +func (o *IpamFhrpGroupsCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/fhrp-groups/][%d] ipamFhrpGroupsCreateCreated %+v", 201, o.Payload) +} +func (o *IpamFhrpGroupsCreateCreated) GetPayload() *models.FHRPGroup { + return o.Payload +} + +func (o *IpamFhrpGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_delete_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_delete_parameters.go new file mode 100644 index 000000000..45774a10e --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupsDeleteParams creates a new IpamFhrpGroupsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsDeleteParams() *IpamFhrpGroupsDeleteParams { + return &IpamFhrpGroupsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsDeleteParamsWithTimeout creates a new IpamFhrpGroupsDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsDeleteParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsDeleteParams { + return &IpamFhrpGroupsDeleteParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsDeleteParamsWithContext creates a new IpamFhrpGroupsDeleteParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsDeleteParamsWithContext(ctx context.Context) *IpamFhrpGroupsDeleteParams { + return &IpamFhrpGroupsDeleteParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsDeleteParamsWithHTTPClient creates a new IpamFhrpGroupsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsDeleteParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsDeleteParams { + return &IpamFhrpGroupsDeleteParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsDeleteParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups delete operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsDeleteParams struct { + + /* ID. + + A unique integer value identifying this FHRP group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsDeleteParams) WithDefaults() *IpamFhrpGroupsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) WithContext(ctx context.Context) *IpamFhrpGroupsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) WithID(id int64) *IpamFhrpGroupsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp groups delete params +func (o *IpamFhrpGroupsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsDeleteParams) 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/netbox/client/ipam/ipam_fhrp_groups_delete_responses.go b/netbox/client/ipam/ipam_fhrp_groups_delete_responses.go new file mode 100644 index 000000000..45c027ac4 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamFhrpGroupsDeleteReader is a Reader for the IpamFhrpGroupsDelete structure. +type IpamFhrpGroupsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamFhrpGroupsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsDeleteNoContent creates a IpamFhrpGroupsDeleteNoContent with default headers values +func NewIpamFhrpGroupsDeleteNoContent() *IpamFhrpGroupsDeleteNoContent { + return &IpamFhrpGroupsDeleteNoContent{} +} + +/* IpamFhrpGroupsDeleteNoContent describes a response with status code 204, with default header values. + +IpamFhrpGroupsDeleteNoContent ipam fhrp groups delete no content +*/ +type IpamFhrpGroupsDeleteNoContent struct { +} + +func (o *IpamFhrpGroupsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/fhrp-groups/{id}/][%d] ipamFhrpGroupsDeleteNoContent ", 204) +} + +func (o *IpamFhrpGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go new file mode 100644 index 000000000..4997dca5e --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_list_parameters.go @@ -0,0 +1,1327 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupsListParams creates a new IpamFhrpGroupsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsListParams() *IpamFhrpGroupsListParams { + return &IpamFhrpGroupsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsListParamsWithTimeout creates a new IpamFhrpGroupsListParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsListParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsListParams { + return &IpamFhrpGroupsListParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsListParamsWithContext creates a new IpamFhrpGroupsListParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsListParamsWithContext(ctx context.Context) *IpamFhrpGroupsListParams { + return &IpamFhrpGroupsListParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsListParamsWithHTTPClient creates a new IpamFhrpGroupsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsListParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsListParams { + return &IpamFhrpGroupsListParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsListParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups list operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsListParams struct { + + // AuthKey. + AuthKey *string + + // AuthKeyIc. + AuthKeyIc *string + + // AuthKeyIe. + AuthKeyIe *string + + // AuthKeyIew. + AuthKeyIew *string + + // AuthKeyIsw. + AuthKeyIsw *string + + // AuthKeyn. + AuthKeyn *string + + // AuthKeyNic. + AuthKeyNic *string + + // AuthKeyNie. + AuthKeyNie *string + + // AuthKeyNiew. + AuthKeyNiew *string + + // AuthKeyNisw. + AuthKeyNisw *string + + // AuthType. + AuthType *string + + // AuthTypen. + AuthTypen *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // GroupID. + GroupID *string + + // GroupIDGt. + GroupIDGt *string + + // GroupIDGte. + GroupIDGte *string + + // GroupIDLt. + GroupIDLt *string + + // GroupIDLte. + GroupIDLte *string + + // GroupIDn. + GroupIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Protocol. + Protocol *string + + // Protocoln. + Protocoln *string + + // Q. + Q *string + + // RelatedIP. + RelatedIP *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsListParams) WithDefaults() *IpamFhrpGroupsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithContext(ctx context.Context) *IpamFhrpGroupsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthKey adds the authKey to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKey(authKey *string) *IpamFhrpGroupsListParams { + o.SetAuthKey(authKey) + return o +} + +// SetAuthKey adds the authKey to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKey(authKey *string) { + o.AuthKey = authKey +} + +// WithAuthKeyIc adds the authKeyIc to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyIc(authKeyIc *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyIc(authKeyIc) + return o +} + +// SetAuthKeyIc adds the authKeyIc to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyIc(authKeyIc *string) { + o.AuthKeyIc = authKeyIc +} + +// WithAuthKeyIe adds the authKeyIe to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyIe(authKeyIe *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyIe(authKeyIe) + return o +} + +// SetAuthKeyIe adds the authKeyIe to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyIe(authKeyIe *string) { + o.AuthKeyIe = authKeyIe +} + +// WithAuthKeyIew adds the authKeyIew to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyIew(authKeyIew *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyIew(authKeyIew) + return o +} + +// SetAuthKeyIew adds the authKeyIew to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyIew(authKeyIew *string) { + o.AuthKeyIew = authKeyIew +} + +// WithAuthKeyIsw adds the authKeyIsw to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyIsw(authKeyIsw *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyIsw(authKeyIsw) + return o +} + +// SetAuthKeyIsw adds the authKeyIsw to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyIsw(authKeyIsw *string) { + o.AuthKeyIsw = authKeyIsw +} + +// WithAuthKeyn adds the authKeyn to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyn(authKeyn *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyn(authKeyn) + return o +} + +// SetAuthKeyn adds the authKeyN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyn(authKeyn *string) { + o.AuthKeyn = authKeyn +} + +// WithAuthKeyNic adds the authKeyNic to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyNic(authKeyNic *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyNic(authKeyNic) + return o +} + +// SetAuthKeyNic adds the authKeyNic to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyNic(authKeyNic *string) { + o.AuthKeyNic = authKeyNic +} + +// WithAuthKeyNie adds the authKeyNie to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyNie(authKeyNie *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyNie(authKeyNie) + return o +} + +// SetAuthKeyNie adds the authKeyNie to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyNie(authKeyNie *string) { + o.AuthKeyNie = authKeyNie +} + +// WithAuthKeyNiew adds the authKeyNiew to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyNiew(authKeyNiew *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyNiew(authKeyNiew) + return o +} + +// SetAuthKeyNiew adds the authKeyNiew to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyNiew(authKeyNiew *string) { + o.AuthKeyNiew = authKeyNiew +} + +// WithAuthKeyNisw adds the authKeyNisw to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthKeyNisw(authKeyNisw *string) *IpamFhrpGroupsListParams { + o.SetAuthKeyNisw(authKeyNisw) + return o +} + +// SetAuthKeyNisw adds the authKeyNisw to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthKeyNisw(authKeyNisw *string) { + o.AuthKeyNisw = authKeyNisw +} + +// WithAuthType adds the authType to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthType(authType *string) *IpamFhrpGroupsListParams { + o.SetAuthType(authType) + return o +} + +// SetAuthType adds the authType to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthType(authType *string) { + o.AuthType = authType +} + +// WithAuthTypen adds the authTypen to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithAuthTypen(authTypen *string) *IpamFhrpGroupsListParams { + o.SetAuthTypen(authTypen) + return o +} + +// SetAuthTypen adds the authTypeN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetAuthTypen(authTypen *string) { + o.AuthTypen = authTypen +} + +// WithCreated adds the created to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithCreated(created *string) *IpamFhrpGroupsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithCreatedGte(createdGte *string) *IpamFhrpGroupsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithCreatedLte(createdLte *string) *IpamFhrpGroupsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithGroupID adds the groupID to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithGroupID(groupID *string) *IpamFhrpGroupsListParams { + o.SetGroupID(groupID) + return o +} + +// SetGroupID adds the groupId to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetGroupID(groupID *string) { + o.GroupID = groupID +} + +// WithGroupIDGt adds the groupIDGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithGroupIDGt(groupIDGt *string) *IpamFhrpGroupsListParams { + o.SetGroupIDGt(groupIDGt) + return o +} + +// SetGroupIDGt adds the groupIdGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetGroupIDGt(groupIDGt *string) { + o.GroupIDGt = groupIDGt +} + +// WithGroupIDGte adds the groupIDGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithGroupIDGte(groupIDGte *string) *IpamFhrpGroupsListParams { + o.SetGroupIDGte(groupIDGte) + return o +} + +// SetGroupIDGte adds the groupIdGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetGroupIDGte(groupIDGte *string) { + o.GroupIDGte = groupIDGte +} + +// WithGroupIDLt adds the groupIDLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithGroupIDLt(groupIDLt *string) *IpamFhrpGroupsListParams { + o.SetGroupIDLt(groupIDLt) + return o +} + +// SetGroupIDLt adds the groupIdLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetGroupIDLt(groupIDLt *string) { + o.GroupIDLt = groupIDLt +} + +// WithGroupIDLte adds the groupIDLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithGroupIDLte(groupIDLte *string) *IpamFhrpGroupsListParams { + o.SetGroupIDLte(groupIDLte) + return o +} + +// SetGroupIDLte adds the groupIdLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetGroupIDLte(groupIDLte *string) { + o.GroupIDLte = groupIDLte +} + +// WithGroupIDn adds the groupIDn to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithGroupIDn(groupIDn *string) *IpamFhrpGroupsListParams { + o.SetGroupIDn(groupIDn) + return o +} + +// SetGroupIDn adds the groupIdN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetGroupIDn(groupIDn *string) { + o.GroupIDn = groupIDn +} + +// WithID adds the id to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithID(id *string) *IpamFhrpGroupsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithIDGt(iDGt *string) *IpamFhrpGroupsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithIDGte(iDGte *string) *IpamFhrpGroupsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithIDLt(iDLt *string) *IpamFhrpGroupsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithIDLte(iDLte *string) *IpamFhrpGroupsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithIDn(iDn *string) *IpamFhrpGroupsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLastUpdated(lastUpdated *string) *IpamFhrpGroupsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamFhrpGroupsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamFhrpGroupsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithLimit(limit *int64) *IpamFhrpGroupsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithOffset(offset *int64) *IpamFhrpGroupsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithProtocol adds the protocol to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithProtocol(protocol *string) *IpamFhrpGroupsListParams { + o.SetProtocol(protocol) + return o +} + +// SetProtocol adds the protocol to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetProtocol(protocol *string) { + o.Protocol = protocol +} + +// WithProtocoln adds the protocoln to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithProtocoln(protocoln *string) *IpamFhrpGroupsListParams { + o.SetProtocoln(protocoln) + return o +} + +// SetProtocoln adds the protocolN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetProtocoln(protocoln *string) { + o.Protocoln = protocoln +} + +// WithQ adds the q to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithQ(q *string) *IpamFhrpGroupsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetQ(q *string) { + o.Q = q +} + +// WithRelatedIP adds the relatedIP to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithRelatedIP(relatedIP *string) *IpamFhrpGroupsListParams { + o.SetRelatedIP(relatedIP) + return o +} + +// SetRelatedIP adds the relatedIp to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetRelatedIP(relatedIP *string) { + o.RelatedIP = relatedIP +} + +// WithTag adds the tag to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithTag(tag *string) *IpamFhrpGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) WithTagn(tagn *string) *IpamFhrpGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam fhrp groups list params +func (o *IpamFhrpGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AuthKey != nil { + + // query param auth_key + var qrAuthKey string + + if o.AuthKey != nil { + qrAuthKey = *o.AuthKey + } + qAuthKey := qrAuthKey + if qAuthKey != "" { + + if err := r.SetQueryParam("auth_key", qAuthKey); err != nil { + return err + } + } + } + + if o.AuthKeyIc != nil { + + // query param auth_key__ic + var qrAuthKeyIc string + + if o.AuthKeyIc != nil { + qrAuthKeyIc = *o.AuthKeyIc + } + qAuthKeyIc := qrAuthKeyIc + if qAuthKeyIc != "" { + + if err := r.SetQueryParam("auth_key__ic", qAuthKeyIc); err != nil { + return err + } + } + } + + if o.AuthKeyIe != nil { + + // query param auth_key__ie + var qrAuthKeyIe string + + if o.AuthKeyIe != nil { + qrAuthKeyIe = *o.AuthKeyIe + } + qAuthKeyIe := qrAuthKeyIe + if qAuthKeyIe != "" { + + if err := r.SetQueryParam("auth_key__ie", qAuthKeyIe); err != nil { + return err + } + } + } + + if o.AuthKeyIew != nil { + + // query param auth_key__iew + var qrAuthKeyIew string + + if o.AuthKeyIew != nil { + qrAuthKeyIew = *o.AuthKeyIew + } + qAuthKeyIew := qrAuthKeyIew + if qAuthKeyIew != "" { + + if err := r.SetQueryParam("auth_key__iew", qAuthKeyIew); err != nil { + return err + } + } + } + + if o.AuthKeyIsw != nil { + + // query param auth_key__isw + var qrAuthKeyIsw string + + if o.AuthKeyIsw != nil { + qrAuthKeyIsw = *o.AuthKeyIsw + } + qAuthKeyIsw := qrAuthKeyIsw + if qAuthKeyIsw != "" { + + if err := r.SetQueryParam("auth_key__isw", qAuthKeyIsw); err != nil { + return err + } + } + } + + if o.AuthKeyn != nil { + + // query param auth_key__n + var qrAuthKeyn string + + if o.AuthKeyn != nil { + qrAuthKeyn = *o.AuthKeyn + } + qAuthKeyn := qrAuthKeyn + if qAuthKeyn != "" { + + if err := r.SetQueryParam("auth_key__n", qAuthKeyn); err != nil { + return err + } + } + } + + if o.AuthKeyNic != nil { + + // query param auth_key__nic + var qrAuthKeyNic string + + if o.AuthKeyNic != nil { + qrAuthKeyNic = *o.AuthKeyNic + } + qAuthKeyNic := qrAuthKeyNic + if qAuthKeyNic != "" { + + if err := r.SetQueryParam("auth_key__nic", qAuthKeyNic); err != nil { + return err + } + } + } + + if o.AuthKeyNie != nil { + + // query param auth_key__nie + var qrAuthKeyNie string + + if o.AuthKeyNie != nil { + qrAuthKeyNie = *o.AuthKeyNie + } + qAuthKeyNie := qrAuthKeyNie + if qAuthKeyNie != "" { + + if err := r.SetQueryParam("auth_key__nie", qAuthKeyNie); err != nil { + return err + } + } + } + + if o.AuthKeyNiew != nil { + + // query param auth_key__niew + var qrAuthKeyNiew string + + if o.AuthKeyNiew != nil { + qrAuthKeyNiew = *o.AuthKeyNiew + } + qAuthKeyNiew := qrAuthKeyNiew + if qAuthKeyNiew != "" { + + if err := r.SetQueryParam("auth_key__niew", qAuthKeyNiew); err != nil { + return err + } + } + } + + if o.AuthKeyNisw != nil { + + // query param auth_key__nisw + var qrAuthKeyNisw string + + if o.AuthKeyNisw != nil { + qrAuthKeyNisw = *o.AuthKeyNisw + } + qAuthKeyNisw := qrAuthKeyNisw + if qAuthKeyNisw != "" { + + if err := r.SetQueryParam("auth_key__nisw", qAuthKeyNisw); err != nil { + return err + } + } + } + + if o.AuthType != nil { + + // query param auth_type + var qrAuthType string + + if o.AuthType != nil { + qrAuthType = *o.AuthType + } + qAuthType := qrAuthType + if qAuthType != "" { + + if err := r.SetQueryParam("auth_type", qAuthType); err != nil { + return err + } + } + } + + if o.AuthTypen != nil { + + // query param auth_type__n + var qrAuthTypen string + + if o.AuthTypen != nil { + qrAuthTypen = *o.AuthTypen + } + qAuthTypen := qrAuthTypen + if qAuthTypen != "" { + + if err := r.SetQueryParam("auth_type__n", qAuthTypen); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.GroupID != nil { + + // query param group_id + var qrGroupID string + + if o.GroupID != nil { + qrGroupID = *o.GroupID + } + qGroupID := qrGroupID + if qGroupID != "" { + + if err := r.SetQueryParam("group_id", qGroupID); err != nil { + return err + } + } + } + + if o.GroupIDGt != nil { + + // query param group_id__gt + var qrGroupIDGt string + + if o.GroupIDGt != nil { + qrGroupIDGt = *o.GroupIDGt + } + qGroupIDGt := qrGroupIDGt + if qGroupIDGt != "" { + + if err := r.SetQueryParam("group_id__gt", qGroupIDGt); err != nil { + return err + } + } + } + + if o.GroupIDGte != nil { + + // query param group_id__gte + var qrGroupIDGte string + + if o.GroupIDGte != nil { + qrGroupIDGte = *o.GroupIDGte + } + qGroupIDGte := qrGroupIDGte + if qGroupIDGte != "" { + + if err := r.SetQueryParam("group_id__gte", qGroupIDGte); err != nil { + return err + } + } + } + + if o.GroupIDLt != nil { + + // query param group_id__lt + var qrGroupIDLt string + + if o.GroupIDLt != nil { + qrGroupIDLt = *o.GroupIDLt + } + qGroupIDLt := qrGroupIDLt + if qGroupIDLt != "" { + + if err := r.SetQueryParam("group_id__lt", qGroupIDLt); err != nil { + return err + } + } + } + + if o.GroupIDLte != nil { + + // query param group_id__lte + var qrGroupIDLte string + + if o.GroupIDLte != nil { + qrGroupIDLte = *o.GroupIDLte + } + qGroupIDLte := qrGroupIDLte + if qGroupIDLte != "" { + + if err := r.SetQueryParam("group_id__lte", qGroupIDLte); err != nil { + return err + } + } + } + + if o.GroupIDn != nil { + + // query param group_id__n + var qrGroupIDn string + + if o.GroupIDn != nil { + qrGroupIDn = *o.GroupIDn + } + qGroupIDn := qrGroupIDn + if qGroupIDn != "" { + + if err := r.SetQueryParam("group_id__n", qGroupIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Protocol != nil { + + // query param protocol + var qrProtocol string + + if o.Protocol != nil { + qrProtocol = *o.Protocol + } + qProtocol := qrProtocol + if qProtocol != "" { + + if err := r.SetQueryParam("protocol", qProtocol); err != nil { + return err + } + } + } + + if o.Protocoln != nil { + + // query param protocol__n + var qrProtocoln string + + if o.Protocoln != nil { + qrProtocoln = *o.Protocoln + } + qProtocoln := qrProtocoln + if qProtocoln != "" { + + if err := r.SetQueryParam("protocol__n", qProtocoln); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.RelatedIP != nil { + + // query param related_ip + var qrRelatedIP string + + if o.RelatedIP != nil { + qrRelatedIP = *o.RelatedIP + } + qRelatedIP := qrRelatedIP + if qRelatedIP != "" { + + if err := r.SetQueryParam("related_ip", qRelatedIP); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_list_responses.go b/netbox/client/ipam/ipam_fhrp_groups_list_responses.go new file mode 100644 index 000000000..35bad237a --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_list_responses.go @@ -0,0 +1,247 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsListReader is a Reader for the IpamFhrpGroupsList structure. +type IpamFhrpGroupsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsListOK creates a IpamFhrpGroupsListOK with default headers values +func NewIpamFhrpGroupsListOK() *IpamFhrpGroupsListOK { + return &IpamFhrpGroupsListOK{} +} + +/* IpamFhrpGroupsListOK describes a response with status code 200, with default header values. + +IpamFhrpGroupsListOK ipam fhrp groups list o k +*/ +type IpamFhrpGroupsListOK struct { + Payload *IpamFhrpGroupsListOKBody +} + +func (o *IpamFhrpGroupsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/fhrp-groups/][%d] ipamFhrpGroupsListOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupsListOK) GetPayload() *IpamFhrpGroupsListOKBody { + return o.Payload +} + +func (o *IpamFhrpGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(IpamFhrpGroupsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*IpamFhrpGroupsListOKBody ipam fhrp groups list o k body +swagger:model IpamFhrpGroupsListOKBody +*/ +type IpamFhrpGroupsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.FHRPGroup `json:"results"` +} + +// Validate validates this ipam fhrp groups list o k body +func (o *IpamFhrpGroupsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamFhrpGroupsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("ipamFhrpGroupsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *IpamFhrpGroupsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("ipamFhrpGroupsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamFhrpGroupsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("ipamFhrpGroupsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamFhrpGroupsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("ipamFhrpGroupsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamFhrpGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamFhrpGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this ipam fhrp groups list o k body based on the context it is used +func (o *IpamFhrpGroupsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamFhrpGroupsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamFhrpGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamFhrpGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *IpamFhrpGroupsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *IpamFhrpGroupsListOKBody) UnmarshalBinary(b []byte) error { + var res IpamFhrpGroupsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_partial_update_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_partial_update_parameters.go new file mode 100644 index 000000000..192a33310 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupsPartialUpdateParams creates a new IpamFhrpGroupsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsPartialUpdateParams() *IpamFhrpGroupsPartialUpdateParams { + return &IpamFhrpGroupsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsPartialUpdateParamsWithTimeout creates a new IpamFhrpGroupsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsPartialUpdateParams { + return &IpamFhrpGroupsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsPartialUpdateParamsWithContext creates a new IpamFhrpGroupsPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsPartialUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupsPartialUpdateParams { + return &IpamFhrpGroupsPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsPartialUpdateParamsWithHTTPClient creates a new IpamFhrpGroupsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsPartialUpdateParams { + return &IpamFhrpGroupsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsPartialUpdateParams struct { + + // Data. + Data *models.FHRPGroup + + /* ID. + + A unique integer value identifying this FHRP group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsPartialUpdateParams) WithDefaults() *IpamFhrpGroupsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) WithData(data *models.FHRPGroup) *IpamFhrpGroupsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) SetData(data *models.FHRPGroup) { + o.Data = data +} + +// WithID adds the id to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) WithID(id int64) *IpamFhrpGroupsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp groups partial update params +func (o *IpamFhrpGroupsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_fhrp_groups_partial_update_responses.go b/netbox/client/ipam/ipam_fhrp_groups_partial_update_responses.go new file mode 100644 index 000000000..0cd2550cb --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsPartialUpdateReader is a Reader for the IpamFhrpGroupsPartialUpdate structure. +type IpamFhrpGroupsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsPartialUpdateOK creates a IpamFhrpGroupsPartialUpdateOK with default headers values +func NewIpamFhrpGroupsPartialUpdateOK() *IpamFhrpGroupsPartialUpdateOK { + return &IpamFhrpGroupsPartialUpdateOK{} +} + +/* IpamFhrpGroupsPartialUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupsPartialUpdateOK ipam fhrp groups partial update o k +*/ +type IpamFhrpGroupsPartialUpdateOK struct { + Payload *models.FHRPGroup +} + +func (o *IpamFhrpGroupsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/fhrp-groups/{id}/][%d] ipamFhrpGroupsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupsPartialUpdateOK) GetPayload() *models.FHRPGroup { + return o.Payload +} + +func (o *IpamFhrpGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_read_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_read_parameters.go new file mode 100644 index 000000000..d43eb3dc4 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_read_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamFhrpGroupsReadParams creates a new IpamFhrpGroupsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsReadParams() *IpamFhrpGroupsReadParams { + return &IpamFhrpGroupsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsReadParamsWithTimeout creates a new IpamFhrpGroupsReadParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsReadParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsReadParams { + return &IpamFhrpGroupsReadParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsReadParamsWithContext creates a new IpamFhrpGroupsReadParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsReadParamsWithContext(ctx context.Context) *IpamFhrpGroupsReadParams { + return &IpamFhrpGroupsReadParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsReadParamsWithHTTPClient creates a new IpamFhrpGroupsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsReadParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsReadParams { + return &IpamFhrpGroupsReadParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsReadParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups read operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsReadParams struct { + + /* ID. + + A unique integer value identifying this FHRP group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsReadParams) WithDefaults() *IpamFhrpGroupsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) WithContext(ctx context.Context) *IpamFhrpGroupsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) WithID(id int64) *IpamFhrpGroupsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp groups read params +func (o *IpamFhrpGroupsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsReadParams) 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/netbox/client/ipam/ipam_fhrp_groups_read_responses.go b/netbox/client/ipam/ipam_fhrp_groups_read_responses.go new file mode 100644 index 000000000..712a2de6b --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_read_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsReadReader is a Reader for the IpamFhrpGroupsRead structure. +type IpamFhrpGroupsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsReadOK creates a IpamFhrpGroupsReadOK with default headers values +func NewIpamFhrpGroupsReadOK() *IpamFhrpGroupsReadOK { + return &IpamFhrpGroupsReadOK{} +} + +/* IpamFhrpGroupsReadOK describes a response with status code 200, with default header values. + +IpamFhrpGroupsReadOK ipam fhrp groups read o k +*/ +type IpamFhrpGroupsReadOK struct { + Payload *models.FHRPGroup +} + +func (o *IpamFhrpGroupsReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/fhrp-groups/{id}/][%d] ipamFhrpGroupsReadOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupsReadOK) GetPayload() *models.FHRPGroup { + return o.Payload +} + +func (o *IpamFhrpGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_fhrp_groups_update_parameters.go b/netbox/client/ipam/ipam_fhrp_groups_update_parameters.go new file mode 100644 index 000000000..11ff8de76 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamFhrpGroupsUpdateParams creates a new IpamFhrpGroupsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamFhrpGroupsUpdateParams() *IpamFhrpGroupsUpdateParams { + return &IpamFhrpGroupsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamFhrpGroupsUpdateParamsWithTimeout creates a new IpamFhrpGroupsUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamFhrpGroupsUpdateParamsWithTimeout(timeout time.Duration) *IpamFhrpGroupsUpdateParams { + return &IpamFhrpGroupsUpdateParams{ + timeout: timeout, + } +} + +// NewIpamFhrpGroupsUpdateParamsWithContext creates a new IpamFhrpGroupsUpdateParams object +// with the ability to set a context for a request. +func NewIpamFhrpGroupsUpdateParamsWithContext(ctx context.Context) *IpamFhrpGroupsUpdateParams { + return &IpamFhrpGroupsUpdateParams{ + Context: ctx, + } +} + +// NewIpamFhrpGroupsUpdateParamsWithHTTPClient creates a new IpamFhrpGroupsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamFhrpGroupsUpdateParamsWithHTTPClient(client *http.Client) *IpamFhrpGroupsUpdateParams { + return &IpamFhrpGroupsUpdateParams{ + HTTPClient: client, + } +} + +/* IpamFhrpGroupsUpdateParams contains all the parameters to send to the API endpoint + for the ipam fhrp groups update operation. + + Typically these are written to a http.Request. +*/ +type IpamFhrpGroupsUpdateParams struct { + + // Data. + Data *models.FHRPGroup + + /* ID. + + A unique integer value identifying this FHRP group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam fhrp groups update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsUpdateParams) WithDefaults() *IpamFhrpGroupsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam fhrp groups update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamFhrpGroupsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) WithTimeout(timeout time.Duration) *IpamFhrpGroupsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) WithContext(ctx context.Context) *IpamFhrpGroupsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) WithHTTPClient(client *http.Client) *IpamFhrpGroupsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) WithData(data *models.FHRPGroup) *IpamFhrpGroupsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) SetData(data *models.FHRPGroup) { + o.Data = data +} + +// WithID adds the id to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) WithID(id int64) *IpamFhrpGroupsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam fhrp groups update params +func (o *IpamFhrpGroupsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamFhrpGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_fhrp_groups_update_responses.go b/netbox/client/ipam/ipam_fhrp_groups_update_responses.go new file mode 100644 index 000000000..ddc4c8f61 --- /dev/null +++ b/netbox/client/ipam/ipam_fhrp_groups_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamFhrpGroupsUpdateReader is a Reader for the IpamFhrpGroupsUpdate structure. +type IpamFhrpGroupsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamFhrpGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamFhrpGroupsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamFhrpGroupsUpdateOK creates a IpamFhrpGroupsUpdateOK with default headers values +func NewIpamFhrpGroupsUpdateOK() *IpamFhrpGroupsUpdateOK { + return &IpamFhrpGroupsUpdateOK{} +} + +/* IpamFhrpGroupsUpdateOK describes a response with status code 200, with default header values. + +IpamFhrpGroupsUpdateOK ipam fhrp groups update o k +*/ +type IpamFhrpGroupsUpdateOK struct { + Payload *models.FHRPGroup +} + +func (o *IpamFhrpGroupsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/fhrp-groups/{id}/][%d] ipamFhrpGroupsUpdateOK %+v", 200, o.Payload) +} +func (o *IpamFhrpGroupsUpdateOK) GetPayload() *models.FHRPGroup { + return o.Payload +} + +func (o *IpamFhrpGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FHRPGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_ip_addresses_list_parameters.go b/netbox/client/ipam/ipam_ip_addresses_list_parameters.go index 79bf8a8ad..9a598d405 100644 --- a/netbox/client/ipam/ipam_ip_addresses_list_parameters.go +++ b/netbox/client/ipam/ipam_ip_addresses_list_parameters.go @@ -93,9 +93,6 @@ type IpamIPAddressesListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -132,9 +129,6 @@ type IpamIPAddressesListParams struct { // DNSName. DNSName *string - // DNSNameEmpty. - DNSNameEmpty *string - // DNSNameIc. DNSNameIc *string @@ -165,6 +159,12 @@ type IpamIPAddressesListParams struct { // Family. Family *float64 + // FhrpgroupID. + FhrpgroupID *string + + // FhrpgroupIDn. + FhrpgroupIDn *string + // ID. ID *string @@ -422,17 +422,6 @@ func (o *IpamIPAddressesListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the ipam ip addresses list params -func (o *IpamIPAddressesListParams) WithDescriptionEmpty(descriptionEmpty *string) *IpamIPAddressesListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the ipam ip addresses list params -func (o *IpamIPAddressesListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithDescriptionIc(descriptionIc *string) *IpamIPAddressesListParams { o.SetDescriptionIc(descriptionIc) @@ -565,17 +554,6 @@ func (o *IpamIPAddressesListParams) SetDNSName(dNSName *string) { o.DNSName = dNSName } -// WithDNSNameEmpty adds the dNSNameEmpty to the ipam ip addresses list params -func (o *IpamIPAddressesListParams) WithDNSNameEmpty(dNSNameEmpty *string) *IpamIPAddressesListParams { - o.SetDNSNameEmpty(dNSNameEmpty) - return o -} - -// SetDNSNameEmpty adds the dnsNameEmpty to the ipam ip addresses list params -func (o *IpamIPAddressesListParams) SetDNSNameEmpty(dNSNameEmpty *string) { - o.DNSNameEmpty = dNSNameEmpty -} - // WithDNSNameIc adds the dNSNameIc to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithDNSNameIc(dNSNameIc *string) *IpamIPAddressesListParams { o.SetDNSNameIc(dNSNameIc) @@ -686,6 +664,28 @@ func (o *IpamIPAddressesListParams) SetFamily(family *float64) { o.Family = family } +// WithFhrpgroupID adds the fhrpgroupID to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithFhrpgroupID(fhrpgroupID *string) *IpamIPAddressesListParams { + o.SetFhrpgroupID(fhrpgroupID) + return o +} + +// SetFhrpgroupID adds the fhrpgroupId to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetFhrpgroupID(fhrpgroupID *string) { + o.FhrpgroupID = fhrpgroupID +} + +// WithFhrpgroupIDn adds the fhrpgroupIDn to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) WithFhrpgroupIDn(fhrpgroupIDn *string) *IpamIPAddressesListParams { + o.SetFhrpgroupIDn(fhrpgroupIDn) + return o +} + +// SetFhrpgroupIDn adds the fhrpgroupIdN to the ipam ip addresses list params +func (o *IpamIPAddressesListParams) SetFhrpgroupIDn(fhrpgroupIDn *string) { + o.FhrpgroupIDn = fhrpgroupIDn +} + // WithID adds the id to the ipam ip addresses list params func (o *IpamIPAddressesListParams) WithID(id *string) *IpamIPAddressesListParams { o.SetID(id) @@ -1280,23 +1280,6 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1501,23 +1484,6 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.DNSNameEmpty != nil { - - // query param dns_name__empty - var qrDNSNameEmpty string - - if o.DNSNameEmpty != nil { - qrDNSNameEmpty = *o.DNSNameEmpty - } - qDNSNameEmpty := qrDNSNameEmpty - if qDNSNameEmpty != "" { - - if err := r.SetQueryParam("dns_name__empty", qDNSNameEmpty); err != nil { - return err - } - } - } - if o.DNSNameIc != nil { // query param dns_name__ic @@ -1688,6 +1654,40 @@ func (o *IpamIPAddressesListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.FhrpgroupID != nil { + + // query param fhrpgroup_id + var qrFhrpgroupID string + + if o.FhrpgroupID != nil { + qrFhrpgroupID = *o.FhrpgroupID + } + qFhrpgroupID := qrFhrpgroupID + if qFhrpgroupID != "" { + + if err := r.SetQueryParam("fhrpgroup_id", qFhrpgroupID); err != nil { + return err + } + } + } + + if o.FhrpgroupIDn != nil { + + // query param fhrpgroup_id__n + var qrFhrpgroupIDn string + + if o.FhrpgroupIDn != nil { + qrFhrpgroupIDn = *o.FhrpgroupIDn + } + qFhrpgroupIDn := qrFhrpgroupIDn + if qFhrpgroupIDn != "" { + + if err := r.SetQueryParam("fhrpgroup_id__n", qFhrpgroupIDn); err != nil { + return err + } + } + } + if o.ID != nil { // query param id diff --git a/netbox/client/ipam/ipam_ip_addresses_list_responses.go b/netbox/client/ipam/ipam_ip_addresses_list_responses.go index 968614300..d2216fe71 100644 --- a/netbox/client/ipam/ipam_ip_addresses_list_responses.go +++ b/netbox/client/ipam/ipam_ip_addresses_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamIPAddressesListOKBody) validateResults(formats strfmt.Registry) err if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamIpAddressesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamIpAddressesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamIPAddressesListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamIpAddressesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamIpAddressesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go index 67c77cc36..6f3efa96e 100644 --- a/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_parameters.go @@ -78,11 +78,11 @@ func NewIpamIPRangesAvailableIpsCreateParamsWithHTTPClient(client *http.Client) type IpamIPRangesAvailableIpsCreateParams struct { // Data. - Data []*models.AvailableIP + Data *models.WritableAvailableIP /* ID. - A unique integer value identifying this IP range. + A unique integer value identifying this IP address. */ ID int64 @@ -140,13 +140,13 @@ func (o *IpamIPRangesAvailableIpsCreateParams) SetHTTPClient(client *http.Client } // WithData adds the data to the ipam ip ranges available ips create params -func (o *IpamIPRangesAvailableIpsCreateParams) WithData(data []*models.AvailableIP) *IpamIPRangesAvailableIpsCreateParams { +func (o *IpamIPRangesAvailableIpsCreateParams) WithData(data *models.WritableAvailableIP) *IpamIPRangesAvailableIpsCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam ip ranges available ips create params -func (o *IpamIPRangesAvailableIpsCreateParams) SetData(data []*models.AvailableIP) { +func (o *IpamIPRangesAvailableIpsCreateParams) SetData(data *models.WritableAvailableIP) { o.Data = data } diff --git a/netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go index 35ce6c742..2534d143c 100644 --- a/netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_create_responses.go @@ -59,13 +59,13 @@ func NewIpamIPRangesAvailableIpsCreateCreated() *IpamIPRangesAvailableIpsCreateC IpamIPRangesAvailableIpsCreateCreated ipam Ip ranges available ips create created */ type IpamIPRangesAvailableIpsCreateCreated struct { - Payload []*models.AvailableIP + Payload []*models.IPAddress } func (o *IpamIPRangesAvailableIpsCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/ip-ranges/{id}/available-ips/][%d] ipamIpRangesAvailableIpsCreateCreated %+v", 201, o.Payload) } -func (o *IpamIPRangesAvailableIpsCreateCreated) GetPayload() []*models.AvailableIP { +func (o *IpamIPRangesAvailableIpsCreateCreated) GetPayload() []*models.IPAddress { return o.Payload } diff --git a/netbox/client/ipam/ipam_ip_ranges_available_ips_read_parameters.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_list_parameters.go similarity index 55% rename from netbox/client/ipam/ipam_ip_ranges_available_ips_read_parameters.go rename to netbox/client/ipam/ipam_ip_ranges_available_ips_list_parameters.go index a48324601..04506cf09 100644 --- a/netbox/client/ipam/ipam_ip_ranges_available_ips_read_parameters.go +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_list_parameters.go @@ -32,52 +32,52 @@ import ( "github.com/go-openapi/swag" ) -// NewIpamIPRangesAvailableIpsReadParams creates a new IpamIPRangesAvailableIpsReadParams object, +// NewIpamIPRangesAvailableIpsListParams creates a new IpamIPRangesAvailableIpsListParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewIpamIPRangesAvailableIpsReadParams() *IpamIPRangesAvailableIpsReadParams { - return &IpamIPRangesAvailableIpsReadParams{ +func NewIpamIPRangesAvailableIpsListParams() *IpamIPRangesAvailableIpsListParams { + return &IpamIPRangesAvailableIpsListParams{ timeout: cr.DefaultTimeout, } } -// NewIpamIPRangesAvailableIpsReadParamsWithTimeout creates a new IpamIPRangesAvailableIpsReadParams object +// NewIpamIPRangesAvailableIpsListParamsWithTimeout creates a new IpamIPRangesAvailableIpsListParams object // with the ability to set a timeout on a request. -func NewIpamIPRangesAvailableIpsReadParamsWithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsReadParams { - return &IpamIPRangesAvailableIpsReadParams{ +func NewIpamIPRangesAvailableIpsListParamsWithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsListParams { + return &IpamIPRangesAvailableIpsListParams{ timeout: timeout, } } -// NewIpamIPRangesAvailableIpsReadParamsWithContext creates a new IpamIPRangesAvailableIpsReadParams object +// NewIpamIPRangesAvailableIpsListParamsWithContext creates a new IpamIPRangesAvailableIpsListParams object // with the ability to set a context for a request. -func NewIpamIPRangesAvailableIpsReadParamsWithContext(ctx context.Context) *IpamIPRangesAvailableIpsReadParams { - return &IpamIPRangesAvailableIpsReadParams{ +func NewIpamIPRangesAvailableIpsListParamsWithContext(ctx context.Context) *IpamIPRangesAvailableIpsListParams { + return &IpamIPRangesAvailableIpsListParams{ Context: ctx, } } -// NewIpamIPRangesAvailableIpsReadParamsWithHTTPClient creates a new IpamIPRangesAvailableIpsReadParams object +// NewIpamIPRangesAvailableIpsListParamsWithHTTPClient creates a new IpamIPRangesAvailableIpsListParams object // with the ability to set a custom HTTPClient for a request. -func NewIpamIPRangesAvailableIpsReadParamsWithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsReadParams { - return &IpamIPRangesAvailableIpsReadParams{ +func NewIpamIPRangesAvailableIpsListParamsWithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsListParams { + return &IpamIPRangesAvailableIpsListParams{ HTTPClient: client, } } -/* IpamIPRangesAvailableIpsReadParams contains all the parameters to send to the API endpoint - for the ipam ip ranges available ips read operation. +/* IpamIPRangesAvailableIpsListParams contains all the parameters to send to the API endpoint + for the ipam ip ranges available ips list operation. Typically these are written to a http.Request. */ -type IpamIPRangesAvailableIpsReadParams struct { +type IpamIPRangesAvailableIpsListParams struct { /* ID. - A unique integer value identifying this IP range. + A unique integer value identifying this IP address. */ ID int64 @@ -86,67 +86,67 @@ type IpamIPRangesAvailableIpsReadParams struct { HTTPClient *http.Client } -// WithDefaults hydrates default values in the ipam ip ranges available ips read params (not the query body). +// WithDefaults hydrates default values in the ipam ip ranges available ips list params (not the query body). // // All values with no default are reset to their zero value. -func (o *IpamIPRangesAvailableIpsReadParams) WithDefaults() *IpamIPRangesAvailableIpsReadParams { +func (o *IpamIPRangesAvailableIpsListParams) WithDefaults() *IpamIPRangesAvailableIpsListParams { o.SetDefaults() return o } -// SetDefaults hydrates default values in the ipam ip ranges available ips read params (not the query body). +// SetDefaults hydrates default values in the ipam ip ranges available ips list params (not the query body). // // All values with no default are reset to their zero value. -func (o *IpamIPRangesAvailableIpsReadParams) SetDefaults() { +func (o *IpamIPRangesAvailableIpsListParams) SetDefaults() { // no default values defined for this parameter } -// WithTimeout adds the timeout to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) WithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsReadParams { +// WithTimeout adds the timeout to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) WithTimeout(timeout time.Duration) *IpamIPRangesAvailableIpsListParams { o.SetTimeout(timeout) return o } -// SetTimeout adds the timeout to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) SetTimeout(timeout time.Duration) { +// SetTimeout adds the timeout to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } -// WithContext adds the context to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) WithContext(ctx context.Context) *IpamIPRangesAvailableIpsReadParams { +// WithContext adds the context to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) WithContext(ctx context.Context) *IpamIPRangesAvailableIpsListParams { o.SetContext(ctx) return o } -// SetContext adds the context to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) SetContext(ctx context.Context) { +// SetContext adds the context to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) SetContext(ctx context.Context) { o.Context = ctx } -// WithHTTPClient adds the HTTPClient to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) WithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsReadParams { +// WithHTTPClient adds the HTTPClient to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) WithHTTPClient(client *http.Client) *IpamIPRangesAvailableIpsListParams { o.SetHTTPClient(client) return o } -// SetHTTPClient adds the HTTPClient to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) SetHTTPClient(client *http.Client) { +// SetHTTPClient adds the HTTPClient to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithID adds the id to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) WithID(id int64) *IpamIPRangesAvailableIpsReadParams { +// WithID adds the id to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) WithID(id int64) *IpamIPRangesAvailableIpsListParams { o.SetID(id) return o } -// SetID adds the id to the ipam ip ranges available ips read params -func (o *IpamIPRangesAvailableIpsReadParams) SetID(id int64) { +// SetID adds the id to the ipam ip ranges available ips list params +func (o *IpamIPRangesAvailableIpsListParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IpamIPRangesAvailableIpsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamIPRangesAvailableIpsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ipam_ip_ranges_available_ips_read_responses.go b/netbox/client/ipam/ipam_ip_ranges_available_ips_list_responses.go similarity index 67% rename from netbox/client/ipam/ipam_ip_ranges_available_ips_read_responses.go rename to netbox/client/ipam/ipam_ip_ranges_available_ips_list_responses.go index 5854a4548..8dec26e36 100644 --- a/netbox/client/ipam/ipam_ip_ranges_available_ips_read_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_available_ips_list_responses.go @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// IpamIPRangesAvailableIpsReadReader is a Reader for the IpamIPRangesAvailableIpsRead structure. -type IpamIPRangesAvailableIpsReadReader struct { +// IpamIPRangesAvailableIpsListReader is a Reader for the IpamIPRangesAvailableIpsList structure. +type IpamIPRangesAvailableIpsListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IpamIPRangesAvailableIpsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamIPRangesAvailableIpsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewIpamIPRangesAvailableIpsReadOK() + result := NewIpamIPRangesAvailableIpsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,27 +49,27 @@ func (o *IpamIPRangesAvailableIpsReadReader) ReadResponse(response runtime.Clien } } -// NewIpamIPRangesAvailableIpsReadOK creates a IpamIPRangesAvailableIpsReadOK with default headers values -func NewIpamIPRangesAvailableIpsReadOK() *IpamIPRangesAvailableIpsReadOK { - return &IpamIPRangesAvailableIpsReadOK{} +// NewIpamIPRangesAvailableIpsListOK creates a IpamIPRangesAvailableIpsListOK with default headers values +func NewIpamIPRangesAvailableIpsListOK() *IpamIPRangesAvailableIpsListOK { + return &IpamIPRangesAvailableIpsListOK{} } -/* IpamIPRangesAvailableIpsReadOK describes a response with status code 200, with default header values. +/* IpamIPRangesAvailableIpsListOK describes a response with status code 200, with default header values. -IpamIPRangesAvailableIpsReadOK ipam Ip ranges available ips read o k +IpamIPRangesAvailableIpsListOK ipam Ip ranges available ips list o k */ -type IpamIPRangesAvailableIpsReadOK struct { +type IpamIPRangesAvailableIpsListOK struct { Payload []*models.AvailableIP } -func (o *IpamIPRangesAvailableIpsReadOK) Error() string { - return fmt.Sprintf("[GET /ipam/ip-ranges/{id}/available-ips/][%d] ipamIpRangesAvailableIpsReadOK %+v", 200, o.Payload) +func (o *IpamIPRangesAvailableIpsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/ip-ranges/{id}/available-ips/][%d] ipamIpRangesAvailableIpsListOK %+v", 200, o.Payload) } -func (o *IpamIPRangesAvailableIpsReadOK) GetPayload() []*models.AvailableIP { +func (o *IpamIPRangesAvailableIpsListOK) GetPayload() []*models.AvailableIP { return o.Payload } -func (o *IpamIPRangesAvailableIpsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamIPRangesAvailableIpsListOK) 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 { diff --git a/netbox/client/ipam/ipam_ip_ranges_list_parameters.go b/netbox/client/ipam/ipam_ip_ranges_list_parameters.go index 7a6e3197e..be05bda62 100644 --- a/netbox/client/ipam/ipam_ip_ranges_list_parameters.go +++ b/netbox/client/ipam/ipam_ip_ranges_list_parameters.go @@ -87,6 +87,36 @@ type IpamIPRangesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Family. Family *float64 @@ -289,6 +319,116 @@ func (o *IpamIPRangesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescription(description *string) *IpamIPRangesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionIc(descriptionIc *string) *IpamIPRangesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionIe(descriptionIe *string) *IpamIPRangesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionIew(descriptionIew *string) *IpamIPRangesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionIsw(descriptionIsw *string) *IpamIPRangesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionn(descriptionn *string) *IpamIPRangesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionNic(descriptionNic *string) *IpamIPRangesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionNie(descriptionNie *string) *IpamIPRangesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionNiew(descriptionNiew *string) *IpamIPRangesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam ip ranges list params +func (o *IpamIPRangesListParams) WithDescriptionNisw(descriptionNisw *string) *IpamIPRangesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam ip ranges list params +func (o *IpamIPRangesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithFamily adds the family to the ipam ip ranges list params func (o *IpamIPRangesListParams) WithFamily(family *float64) *IpamIPRangesListParams { o.SetFamily(family) @@ -728,6 +868,176 @@ func (o *IpamIPRangesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Family != nil { // query param family diff --git a/netbox/client/ipam/ipam_ip_ranges_list_responses.go b/netbox/client/ipam/ipam_ip_ranges_list_responses.go index da8222df0..5e8ed6239 100644 --- a/netbox/client/ipam/ipam_ip_ranges_list_responses.go +++ b/netbox/client/ipam/ipam_ip_ranges_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamIPRangesListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamIpRangesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamIpRangesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamIPRangesListOKBody) contextValidateResults(ctx context.Context, for if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamIpRangesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamIpRangesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go b/netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go index 2839ee620..94594d4cc 100644 --- a/netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_create_parameters.go @@ -78,11 +78,11 @@ func NewIpamPrefixesAvailableIpsCreateParamsWithHTTPClient(client *http.Client) type IpamPrefixesAvailableIpsCreateParams struct { // Data. - Data []*models.AvailableIP + Data *models.WritableAvailableIP /* ID. - A unique integer value identifying this prefix. + A unique integer value identifying this IP address. */ ID int64 @@ -140,13 +140,13 @@ func (o *IpamPrefixesAvailableIpsCreateParams) SetHTTPClient(client *http.Client } // WithData adds the data to the ipam prefixes available ips create params -func (o *IpamPrefixesAvailableIpsCreateParams) WithData(data []*models.AvailableIP) *IpamPrefixesAvailableIpsCreateParams { +func (o *IpamPrefixesAvailableIpsCreateParams) WithData(data *models.WritableAvailableIP) *IpamPrefixesAvailableIpsCreateParams { o.SetData(data) return o } // SetData adds the data to the ipam prefixes available ips create params -func (o *IpamPrefixesAvailableIpsCreateParams) SetData(data []*models.AvailableIP) { +func (o *IpamPrefixesAvailableIpsCreateParams) SetData(data *models.WritableAvailableIP) { o.Data = data } diff --git a/netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go b/netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go index d76689792..2248dffd2 100644 --- a/netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_create_responses.go @@ -59,13 +59,13 @@ func NewIpamPrefixesAvailableIpsCreateCreated() *IpamPrefixesAvailableIpsCreateC IpamPrefixesAvailableIpsCreateCreated ipam prefixes available ips create created */ type IpamPrefixesAvailableIpsCreateCreated struct { - Payload []*models.AvailableIP + Payload []*models.IPAddress } func (o *IpamPrefixesAvailableIpsCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsCreateCreated %+v", 201, o.Payload) } -func (o *IpamPrefixesAvailableIpsCreateCreated) GetPayload() []*models.AvailableIP { +func (o *IpamPrefixesAvailableIpsCreateCreated) GetPayload() []*models.IPAddress { return o.Payload } diff --git a/netbox/client/ipam/ipam_prefixes_available_ips_read_parameters.go b/netbox/client/ipam/ipam_prefixes_available_ips_list_parameters.go similarity index 55% rename from netbox/client/ipam/ipam_prefixes_available_ips_read_parameters.go rename to netbox/client/ipam/ipam_prefixes_available_ips_list_parameters.go index d94605392..b545e84ed 100644 --- a/netbox/client/ipam/ipam_prefixes_available_ips_read_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_list_parameters.go @@ -32,52 +32,52 @@ import ( "github.com/go-openapi/swag" ) -// NewIpamPrefixesAvailableIpsReadParams creates a new IpamPrefixesAvailableIpsReadParams object, +// NewIpamPrefixesAvailableIpsListParams creates a new IpamPrefixesAvailableIpsListParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewIpamPrefixesAvailableIpsReadParams() *IpamPrefixesAvailableIpsReadParams { - return &IpamPrefixesAvailableIpsReadParams{ +func NewIpamPrefixesAvailableIpsListParams() *IpamPrefixesAvailableIpsListParams { + return &IpamPrefixesAvailableIpsListParams{ timeout: cr.DefaultTimeout, } } -// NewIpamPrefixesAvailableIpsReadParamsWithTimeout creates a new IpamPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsListParamsWithTimeout creates a new IpamPrefixesAvailableIpsListParams object // with the ability to set a timeout on a request. -func NewIpamPrefixesAvailableIpsReadParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsReadParams { - return &IpamPrefixesAvailableIpsReadParams{ +func NewIpamPrefixesAvailableIpsListParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsListParams { + return &IpamPrefixesAvailableIpsListParams{ timeout: timeout, } } -// NewIpamPrefixesAvailableIpsReadParamsWithContext creates a new IpamPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsListParamsWithContext creates a new IpamPrefixesAvailableIpsListParams object // with the ability to set a context for a request. -func NewIpamPrefixesAvailableIpsReadParamsWithContext(ctx context.Context) *IpamPrefixesAvailableIpsReadParams { - return &IpamPrefixesAvailableIpsReadParams{ +func NewIpamPrefixesAvailableIpsListParamsWithContext(ctx context.Context) *IpamPrefixesAvailableIpsListParams { + return &IpamPrefixesAvailableIpsListParams{ Context: ctx, } } -// NewIpamPrefixesAvailableIpsReadParamsWithHTTPClient creates a new IpamPrefixesAvailableIpsReadParams object +// NewIpamPrefixesAvailableIpsListParamsWithHTTPClient creates a new IpamPrefixesAvailableIpsListParams object // with the ability to set a custom HTTPClient for a request. -func NewIpamPrefixesAvailableIpsReadParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsReadParams { - return &IpamPrefixesAvailableIpsReadParams{ +func NewIpamPrefixesAvailableIpsListParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsListParams { + return &IpamPrefixesAvailableIpsListParams{ HTTPClient: client, } } -/* IpamPrefixesAvailableIpsReadParams contains all the parameters to send to the API endpoint - for the ipam prefixes available ips read operation. +/* IpamPrefixesAvailableIpsListParams contains all the parameters to send to the API endpoint + for the ipam prefixes available ips list operation. Typically these are written to a http.Request. */ -type IpamPrefixesAvailableIpsReadParams struct { +type IpamPrefixesAvailableIpsListParams struct { /* ID. - A unique integer value identifying this prefix. + A unique integer value identifying this IP address. */ ID int64 @@ -86,67 +86,67 @@ type IpamPrefixesAvailableIpsReadParams struct { HTTPClient *http.Client } -// WithDefaults hydrates default values in the ipam prefixes available ips read params (not the query body). +// WithDefaults hydrates default values in the ipam prefixes available ips list params (not the query body). // // All values with no default are reset to their zero value. -func (o *IpamPrefixesAvailableIpsReadParams) WithDefaults() *IpamPrefixesAvailableIpsReadParams { +func (o *IpamPrefixesAvailableIpsListParams) WithDefaults() *IpamPrefixesAvailableIpsListParams { o.SetDefaults() return o } -// SetDefaults hydrates default values in the ipam prefixes available ips read params (not the query body). +// SetDefaults hydrates default values in the ipam prefixes available ips list params (not the query body). // // All values with no default are reset to their zero value. -func (o *IpamPrefixesAvailableIpsReadParams) SetDefaults() { +func (o *IpamPrefixesAvailableIpsListParams) SetDefaults() { // no default values defined for this parameter } -// WithTimeout adds the timeout to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsReadParams { +// WithTimeout adds the timeout to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailableIpsListParams { o.SetTimeout(timeout) return o } -// SetTimeout adds the timeout to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) SetTimeout(timeout time.Duration) { +// SetTimeout adds the timeout to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } -// WithContext adds the context to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) WithContext(ctx context.Context) *IpamPrefixesAvailableIpsReadParams { +// WithContext adds the context to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) WithContext(ctx context.Context) *IpamPrefixesAvailableIpsListParams { o.SetContext(ctx) return o } -// SetContext adds the context to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) SetContext(ctx context.Context) { +// SetContext adds the context to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) SetContext(ctx context.Context) { o.Context = ctx } -// WithHTTPClient adds the HTTPClient to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsReadParams { +// WithHTTPClient adds the HTTPClient to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailableIpsListParams { o.SetHTTPClient(client) return o } -// SetHTTPClient adds the HTTPClient to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) SetHTTPClient(client *http.Client) { +// SetHTTPClient adds the HTTPClient to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithID adds the id to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) WithID(id int64) *IpamPrefixesAvailableIpsReadParams { +// WithID adds the id to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) WithID(id int64) *IpamPrefixesAvailableIpsListParams { o.SetID(id) return o } -// SetID adds the id to the ipam prefixes available ips read params -func (o *IpamPrefixesAvailableIpsReadParams) SetID(id int64) { +// SetID adds the id to the ipam prefixes available ips list params +func (o *IpamPrefixesAvailableIpsListParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IpamPrefixesAvailableIpsReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesAvailableIpsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ipam_prefixes_available_ips_read_responses.go b/netbox/client/ipam/ipam_prefixes_available_ips_list_responses.go similarity index 67% rename from netbox/client/ipam/ipam_prefixes_available_ips_read_responses.go rename to netbox/client/ipam/ipam_prefixes_available_ips_list_responses.go index 76812c50c..53aa6c57e 100644 --- a/netbox/client/ipam/ipam_prefixes_available_ips_read_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_ips_list_responses.go @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// IpamPrefixesAvailableIpsReadReader is a Reader for the IpamPrefixesAvailableIpsRead structure. -type IpamPrefixesAvailableIpsReadReader struct { +// IpamPrefixesAvailableIpsListReader is a Reader for the IpamPrefixesAvailableIpsList structure. +type IpamPrefixesAvailableIpsListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IpamPrefixesAvailableIpsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesAvailableIpsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewIpamPrefixesAvailableIpsReadOK() + result := NewIpamPrefixesAvailableIpsListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,27 +49,27 @@ func (o *IpamPrefixesAvailableIpsReadReader) ReadResponse(response runtime.Clien } } -// NewIpamPrefixesAvailableIpsReadOK creates a IpamPrefixesAvailableIpsReadOK with default headers values -func NewIpamPrefixesAvailableIpsReadOK() *IpamPrefixesAvailableIpsReadOK { - return &IpamPrefixesAvailableIpsReadOK{} +// NewIpamPrefixesAvailableIpsListOK creates a IpamPrefixesAvailableIpsListOK with default headers values +func NewIpamPrefixesAvailableIpsListOK() *IpamPrefixesAvailableIpsListOK { + return &IpamPrefixesAvailableIpsListOK{} } -/* IpamPrefixesAvailableIpsReadOK describes a response with status code 200, with default header values. +/* IpamPrefixesAvailableIpsListOK describes a response with status code 200, with default header values. -IpamPrefixesAvailableIpsReadOK ipam prefixes available ips read o k +IpamPrefixesAvailableIpsListOK ipam prefixes available ips list o k */ -type IpamPrefixesAvailableIpsReadOK struct { +type IpamPrefixesAvailableIpsListOK struct { Payload []*models.AvailableIP } -func (o *IpamPrefixesAvailableIpsReadOK) Error() string { - return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsReadOK %+v", 200, o.Payload) +func (o *IpamPrefixesAvailableIpsListOK) Error() string { + return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-ips/][%d] ipamPrefixesAvailableIpsListOK %+v", 200, o.Payload) } -func (o *IpamPrefixesAvailableIpsReadOK) GetPayload() []*models.AvailableIP { +func (o *IpamPrefixesAvailableIpsListOK) GetPayload() []*models.AvailableIP { return o.Payload } -func (o *IpamPrefixesAvailableIpsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesAvailableIpsListOK) 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 { diff --git a/netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go index 157f2554d..da7ddb07c 100644 --- a/netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_create_responses.go @@ -59,22 +59,20 @@ func NewIpamPrefixesAvailablePrefixesCreateCreated() *IpamPrefixesAvailablePrefi IpamPrefixesAvailablePrefixesCreateCreated ipam prefixes available prefixes create created */ type IpamPrefixesAvailablePrefixesCreateCreated struct { - Payload *models.Prefix + Payload []*models.Prefix } func (o *IpamPrefixesAvailablePrefixesCreateCreated) Error() string { return fmt.Sprintf("[POST /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesCreateCreated %+v", 201, o.Payload) } -func (o *IpamPrefixesAvailablePrefixesCreateCreated) GetPayload() *models.Prefix { +func (o *IpamPrefixesAvailablePrefixesCreateCreated) GetPayload() []*models.Prefix { return o.Payload } func (o *IpamPrefixesAvailablePrefixesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Prefix) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/netbox/client/ipam/ipam_prefixes_available_prefixes_read_parameters.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_list_parameters.go similarity index 54% rename from netbox/client/ipam/ipam_prefixes_available_prefixes_read_parameters.go rename to netbox/client/ipam/ipam_prefixes_available_prefixes_list_parameters.go index 770fe7cbf..357280d26 100644 --- a/netbox/client/ipam/ipam_prefixes_available_prefixes_read_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_list_parameters.go @@ -32,48 +32,48 @@ import ( "github.com/go-openapi/swag" ) -// NewIpamPrefixesAvailablePrefixesReadParams creates a new IpamPrefixesAvailablePrefixesReadParams object, +// NewIpamPrefixesAvailablePrefixesListParams creates a new IpamPrefixesAvailablePrefixesListParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewIpamPrefixesAvailablePrefixesReadParams() *IpamPrefixesAvailablePrefixesReadParams { - return &IpamPrefixesAvailablePrefixesReadParams{ +func NewIpamPrefixesAvailablePrefixesListParams() *IpamPrefixesAvailablePrefixesListParams { + return &IpamPrefixesAvailablePrefixesListParams{ timeout: cr.DefaultTimeout, } } -// NewIpamPrefixesAvailablePrefixesReadParamsWithTimeout creates a new IpamPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesListParamsWithTimeout creates a new IpamPrefixesAvailablePrefixesListParams object // with the ability to set a timeout on a request. -func NewIpamPrefixesAvailablePrefixesReadParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesReadParams { - return &IpamPrefixesAvailablePrefixesReadParams{ +func NewIpamPrefixesAvailablePrefixesListParamsWithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesListParams { + return &IpamPrefixesAvailablePrefixesListParams{ timeout: timeout, } } -// NewIpamPrefixesAvailablePrefixesReadParamsWithContext creates a new IpamPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesListParamsWithContext creates a new IpamPrefixesAvailablePrefixesListParams object // with the ability to set a context for a request. -func NewIpamPrefixesAvailablePrefixesReadParamsWithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesReadParams { - return &IpamPrefixesAvailablePrefixesReadParams{ +func NewIpamPrefixesAvailablePrefixesListParamsWithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesListParams { + return &IpamPrefixesAvailablePrefixesListParams{ Context: ctx, } } -// NewIpamPrefixesAvailablePrefixesReadParamsWithHTTPClient creates a new IpamPrefixesAvailablePrefixesReadParams object +// NewIpamPrefixesAvailablePrefixesListParamsWithHTTPClient creates a new IpamPrefixesAvailablePrefixesListParams object // with the ability to set a custom HTTPClient for a request. -func NewIpamPrefixesAvailablePrefixesReadParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesReadParams { - return &IpamPrefixesAvailablePrefixesReadParams{ +func NewIpamPrefixesAvailablePrefixesListParamsWithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesListParams { + return &IpamPrefixesAvailablePrefixesListParams{ HTTPClient: client, } } -/* IpamPrefixesAvailablePrefixesReadParams contains all the parameters to send to the API endpoint - for the ipam prefixes available prefixes read operation. +/* IpamPrefixesAvailablePrefixesListParams contains all the parameters to send to the API endpoint + for the ipam prefixes available prefixes list operation. Typically these are written to a http.Request. */ -type IpamPrefixesAvailablePrefixesReadParams struct { +type IpamPrefixesAvailablePrefixesListParams struct { /* ID. @@ -86,67 +86,67 @@ type IpamPrefixesAvailablePrefixesReadParams struct { HTTPClient *http.Client } -// WithDefaults hydrates default values in the ipam prefixes available prefixes read params (not the query body). +// WithDefaults hydrates default values in the ipam prefixes available prefixes list params (not the query body). // // All values with no default are reset to their zero value. -func (o *IpamPrefixesAvailablePrefixesReadParams) WithDefaults() *IpamPrefixesAvailablePrefixesReadParams { +func (o *IpamPrefixesAvailablePrefixesListParams) WithDefaults() *IpamPrefixesAvailablePrefixesListParams { o.SetDefaults() return o } -// SetDefaults hydrates default values in the ipam prefixes available prefixes read params (not the query body). +// SetDefaults hydrates default values in the ipam prefixes available prefixes list params (not the query body). // // All values with no default are reset to their zero value. -func (o *IpamPrefixesAvailablePrefixesReadParams) SetDefaults() { +func (o *IpamPrefixesAvailablePrefixesListParams) SetDefaults() { // no default values defined for this parameter } -// WithTimeout adds the timeout to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesReadParams { +// WithTimeout adds the timeout to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) WithTimeout(timeout time.Duration) *IpamPrefixesAvailablePrefixesListParams { o.SetTimeout(timeout) return o } -// SetTimeout adds the timeout to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) SetTimeout(timeout time.Duration) { +// SetTimeout adds the timeout to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } -// WithContext adds the context to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) WithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesReadParams { +// WithContext adds the context to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) WithContext(ctx context.Context) *IpamPrefixesAvailablePrefixesListParams { o.SetContext(ctx) return o } -// SetContext adds the context to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) SetContext(ctx context.Context) { +// SetContext adds the context to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) SetContext(ctx context.Context) { o.Context = ctx } -// WithHTTPClient adds the HTTPClient to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesReadParams { +// WithHTTPClient adds the HTTPClient to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) WithHTTPClient(client *http.Client) *IpamPrefixesAvailablePrefixesListParams { o.SetHTTPClient(client) return o } -// SetHTTPClient adds the HTTPClient to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) SetHTTPClient(client *http.Client) { +// SetHTTPClient adds the HTTPClient to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithID adds the id to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) WithID(id int64) *IpamPrefixesAvailablePrefixesReadParams { +// WithID adds the id to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) WithID(id int64) *IpamPrefixesAvailablePrefixesListParams { o.SetID(id) return o } -// SetID adds the id to the ipam prefixes available prefixes read params -func (o *IpamPrefixesAvailablePrefixesReadParams) SetID(id int64) { +// SetID adds the id to the ipam prefixes available prefixes list params +func (o *IpamPrefixesAvailablePrefixesListParams) SetID(id int64) { o.ID = id } // WriteToRequest writes these params to a swagger request -func (o *IpamPrefixesAvailablePrefixesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *IpamPrefixesAvailablePrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err diff --git a/netbox/client/ipam/ipam_prefixes_available_prefixes_read_responses.go b/netbox/client/ipam/ipam_prefixes_available_prefixes_list_responses.go similarity index 65% rename from netbox/client/ipam/ipam_prefixes_available_prefixes_read_responses.go rename to netbox/client/ipam/ipam_prefixes_available_prefixes_list_responses.go index 479d027f8..760294d0b 100644 --- a/netbox/client/ipam/ipam_prefixes_available_prefixes_read_responses.go +++ b/netbox/client/ipam/ipam_prefixes_available_prefixes_list_responses.go @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// IpamPrefixesAvailablePrefixesReadReader is a Reader for the IpamPrefixesAvailablePrefixesRead structure. -type IpamPrefixesAvailablePrefixesReadReader struct { +// IpamPrefixesAvailablePrefixesListReader is a Reader for the IpamPrefixesAvailablePrefixesList structure. +type IpamPrefixesAvailablePrefixesListReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *IpamPrefixesAvailablePrefixesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamPrefixesAvailablePrefixesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewIpamPrefixesAvailablePrefixesReadOK() + result := NewIpamPrefixesAvailablePrefixesListOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,27 +49,27 @@ func (o *IpamPrefixesAvailablePrefixesReadReader) ReadResponse(response runtime. } } -// NewIpamPrefixesAvailablePrefixesReadOK creates a IpamPrefixesAvailablePrefixesReadOK with default headers values -func NewIpamPrefixesAvailablePrefixesReadOK() *IpamPrefixesAvailablePrefixesReadOK { - return &IpamPrefixesAvailablePrefixesReadOK{} +// NewIpamPrefixesAvailablePrefixesListOK creates a IpamPrefixesAvailablePrefixesListOK with default headers values +func NewIpamPrefixesAvailablePrefixesListOK() *IpamPrefixesAvailablePrefixesListOK { + return &IpamPrefixesAvailablePrefixesListOK{} } -/* IpamPrefixesAvailablePrefixesReadOK describes a response with status code 200, with default header values. +/* IpamPrefixesAvailablePrefixesListOK describes a response with status code 200, with default header values. -IpamPrefixesAvailablePrefixesReadOK ipam prefixes available prefixes read o k +IpamPrefixesAvailablePrefixesListOK ipam prefixes available prefixes list o k */ -type IpamPrefixesAvailablePrefixesReadOK struct { +type IpamPrefixesAvailablePrefixesListOK struct { Payload []*models.AvailablePrefix } -func (o *IpamPrefixesAvailablePrefixesReadOK) Error() string { - return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesReadOK %+v", 200, o.Payload) +func (o *IpamPrefixesAvailablePrefixesListOK) Error() string { + return fmt.Sprintf("[GET /ipam/prefixes/{id}/available-prefixes/][%d] ipamPrefixesAvailablePrefixesListOK %+v", 200, o.Payload) } -func (o *IpamPrefixesAvailablePrefixesReadOK) GetPayload() []*models.AvailablePrefix { +func (o *IpamPrefixesAvailablePrefixesListOK) GetPayload() []*models.AvailablePrefix { return o.Payload } -func (o *IpamPrefixesAvailablePrefixesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamPrefixesAvailablePrefixesListOK) 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 { diff --git a/netbox/client/ipam/ipam_prefixes_list_parameters.go b/netbox/client/ipam/ipam_prefixes_list_parameters.go index 312ccdbe3..8e8de2ff9 100644 --- a/netbox/client/ipam/ipam_prefixes_list_parameters.go +++ b/netbox/client/ipam/ipam_prefixes_list_parameters.go @@ -123,6 +123,36 @@ type IpamPrefixesListParams struct { // Depthn. Depthn *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Family. Family *float64 @@ -285,6 +315,21 @@ type IpamPrefixesListParams struct { // VlanVid. VlanVid *float64 + // VlanVidGt. + VlanVidGt *float64 + + // VlanVidGte. + VlanVidGte *float64 + + // VlanVidLt. + VlanVidLt *float64 + + // VlanVidLte. + VlanVidLte *float64 + + // VlanVidn. + VlanVidn *float64 + // Vrf. Vrf *string @@ -532,6 +577,116 @@ func (o *IpamPrefixesListParams) SetDepthn(depthn *string) { o.Depthn = depthn } +// WithDescription adds the description to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescription(description *string) *IpamPrefixesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionIc(descriptionIc *string) *IpamPrefixesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionIe(descriptionIe *string) *IpamPrefixesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionIew(descriptionIew *string) *IpamPrefixesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionIsw(descriptionIsw *string) *IpamPrefixesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionn(descriptionn *string) *IpamPrefixesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionNic(descriptionNic *string) *IpamPrefixesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionNie(descriptionNie *string) *IpamPrefixesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionNiew(descriptionNiew *string) *IpamPrefixesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithDescriptionNisw(descriptionNisw *string) *IpamPrefixesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithFamily adds the family to the ipam prefixes list params func (o *IpamPrefixesListParams) WithFamily(family *float64) *IpamPrefixesListParams { o.SetFamily(family) @@ -1104,6 +1259,61 @@ func (o *IpamPrefixesListParams) SetVlanVid(vlanVid *float64) { o.VlanVid = vlanVid } +// WithVlanVidGt adds the vlanVidGt to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithVlanVidGt(vlanVidGt *float64) *IpamPrefixesListParams { + o.SetVlanVidGt(vlanVidGt) + return o +} + +// SetVlanVidGt adds the vlanVidGt to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetVlanVidGt(vlanVidGt *float64) { + o.VlanVidGt = vlanVidGt +} + +// WithVlanVidGte adds the vlanVidGte to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithVlanVidGte(vlanVidGte *float64) *IpamPrefixesListParams { + o.SetVlanVidGte(vlanVidGte) + return o +} + +// SetVlanVidGte adds the vlanVidGte to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetVlanVidGte(vlanVidGte *float64) { + o.VlanVidGte = vlanVidGte +} + +// WithVlanVidLt adds the vlanVidLt to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithVlanVidLt(vlanVidLt *float64) *IpamPrefixesListParams { + o.SetVlanVidLt(vlanVidLt) + return o +} + +// SetVlanVidLt adds the vlanVidLt to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetVlanVidLt(vlanVidLt *float64) { + o.VlanVidLt = vlanVidLt +} + +// WithVlanVidLte adds the vlanVidLte to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithVlanVidLte(vlanVidLte *float64) *IpamPrefixesListParams { + o.SetVlanVidLte(vlanVidLte) + return o +} + +// SetVlanVidLte adds the vlanVidLte to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetVlanVidLte(vlanVidLte *float64) { + o.VlanVidLte = vlanVidLte +} + +// WithVlanVidn adds the vlanVidn to the ipam prefixes list params +func (o *IpamPrefixesListParams) WithVlanVidn(vlanVidn *float64) *IpamPrefixesListParams { + o.SetVlanVidn(vlanVidn) + return o +} + +// SetVlanVidn adds the vlanVidN to the ipam prefixes list params +func (o *IpamPrefixesListParams) SetVlanVidn(vlanVidn *float64) { + o.VlanVidn = vlanVidn +} + // WithVrf adds the vrf to the ipam prefixes list params func (o *IpamPrefixesListParams) WithVrf(vrf *string) *IpamPrefixesListParams { o.SetVrf(vrf) @@ -1450,6 +1660,176 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Family != nil { // query param family @@ -2334,6 +2714,91 @@ func (o *IpamPrefixesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.VlanVidGt != nil { + + // query param vlan_vid__gt + var qrVlanVidGt float64 + + if o.VlanVidGt != nil { + qrVlanVidGt = *o.VlanVidGt + } + qVlanVidGt := swag.FormatFloat64(qrVlanVidGt) + if qVlanVidGt != "" { + + if err := r.SetQueryParam("vlan_vid__gt", qVlanVidGt); err != nil { + return err + } + } + } + + if o.VlanVidGte != nil { + + // query param vlan_vid__gte + var qrVlanVidGte float64 + + if o.VlanVidGte != nil { + qrVlanVidGte = *o.VlanVidGte + } + qVlanVidGte := swag.FormatFloat64(qrVlanVidGte) + if qVlanVidGte != "" { + + if err := r.SetQueryParam("vlan_vid__gte", qVlanVidGte); err != nil { + return err + } + } + } + + if o.VlanVidLt != nil { + + // query param vlan_vid__lt + var qrVlanVidLt float64 + + if o.VlanVidLt != nil { + qrVlanVidLt = *o.VlanVidLt + } + qVlanVidLt := swag.FormatFloat64(qrVlanVidLt) + if qVlanVidLt != "" { + + if err := r.SetQueryParam("vlan_vid__lt", qVlanVidLt); err != nil { + return err + } + } + } + + if o.VlanVidLte != nil { + + // query param vlan_vid__lte + var qrVlanVidLte float64 + + if o.VlanVidLte != nil { + qrVlanVidLte = *o.VlanVidLte + } + qVlanVidLte := swag.FormatFloat64(qrVlanVidLte) + if qVlanVidLte != "" { + + if err := r.SetQueryParam("vlan_vid__lte", qVlanVidLte); err != nil { + return err + } + } + } + + if o.VlanVidn != nil { + + // query param vlan_vid__n + var qrVlanVidn float64 + + if o.VlanVidn != nil { + qrVlanVidn = *o.VlanVidn + } + qVlanVidn := swag.FormatFloat64(qrVlanVidn) + if qVlanVidn != "" { + + if err := r.SetQueryParam("vlan_vid__n", qVlanVidn); err != nil { + return err + } + } + } + if o.Vrf != nil { // query param vrf diff --git a/netbox/client/ipam/ipam_prefixes_list_responses.go b/netbox/client/ipam/ipam_prefixes_list_responses.go index e8c2e3e41..f78888928 100644 --- a/netbox/client/ipam/ipam_prefixes_list_responses.go +++ b/netbox/client/ipam/ipam_prefixes_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamPrefixesListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamPrefixesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamPrefixesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamPrefixesListOKBody) contextValidateResults(ctx context.Context, for if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamPrefixesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamPrefixesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_rirs_list_parameters.go b/netbox/client/ipam/ipam_rirs_list_parameters.go index b947d1483..310177356 100644 --- a/netbox/client/ipam/ipam_rirs_list_parameters.go +++ b/netbox/client/ipam/ipam_rirs_list_parameters.go @@ -87,9 +87,6 @@ type IpamRirsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -156,9 +153,6 @@ type IpamRirsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -198,9 +192,6 @@ type IpamRirsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -228,6 +219,12 @@ type IpamRirsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -325,17 +322,6 @@ func (o *IpamRirsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the ipam rirs list params -func (o *IpamRirsListParams) WithDescriptionEmpty(descriptionEmpty *string) *IpamRirsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the ipam rirs list params -func (o *IpamRirsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the ipam rirs list params func (o *IpamRirsListParams) WithDescriptionIc(descriptionIc *string) *IpamRirsListParams { o.SetDescriptionIc(descriptionIc) @@ -567,17 +553,6 @@ func (o *IpamRirsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam rirs list params -func (o *IpamRirsListParams) WithNameEmpty(nameEmpty *string) *IpamRirsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam rirs list params -func (o *IpamRirsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam rirs list params func (o *IpamRirsListParams) WithNameIc(nameIc *string) *IpamRirsListParams { o.SetNameIc(nameIc) @@ -710,17 +685,6 @@ func (o *IpamRirsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the ipam rirs list params -func (o *IpamRirsListParams) WithSlugEmpty(slugEmpty *string) *IpamRirsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the ipam rirs list params -func (o *IpamRirsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the ipam rirs list params func (o *IpamRirsListParams) WithSlugIc(slugIc *string) *IpamRirsListParams { o.SetSlugIc(slugIc) @@ -820,6 +784,28 @@ func (o *IpamRirsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the ipam rirs list params +func (o *IpamRirsListParams) WithTag(tag *string) *IpamRirsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam rirs list params +func (o *IpamRirsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam rirs list params +func (o *IpamRirsListParams) WithTagn(tagn *string) *IpamRirsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam rirs list params +func (o *IpamRirsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -896,23 +882,6 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1270,23 +1239,6 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1491,23 +1443,6 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1661,6 +1596,40 @@ func (o *IpamRirsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + 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/netbox/client/ipam/ipam_rirs_list_responses.go b/netbox/client/ipam/ipam_rirs_list_responses.go index 50e327c01..dc1b55cd6 100644 --- a/netbox/client/ipam/ipam_rirs_list_responses.go +++ b/netbox/client/ipam/ipam_rirs_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamRirsListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamRirsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamRirsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamRirsListOKBody) contextValidateResults(ctx context.Context, formats if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamRirsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamRirsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_roles_list_parameters.go b/netbox/client/ipam/ipam_roles_list_parameters.go index 9d3844e32..dd9cd105f 100644 --- a/netbox/client/ipam/ipam_roles_list_parameters.go +++ b/netbox/client/ipam/ipam_roles_list_parameters.go @@ -84,6 +84,36 @@ type IpamRolesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ID. ID *string @@ -120,9 +150,6 @@ type IpamRolesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -162,9 +189,6 @@ type IpamRolesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -192,6 +216,12 @@ type IpamRolesListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -278,6 +308,116 @@ func (o *IpamRolesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the ipam roles list params +func (o *IpamRolesListParams) WithDescription(description *string) *IpamRolesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam roles list params +func (o *IpamRolesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionIc(descriptionIc *string) *IpamRolesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionIe(descriptionIe *string) *IpamRolesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionIew(descriptionIew *string) *IpamRolesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionIsw(descriptionIsw *string) *IpamRolesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionn(descriptionn *string) *IpamRolesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionNic(descriptionNic *string) *IpamRolesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionNie(descriptionNie *string) *IpamRolesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionNiew(descriptionNiew *string) *IpamRolesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam roles list params +func (o *IpamRolesListParams) WithDescriptionNisw(descriptionNisw *string) *IpamRolesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam roles list params +func (o *IpamRolesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithID adds the id to the ipam roles list params func (o *IpamRolesListParams) WithID(id *string) *IpamRolesListParams { o.SetID(id) @@ -399,17 +539,6 @@ func (o *IpamRolesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam roles list params -func (o *IpamRolesListParams) WithNameEmpty(nameEmpty *string) *IpamRolesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam roles list params -func (o *IpamRolesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam roles list params func (o *IpamRolesListParams) WithNameIc(nameIc *string) *IpamRolesListParams { o.SetNameIc(nameIc) @@ -542,17 +671,6 @@ func (o *IpamRolesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the ipam roles list params -func (o *IpamRolesListParams) WithSlugEmpty(slugEmpty *string) *IpamRolesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the ipam roles list params -func (o *IpamRolesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the ipam roles list params func (o *IpamRolesListParams) WithSlugIc(slugIc *string) *IpamRolesListParams { o.SetSlugIc(slugIc) @@ -652,6 +770,28 @@ func (o *IpamRolesListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the ipam roles list params +func (o *IpamRolesListParams) WithTag(tag *string) *IpamRolesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam roles list params +func (o *IpamRolesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam roles list params +func (o *IpamRolesListParams) WithTagn(tagn *string) *IpamRolesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam roles list params +func (o *IpamRolesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -711,6 +851,176 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ID != nil { // query param id @@ -898,23 +1208,6 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1119,23 +1412,6 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1289,6 +1565,40 @@ func (o *IpamRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + 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/netbox/client/ipam/ipam_roles_list_responses.go b/netbox/client/ipam/ipam_roles_list_responses.go index 78b93e830..d22b5454a 100644 --- a/netbox/client/ipam/ipam_roles_list_responses.go +++ b/netbox/client/ipam/ipam_roles_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamRolesListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamRolesListOKBody) contextValidateResults(ctx context.Context, format if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_route_targets_list_parameters.go b/netbox/client/ipam/ipam_route_targets_list_parameters.go index 5ac8c7ec2..5be208e5f 100644 --- a/netbox/client/ipam/ipam_route_targets_list_parameters.go +++ b/netbox/client/ipam/ipam_route_targets_list_parameters.go @@ -84,6 +84,36 @@ type IpamRouteTargetsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // ExportingVrf. ExportingVrf *string @@ -144,9 +174,6 @@ type IpamRouteTargetsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -299,6 +326,116 @@ func (o *IpamRouteTargetsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescription(description *string) *IpamRouteTargetsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionIc(descriptionIc *string) *IpamRouteTargetsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionIe(descriptionIe *string) *IpamRouteTargetsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionIew(descriptionIew *string) *IpamRouteTargetsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionIsw(descriptionIsw *string) *IpamRouteTargetsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionn(descriptionn *string) *IpamRouteTargetsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionNic(descriptionNic *string) *IpamRouteTargetsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionNie(descriptionNie *string) *IpamRouteTargetsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionNiew(descriptionNiew *string) *IpamRouteTargetsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam route targets list params +func (o *IpamRouteTargetsListParams) WithDescriptionNisw(descriptionNisw *string) *IpamRouteTargetsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam route targets list params +func (o *IpamRouteTargetsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithExportingVrf adds the exportingVrf to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithExportingVrf(exportingVrf *string) *IpamRouteTargetsListParams { o.SetExportingVrf(exportingVrf) @@ -508,17 +645,6 @@ func (o *IpamRouteTargetsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam route targets list params -func (o *IpamRouteTargetsListParams) WithNameEmpty(nameEmpty *string) *IpamRouteTargetsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam route targets list params -func (o *IpamRouteTargetsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam route targets list params func (o *IpamRouteTargetsListParams) WithNameIc(nameIc *string) *IpamRouteTargetsListParams { o.SetNameIc(nameIc) @@ -809,6 +935,176 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.ExportingVrf != nil { // query param exporting_vrf @@ -1132,23 +1428,6 @@ func (o *IpamRouteTargetsListParams) WriteToRequest(r runtime.ClientRequest, reg } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/ipam/ipam_route_targets_list_responses.go b/netbox/client/ipam/ipam_route_targets_list_responses.go index 6dea64cd8..bd00e9ba4 100644 --- a/netbox/client/ipam/ipam_route_targets_list_responses.go +++ b/netbox/client/ipam/ipam_route_targets_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamRouteTargetsListOKBody) validateResults(formats strfmt.Registry) er if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamRouteTargetsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamRouteTargetsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamRouteTargetsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamRouteTargetsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamRouteTargetsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_service_templates_bulk_delete_parameters.go b/netbox/client/ipam/ipam_service_templates_bulk_delete_parameters.go new file mode 100644 index 000000000..64c98d344 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 ipam + +// 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" +) + +// NewIpamServiceTemplatesBulkDeleteParams creates a new IpamServiceTemplatesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesBulkDeleteParams() *IpamServiceTemplatesBulkDeleteParams { + return &IpamServiceTemplatesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesBulkDeleteParamsWithTimeout creates a new IpamServiceTemplatesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesBulkDeleteParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesBulkDeleteParams { + return &IpamServiceTemplatesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesBulkDeleteParamsWithContext creates a new IpamServiceTemplatesBulkDeleteParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesBulkDeleteParamsWithContext(ctx context.Context) *IpamServiceTemplatesBulkDeleteParams { + return &IpamServiceTemplatesBulkDeleteParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesBulkDeleteParamsWithHTTPClient creates a new IpamServiceTemplatesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesBulkDeleteParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesBulkDeleteParams { + return &IpamServiceTemplatesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesBulkDeleteParams contains all the parameters to send to the API endpoint + for the ipam service templates bulk delete operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesBulkDeleteParams) WithDefaults() *IpamServiceTemplatesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates bulk delete params +func (o *IpamServiceTemplatesBulkDeleteParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates bulk delete params +func (o *IpamServiceTemplatesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates bulk delete params +func (o *IpamServiceTemplatesBulkDeleteParams) WithContext(ctx context.Context) *IpamServiceTemplatesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates bulk delete params +func (o *IpamServiceTemplatesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates bulk delete params +func (o *IpamServiceTemplatesBulkDeleteParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates bulk delete params +func (o *IpamServiceTemplatesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesBulkDeleteParams) 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/netbox/client/ipam/ipam_service_templates_bulk_delete_responses.go b/netbox/client/ipam/ipam_service_templates_bulk_delete_responses.go new file mode 100644 index 000000000..e01dada39 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamServiceTemplatesBulkDeleteReader is a Reader for the IpamServiceTemplatesBulkDelete structure. +type IpamServiceTemplatesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamServiceTemplatesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesBulkDeleteNoContent creates a IpamServiceTemplatesBulkDeleteNoContent with default headers values +func NewIpamServiceTemplatesBulkDeleteNoContent() *IpamServiceTemplatesBulkDeleteNoContent { + return &IpamServiceTemplatesBulkDeleteNoContent{} +} + +/* IpamServiceTemplatesBulkDeleteNoContent describes a response with status code 204, with default header values. + +IpamServiceTemplatesBulkDeleteNoContent ipam service templates bulk delete no content +*/ +type IpamServiceTemplatesBulkDeleteNoContent struct { +} + +func (o *IpamServiceTemplatesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/service-templates/][%d] ipamServiceTemplatesBulkDeleteNoContent ", 204) +} + +func (o *IpamServiceTemplatesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_bulk_partial_update_parameters.go b/netbox/client/ipam/ipam_service_templates_bulk_partial_update_parameters.go new file mode 100644 index 000000000..2dd5bf3c8 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamServiceTemplatesBulkPartialUpdateParams creates a new IpamServiceTemplatesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesBulkPartialUpdateParams() *IpamServiceTemplatesBulkPartialUpdateParams { + return &IpamServiceTemplatesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesBulkPartialUpdateParamsWithTimeout creates a new IpamServiceTemplatesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesBulkPartialUpdateParams { + return &IpamServiceTemplatesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesBulkPartialUpdateParamsWithContext creates a new IpamServiceTemplatesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesBulkPartialUpdateParamsWithContext(ctx context.Context) *IpamServiceTemplatesBulkPartialUpdateParams { + return &IpamServiceTemplatesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesBulkPartialUpdateParamsWithHTTPClient creates a new IpamServiceTemplatesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesBulkPartialUpdateParams { + return &IpamServiceTemplatesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam service templates bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableServiceTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesBulkPartialUpdateParams) WithDefaults() *IpamServiceTemplatesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) WithContext(ctx context.Context) *IpamServiceTemplatesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) WithData(data *models.WritableServiceTemplate) *IpamServiceTemplatesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam service templates bulk partial update params +func (o *IpamServiceTemplatesBulkPartialUpdateParams) SetData(data *models.WritableServiceTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_responses.go b/netbox/client/ipam/ipam_service_templates_bulk_partial_update_responses.go similarity index 59% rename from netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_responses.go rename to netbox/client/ipam/ipam_service_templates_bulk_partial_update_responses.go index 0fad714d7..516f97e20 100644 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_responses.go +++ b/netbox/client/ipam/ipam_service_templates_bulk_partial_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package plugins +package ipam // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// PluginsNextboxUISavedtopologiesUpdateReader is a Reader for the PluginsNextboxUISavedtopologiesUpdate structure. -type PluginsNextboxUISavedtopologiesUpdateReader struct { +// IpamServiceTemplatesBulkPartialUpdateReader is a Reader for the IpamServiceTemplatesBulkPartialUpdate structure. +type IpamServiceTemplatesBulkPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *PluginsNextboxUISavedtopologiesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *IpamServiceTemplatesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewPluginsNextboxUISavedtopologiesUpdateOK() + result := NewIpamServiceTemplatesBulkPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *PluginsNextboxUISavedtopologiesUpdateReader) ReadResponse(response runt } } -// NewPluginsNextboxUISavedtopologiesUpdateOK creates a PluginsNextboxUISavedtopologiesUpdateOK with default headers values -func NewPluginsNextboxUISavedtopologiesUpdateOK() *PluginsNextboxUISavedtopologiesUpdateOK { - return &PluginsNextboxUISavedtopologiesUpdateOK{} +// NewIpamServiceTemplatesBulkPartialUpdateOK creates a IpamServiceTemplatesBulkPartialUpdateOK with default headers values +func NewIpamServiceTemplatesBulkPartialUpdateOK() *IpamServiceTemplatesBulkPartialUpdateOK { + return &IpamServiceTemplatesBulkPartialUpdateOK{} } -/* PluginsNextboxUISavedtopologiesUpdateOK describes a response with status code 200, with default header values. +/* IpamServiceTemplatesBulkPartialUpdateOK describes a response with status code 200, with default header values. -PluginsNextboxUISavedtopologiesUpdateOK plugins nextbox Ui savedtopologies update o k +IpamServiceTemplatesBulkPartialUpdateOK ipam service templates bulk partial update o k */ -type PluginsNextboxUISavedtopologiesUpdateOK struct { - Payload *models.SavedTopology +type IpamServiceTemplatesBulkPartialUpdateOK struct { + Payload *models.ServiceTemplate } -func (o *PluginsNextboxUISavedtopologiesUpdateOK) Error() string { - return fmt.Sprintf("[PUT /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesUpdateOK %+v", 200, o.Payload) +func (o *IpamServiceTemplatesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/service-templates/][%d] ipamServiceTemplatesBulkPartialUpdateOK %+v", 200, o.Payload) } -func (o *PluginsNextboxUISavedtopologiesUpdateOK) GetPayload() *models.SavedTopology { +func (o *IpamServiceTemplatesBulkPartialUpdateOK) GetPayload() *models.ServiceTemplate { return o.Payload } -func (o *PluginsNextboxUISavedtopologiesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *IpamServiceTemplatesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SavedTopology) + o.Payload = new(models.ServiceTemplate) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/ipam/ipam_service_templates_bulk_update_parameters.go b/netbox/client/ipam/ipam_service_templates_bulk_update_parameters.go new file mode 100644 index 000000000..caff9390d --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamServiceTemplatesBulkUpdateParams creates a new IpamServiceTemplatesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesBulkUpdateParams() *IpamServiceTemplatesBulkUpdateParams { + return &IpamServiceTemplatesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesBulkUpdateParamsWithTimeout creates a new IpamServiceTemplatesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesBulkUpdateParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesBulkUpdateParams { + return &IpamServiceTemplatesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesBulkUpdateParamsWithContext creates a new IpamServiceTemplatesBulkUpdateParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesBulkUpdateParamsWithContext(ctx context.Context) *IpamServiceTemplatesBulkUpdateParams { + return &IpamServiceTemplatesBulkUpdateParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesBulkUpdateParamsWithHTTPClient creates a new IpamServiceTemplatesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesBulkUpdateParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesBulkUpdateParams { + return &IpamServiceTemplatesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesBulkUpdateParams contains all the parameters to send to the API endpoint + for the ipam service templates bulk update operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesBulkUpdateParams struct { + + // Data. + Data *models.WritableServiceTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesBulkUpdateParams) WithDefaults() *IpamServiceTemplatesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) WithContext(ctx context.Context) *IpamServiceTemplatesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) WithData(data *models.WritableServiceTemplate) *IpamServiceTemplatesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam service templates bulk update params +func (o *IpamServiceTemplatesBulkUpdateParams) SetData(data *models.WritableServiceTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_bulk_update_responses.go b/netbox/client/ipam/ipam_service_templates_bulk_update_responses.go new file mode 100644 index 000000000..b1fd48fac --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamServiceTemplatesBulkUpdateReader is a Reader for the IpamServiceTemplatesBulkUpdate structure. +type IpamServiceTemplatesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamServiceTemplatesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesBulkUpdateOK creates a IpamServiceTemplatesBulkUpdateOK with default headers values +func NewIpamServiceTemplatesBulkUpdateOK() *IpamServiceTemplatesBulkUpdateOK { + return &IpamServiceTemplatesBulkUpdateOK{} +} + +/* IpamServiceTemplatesBulkUpdateOK describes a response with status code 200, with default header values. + +IpamServiceTemplatesBulkUpdateOK ipam service templates bulk update o k +*/ +type IpamServiceTemplatesBulkUpdateOK struct { + Payload *models.ServiceTemplate +} + +func (o *IpamServiceTemplatesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/service-templates/][%d] ipamServiceTemplatesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *IpamServiceTemplatesBulkUpdateOK) GetPayload() *models.ServiceTemplate { + return o.Payload +} + +func (o *IpamServiceTemplatesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_create_parameters.go b/netbox/client/ipam/ipam_service_templates_create_parameters.go new file mode 100644 index 000000000..b28082459 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_create_parameters.go @@ -0,0 +1,163 @@ +// 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 ipam + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewIpamServiceTemplatesCreateParams creates a new IpamServiceTemplatesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesCreateParams() *IpamServiceTemplatesCreateParams { + return &IpamServiceTemplatesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesCreateParamsWithTimeout creates a new IpamServiceTemplatesCreateParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesCreateParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesCreateParams { + return &IpamServiceTemplatesCreateParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesCreateParamsWithContext creates a new IpamServiceTemplatesCreateParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesCreateParamsWithContext(ctx context.Context) *IpamServiceTemplatesCreateParams { + return &IpamServiceTemplatesCreateParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesCreateParamsWithHTTPClient creates a new IpamServiceTemplatesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesCreateParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesCreateParams { + return &IpamServiceTemplatesCreateParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesCreateParams contains all the parameters to send to the API endpoint + for the ipam service templates create operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesCreateParams struct { + + // Data. + Data *models.WritableServiceTemplate + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesCreateParams) WithDefaults() *IpamServiceTemplatesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) WithContext(ctx context.Context) *IpamServiceTemplatesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) WithData(data *models.WritableServiceTemplate) *IpamServiceTemplatesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam service templates create params +func (o *IpamServiceTemplatesCreateParams) SetData(data *models.WritableServiceTemplate) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_create_responses.go b/netbox/client/ipam/ipam_service_templates_create_responses.go new file mode 100644 index 000000000..72b490be2 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_create_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamServiceTemplatesCreateReader is a Reader for the IpamServiceTemplatesCreate structure. +type IpamServiceTemplatesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamServiceTemplatesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesCreateCreated creates a IpamServiceTemplatesCreateCreated with default headers values +func NewIpamServiceTemplatesCreateCreated() *IpamServiceTemplatesCreateCreated { + return &IpamServiceTemplatesCreateCreated{} +} + +/* IpamServiceTemplatesCreateCreated describes a response with status code 201, with default header values. + +IpamServiceTemplatesCreateCreated ipam service templates create created +*/ +type IpamServiceTemplatesCreateCreated struct { + Payload *models.ServiceTemplate +} + +func (o *IpamServiceTemplatesCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/service-templates/][%d] ipamServiceTemplatesCreateCreated %+v", 201, o.Payload) +} +func (o *IpamServiceTemplatesCreateCreated) GetPayload() *models.ServiceTemplate { + return o.Payload +} + +func (o *IpamServiceTemplatesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_delete_parameters.go b/netbox/client/ipam/ipam_service_templates_delete_parameters.go new file mode 100644 index 000000000..22c9f105d --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamServiceTemplatesDeleteParams creates a new IpamServiceTemplatesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesDeleteParams() *IpamServiceTemplatesDeleteParams { + return &IpamServiceTemplatesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesDeleteParamsWithTimeout creates a new IpamServiceTemplatesDeleteParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesDeleteParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesDeleteParams { + return &IpamServiceTemplatesDeleteParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesDeleteParamsWithContext creates a new IpamServiceTemplatesDeleteParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesDeleteParamsWithContext(ctx context.Context) *IpamServiceTemplatesDeleteParams { + return &IpamServiceTemplatesDeleteParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesDeleteParamsWithHTTPClient creates a new IpamServiceTemplatesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesDeleteParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesDeleteParams { + return &IpamServiceTemplatesDeleteParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesDeleteParams contains all the parameters to send to the API endpoint + for the ipam service templates delete operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesDeleteParams struct { + + /* ID. + + A unique integer value identifying this service template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesDeleteParams) WithDefaults() *IpamServiceTemplatesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) WithContext(ctx context.Context) *IpamServiceTemplatesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) WithID(id int64) *IpamServiceTemplatesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam service templates delete params +func (o *IpamServiceTemplatesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesDeleteParams) 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/netbox/client/ipam/ipam_service_templates_delete_responses.go b/netbox/client/ipam/ipam_service_templates_delete_responses.go new file mode 100644 index 000000000..393819ef2 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_delete_responses.go @@ -0,0 +1,68 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IpamServiceTemplatesDeleteReader is a Reader for the IpamServiceTemplatesDelete structure. +type IpamServiceTemplatesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewIpamServiceTemplatesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesDeleteNoContent creates a IpamServiceTemplatesDeleteNoContent with default headers values +func NewIpamServiceTemplatesDeleteNoContent() *IpamServiceTemplatesDeleteNoContent { + return &IpamServiceTemplatesDeleteNoContent{} +} + +/* IpamServiceTemplatesDeleteNoContent describes a response with status code 204, with default header values. + +IpamServiceTemplatesDeleteNoContent ipam service templates delete no content +*/ +type IpamServiceTemplatesDeleteNoContent struct { +} + +func (o *IpamServiceTemplatesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /ipam/service-templates/{id}/][%d] ipamServiceTemplatesDeleteNoContent ", 204) +} + +func (o *IpamServiceTemplatesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_list_parameters.go b/netbox/client/ipam/ipam_service_templates_list_parameters.go new file mode 100644 index 000000000..6e4479783 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_list_parameters.go @@ -0,0 +1,1079 @@ +// 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 ipam + +// 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" +) + +// NewIpamServiceTemplatesListParams creates a new IpamServiceTemplatesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesListParams() *IpamServiceTemplatesListParams { + return &IpamServiceTemplatesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesListParamsWithTimeout creates a new IpamServiceTemplatesListParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesListParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesListParams { + return &IpamServiceTemplatesListParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesListParamsWithContext creates a new IpamServiceTemplatesListParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesListParamsWithContext(ctx context.Context) *IpamServiceTemplatesListParams { + return &IpamServiceTemplatesListParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesListParamsWithHTTPClient creates a new IpamServiceTemplatesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesListParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesListParams { + return &IpamServiceTemplatesListParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesListParams contains all the parameters to send to the API endpoint + for the ipam service templates list operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Port. + Port *float64 + + // Protocol. + Protocol *string + + // Protocoln. + Protocoln *string + + // Q. + Q *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesListParams) WithDefaults() *IpamServiceTemplatesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithContext(ctx context.Context) *IpamServiceTemplatesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithCreated(created *string) *IpamServiceTemplatesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithCreatedGte(createdGte *string) *IpamServiceTemplatesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithCreatedLte(createdLte *string) *IpamServiceTemplatesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithID adds the id to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithID(id *string) *IpamServiceTemplatesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithIDGt(iDGt *string) *IpamServiceTemplatesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithIDGte(iDGte *string) *IpamServiceTemplatesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithIDLt(iDLt *string) *IpamServiceTemplatesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithIDLte(iDLte *string) *IpamServiceTemplatesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithIDn(iDn *string) *IpamServiceTemplatesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLastUpdated(lastUpdated *string) *IpamServiceTemplatesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *IpamServiceTemplatesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *IpamServiceTemplatesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithLimit(limit *int64) *IpamServiceTemplatesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithName(name *string) *IpamServiceTemplatesListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameIc(nameIc *string) *IpamServiceTemplatesListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameIe(nameIe *string) *IpamServiceTemplatesListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameIew(nameIew *string) *IpamServiceTemplatesListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameIsw(nameIsw *string) *IpamServiceTemplatesListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNamen(namen *string) *IpamServiceTemplatesListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameNic(nameNic *string) *IpamServiceTemplatesListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameNie(nameNie *string) *IpamServiceTemplatesListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameNiew(nameNiew *string) *IpamServiceTemplatesListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithNameNisw(nameNisw *string) *IpamServiceTemplatesListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithOffset(offset *int64) *IpamServiceTemplatesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPort adds the port to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithPort(port *float64) *IpamServiceTemplatesListParams { + o.SetPort(port) + return o +} + +// SetPort adds the port to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetPort(port *float64) { + o.Port = port +} + +// WithProtocol adds the protocol to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithProtocol(protocol *string) *IpamServiceTemplatesListParams { + o.SetProtocol(protocol) + return o +} + +// SetProtocol adds the protocol to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetProtocol(protocol *string) { + o.Protocol = protocol +} + +// WithProtocoln adds the protocoln to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithProtocoln(protocoln *string) *IpamServiceTemplatesListParams { + o.SetProtocoln(protocoln) + return o +} + +// SetProtocoln adds the protocolN to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetProtocoln(protocoln *string) { + o.Protocoln = protocoln +} + +// WithQ adds the q to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithQ(q *string) *IpamServiceTemplatesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetQ(q *string) { + o.Q = q +} + +// WithTag adds the tag to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithTag(tag *string) *IpamServiceTemplatesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) WithTagn(tagn *string) *IpamServiceTemplatesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam service templates list params +func (o *IpamServiceTemplatesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Port != nil { + + // query param port + var qrPort float64 + + if o.Port != nil { + qrPort = *o.Port + } + qPort := swag.FormatFloat64(qrPort) + if qPort != "" { + + if err := r.SetQueryParam("port", qPort); err != nil { + return err + } + } + } + + if o.Protocol != nil { + + // query param protocol + var qrProtocol string + + if o.Protocol != nil { + qrProtocol = *o.Protocol + } + qProtocol := qrProtocol + if qProtocol != "" { + + if err := r.SetQueryParam("protocol", qProtocol); err != nil { + return err + } + } + } + + if o.Protocoln != nil { + + // query param protocol__n + var qrProtocoln string + + if o.Protocoln != nil { + qrProtocoln = *o.Protocoln + } + qProtocoln := qrProtocoln + if qProtocoln != "" { + + if err := r.SetQueryParam("protocol__n", qProtocoln); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_list_responses.go b/netbox/client/ipam/ipam_service_templates_list_responses.go new file mode 100644 index 000000000..31f840c6b --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_list_responses.go @@ -0,0 +1,247 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamServiceTemplatesListReader is a Reader for the IpamServiceTemplatesList structure. +type IpamServiceTemplatesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamServiceTemplatesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesListOK creates a IpamServiceTemplatesListOK with default headers values +func NewIpamServiceTemplatesListOK() *IpamServiceTemplatesListOK { + return &IpamServiceTemplatesListOK{} +} + +/* IpamServiceTemplatesListOK describes a response with status code 200, with default header values. + +IpamServiceTemplatesListOK ipam service templates list o k +*/ +type IpamServiceTemplatesListOK struct { + Payload *IpamServiceTemplatesListOKBody +} + +func (o *IpamServiceTemplatesListOK) Error() string { + return fmt.Sprintf("[GET /ipam/service-templates/][%d] ipamServiceTemplatesListOK %+v", 200, o.Payload) +} +func (o *IpamServiceTemplatesListOK) GetPayload() *IpamServiceTemplatesListOKBody { + return o.Payload +} + +func (o *IpamServiceTemplatesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(IpamServiceTemplatesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*IpamServiceTemplatesListOKBody ipam service templates list o k body +swagger:model IpamServiceTemplatesListOKBody +*/ +type IpamServiceTemplatesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ServiceTemplate `json:"results"` +} + +// Validate validates this ipam service templates list o k body +func (o *IpamServiceTemplatesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamServiceTemplatesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("ipamServiceTemplatesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *IpamServiceTemplatesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("ipamServiceTemplatesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamServiceTemplatesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("ipamServiceTemplatesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *IpamServiceTemplatesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("ipamServiceTemplatesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamServiceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamServiceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this ipam service templates list o k body based on the context it is used +func (o *IpamServiceTemplatesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *IpamServiceTemplatesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipamServiceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamServiceTemplatesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *IpamServiceTemplatesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *IpamServiceTemplatesListOKBody) UnmarshalBinary(b []byte) error { + var res IpamServiceTemplatesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_partial_update_parameters.go b/netbox/client/ipam/ipam_service_templates_partial_update_parameters.go new file mode 100644 index 000000000..71a0dc9c5 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamServiceTemplatesPartialUpdateParams creates a new IpamServiceTemplatesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesPartialUpdateParams() *IpamServiceTemplatesPartialUpdateParams { + return &IpamServiceTemplatesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesPartialUpdateParamsWithTimeout creates a new IpamServiceTemplatesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesPartialUpdateParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesPartialUpdateParams { + return &IpamServiceTemplatesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesPartialUpdateParamsWithContext creates a new IpamServiceTemplatesPartialUpdateParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesPartialUpdateParamsWithContext(ctx context.Context) *IpamServiceTemplatesPartialUpdateParams { + return &IpamServiceTemplatesPartialUpdateParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesPartialUpdateParamsWithHTTPClient creates a new IpamServiceTemplatesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesPartialUpdateParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesPartialUpdateParams { + return &IpamServiceTemplatesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesPartialUpdateParams contains all the parameters to send to the API endpoint + for the ipam service templates partial update operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesPartialUpdateParams struct { + + // Data. + Data *models.WritableServiceTemplate + + /* ID. + + A unique integer value identifying this service template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesPartialUpdateParams) WithDefaults() *IpamServiceTemplatesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) WithContext(ctx context.Context) *IpamServiceTemplatesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) WithData(data *models.WritableServiceTemplate) *IpamServiceTemplatesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) SetData(data *models.WritableServiceTemplate) { + o.Data = data +} + +// WithID adds the id to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) WithID(id int64) *IpamServiceTemplatesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam service templates partial update params +func (o *IpamServiceTemplatesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_service_templates_partial_update_responses.go b/netbox/client/ipam/ipam_service_templates_partial_update_responses.go new file mode 100644 index 000000000..708a03e77 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamServiceTemplatesPartialUpdateReader is a Reader for the IpamServiceTemplatesPartialUpdate structure. +type IpamServiceTemplatesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamServiceTemplatesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesPartialUpdateOK creates a IpamServiceTemplatesPartialUpdateOK with default headers values +func NewIpamServiceTemplatesPartialUpdateOK() *IpamServiceTemplatesPartialUpdateOK { + return &IpamServiceTemplatesPartialUpdateOK{} +} + +/* IpamServiceTemplatesPartialUpdateOK describes a response with status code 200, with default header values. + +IpamServiceTemplatesPartialUpdateOK ipam service templates partial update o k +*/ +type IpamServiceTemplatesPartialUpdateOK struct { + Payload *models.ServiceTemplate +} + +func (o *IpamServiceTemplatesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /ipam/service-templates/{id}/][%d] ipamServiceTemplatesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *IpamServiceTemplatesPartialUpdateOK) GetPayload() *models.ServiceTemplate { + return o.Payload +} + +func (o *IpamServiceTemplatesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_read_parameters.go b/netbox/client/ipam/ipam_service_templates_read_parameters.go new file mode 100644 index 000000000..55862ca1e --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_read_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamServiceTemplatesReadParams creates a new IpamServiceTemplatesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesReadParams() *IpamServiceTemplatesReadParams { + return &IpamServiceTemplatesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesReadParamsWithTimeout creates a new IpamServiceTemplatesReadParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesReadParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesReadParams { + return &IpamServiceTemplatesReadParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesReadParamsWithContext creates a new IpamServiceTemplatesReadParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesReadParamsWithContext(ctx context.Context) *IpamServiceTemplatesReadParams { + return &IpamServiceTemplatesReadParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesReadParamsWithHTTPClient creates a new IpamServiceTemplatesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesReadParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesReadParams { + return &IpamServiceTemplatesReadParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesReadParams contains all the parameters to send to the API endpoint + for the ipam service templates read operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesReadParams struct { + + /* ID. + + A unique integer value identifying this service template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesReadParams) WithDefaults() *IpamServiceTemplatesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) WithContext(ctx context.Context) *IpamServiceTemplatesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) WithID(id int64) *IpamServiceTemplatesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam service templates read params +func (o *IpamServiceTemplatesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesReadParams) 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/netbox/client/ipam/ipam_service_templates_read_responses.go b/netbox/client/ipam/ipam_service_templates_read_responses.go new file mode 100644 index 000000000..5060c115b --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_read_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamServiceTemplatesReadReader is a Reader for the IpamServiceTemplatesRead structure. +type IpamServiceTemplatesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamServiceTemplatesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesReadOK creates a IpamServiceTemplatesReadOK with default headers values +func NewIpamServiceTemplatesReadOK() *IpamServiceTemplatesReadOK { + return &IpamServiceTemplatesReadOK{} +} + +/* IpamServiceTemplatesReadOK describes a response with status code 200, with default header values. + +IpamServiceTemplatesReadOK ipam service templates read o k +*/ +type IpamServiceTemplatesReadOK struct { + Payload *models.ServiceTemplate +} + +func (o *IpamServiceTemplatesReadOK) Error() string { + return fmt.Sprintf("[GET /ipam/service-templates/{id}/][%d] ipamServiceTemplatesReadOK %+v", 200, o.Payload) +} +func (o *IpamServiceTemplatesReadOK) GetPayload() *models.ServiceTemplate { + return o.Payload +} + +func (o *IpamServiceTemplatesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_service_templates_update_parameters.go b/netbox/client/ipam/ipam_service_templates_update_parameters.go new file mode 100644 index 000000000..842f96f57 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_update_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamServiceTemplatesUpdateParams creates a new IpamServiceTemplatesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamServiceTemplatesUpdateParams() *IpamServiceTemplatesUpdateParams { + return &IpamServiceTemplatesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamServiceTemplatesUpdateParamsWithTimeout creates a new IpamServiceTemplatesUpdateParams object +// with the ability to set a timeout on a request. +func NewIpamServiceTemplatesUpdateParamsWithTimeout(timeout time.Duration) *IpamServiceTemplatesUpdateParams { + return &IpamServiceTemplatesUpdateParams{ + timeout: timeout, + } +} + +// NewIpamServiceTemplatesUpdateParamsWithContext creates a new IpamServiceTemplatesUpdateParams object +// with the ability to set a context for a request. +func NewIpamServiceTemplatesUpdateParamsWithContext(ctx context.Context) *IpamServiceTemplatesUpdateParams { + return &IpamServiceTemplatesUpdateParams{ + Context: ctx, + } +} + +// NewIpamServiceTemplatesUpdateParamsWithHTTPClient creates a new IpamServiceTemplatesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamServiceTemplatesUpdateParamsWithHTTPClient(client *http.Client) *IpamServiceTemplatesUpdateParams { + return &IpamServiceTemplatesUpdateParams{ + HTTPClient: client, + } +} + +/* IpamServiceTemplatesUpdateParams contains all the parameters to send to the API endpoint + for the ipam service templates update operation. + + Typically these are written to a http.Request. +*/ +type IpamServiceTemplatesUpdateParams struct { + + // Data. + Data *models.WritableServiceTemplate + + /* ID. + + A unique integer value identifying this service template. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam service templates update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesUpdateParams) WithDefaults() *IpamServiceTemplatesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam service templates update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamServiceTemplatesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) WithTimeout(timeout time.Duration) *IpamServiceTemplatesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) WithContext(ctx context.Context) *IpamServiceTemplatesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) WithHTTPClient(client *http.Client) *IpamServiceTemplatesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) WithData(data *models.WritableServiceTemplate) *IpamServiceTemplatesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) SetData(data *models.WritableServiceTemplate) { + o.Data = data +} + +// WithID adds the id to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) WithID(id int64) *IpamServiceTemplatesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam service templates update params +func (o *IpamServiceTemplatesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamServiceTemplatesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_service_templates_update_responses.go b/netbox/client/ipam/ipam_service_templates_update_responses.go new file mode 100644 index 000000000..39d178852 --- /dev/null +++ b/netbox/client/ipam/ipam_service_templates_update_responses.go @@ -0,0 +1,82 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamServiceTemplatesUpdateReader is a Reader for the IpamServiceTemplatesUpdate structure. +type IpamServiceTemplatesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamServiceTemplatesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamServiceTemplatesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamServiceTemplatesUpdateOK creates a IpamServiceTemplatesUpdateOK with default headers values +func NewIpamServiceTemplatesUpdateOK() *IpamServiceTemplatesUpdateOK { + return &IpamServiceTemplatesUpdateOK{} +} + +/* IpamServiceTemplatesUpdateOK describes a response with status code 200, with default header values. + +IpamServiceTemplatesUpdateOK ipam service templates update o k +*/ +type IpamServiceTemplatesUpdateOK struct { + Payload *models.ServiceTemplate +} + +func (o *IpamServiceTemplatesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /ipam/service-templates/{id}/][%d] ipamServiceTemplatesUpdateOK %+v", 200, o.Payload) +} +func (o *IpamServiceTemplatesUpdateOK) GetPayload() *models.ServiceTemplate { + return o.Payload +} + +func (o *IpamServiceTemplatesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ServiceTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/ipam/ipam_services_list_parameters.go b/netbox/client/ipam/ipam_services_list_parameters.go index e1de07762..bb65aeb15 100644 --- a/netbox/client/ipam/ipam_services_list_parameters.go +++ b/netbox/client/ipam/ipam_services_list_parameters.go @@ -84,6 +84,36 @@ type IpamServicesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Device. Device *string @@ -132,9 +162,6 @@ type IpamServicesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -284,6 +311,116 @@ func (o *IpamServicesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the ipam services list params +func (o *IpamServicesListParams) WithDescription(description *string) *IpamServicesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam services list params +func (o *IpamServicesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionIc(descriptionIc *string) *IpamServicesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionIe(descriptionIe *string) *IpamServicesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionIew(descriptionIew *string) *IpamServicesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionIsw(descriptionIsw *string) *IpamServicesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionn(descriptionn *string) *IpamServicesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionNic(descriptionNic *string) *IpamServicesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionNie(descriptionNie *string) *IpamServicesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionNiew(descriptionNiew *string) *IpamServicesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam services list params +func (o *IpamServicesListParams) WithDescriptionNisw(descriptionNisw *string) *IpamServicesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam services list params +func (o *IpamServicesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithDevice adds the device to the ipam services list params func (o *IpamServicesListParams) WithDevice(device *string) *IpamServicesListParams { o.SetDevice(device) @@ -449,17 +586,6 @@ func (o *IpamServicesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam services list params -func (o *IpamServicesListParams) WithNameEmpty(nameEmpty *string) *IpamServicesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam services list params -func (o *IpamServicesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam services list params func (o *IpamServicesListParams) WithNameIc(nameIc *string) *IpamServicesListParams { o.SetNameIc(nameIc) @@ -739,6 +865,176 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Device != nil { // query param device @@ -994,23 +1290,6 @@ func (o *IpamServicesListParams) WriteToRequest(r runtime.ClientRequest, reg str } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/ipam/ipam_services_list_responses.go b/netbox/client/ipam/ipam_services_list_responses.go index a6d129ec1..71967e893 100644 --- a/netbox/client/ipam/ipam_services_list_responses.go +++ b/netbox/client/ipam/ipam_services_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamServicesListOKBody) validateResults(formats strfmt.Registry) error if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamServicesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamServicesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamServicesListOKBody) contextValidateResults(ctx context.Context, for if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamServicesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamServicesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_vlan_groups_available_vlans_create_parameters.go b/netbox/client/ipam/ipam_vlan_groups_available_vlans_create_parameters.go new file mode 100644 index 000000000..2789533fc --- /dev/null +++ b/netbox/client/ipam/ipam_vlan_groups_available_vlans_create_parameters.go @@ -0,0 +1,186 @@ +// 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 ipam + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewIpamVlanGroupsAvailableVlansCreateParams creates a new IpamVlanGroupsAvailableVlansCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamVlanGroupsAvailableVlansCreateParams() *IpamVlanGroupsAvailableVlansCreateParams { + return &IpamVlanGroupsAvailableVlansCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamVlanGroupsAvailableVlansCreateParamsWithTimeout creates a new IpamVlanGroupsAvailableVlansCreateParams object +// with the ability to set a timeout on a request. +func NewIpamVlanGroupsAvailableVlansCreateParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsAvailableVlansCreateParams { + return &IpamVlanGroupsAvailableVlansCreateParams{ + timeout: timeout, + } +} + +// NewIpamVlanGroupsAvailableVlansCreateParamsWithContext creates a new IpamVlanGroupsAvailableVlansCreateParams object +// with the ability to set a context for a request. +func NewIpamVlanGroupsAvailableVlansCreateParamsWithContext(ctx context.Context) *IpamVlanGroupsAvailableVlansCreateParams { + return &IpamVlanGroupsAvailableVlansCreateParams{ + Context: ctx, + } +} + +// NewIpamVlanGroupsAvailableVlansCreateParamsWithHTTPClient creates a new IpamVlanGroupsAvailableVlansCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamVlanGroupsAvailableVlansCreateParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsAvailableVlansCreateParams { + return &IpamVlanGroupsAvailableVlansCreateParams{ + HTTPClient: client, + } +} + +/* IpamVlanGroupsAvailableVlansCreateParams contains all the parameters to send to the API endpoint + for the ipam vlan groups available vlans create operation. + + Typically these are written to a http.Request. +*/ +type IpamVlanGroupsAvailableVlansCreateParams struct { + + // Data. + Data *models.WritableCreateAvailableVLAN + + /* ID. + + A unique integer value identifying this VLAN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam vlan groups available vlans create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamVlanGroupsAvailableVlansCreateParams) WithDefaults() *IpamVlanGroupsAvailableVlansCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam vlan groups available vlans create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamVlanGroupsAvailableVlansCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsAvailableVlansCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) WithContext(ctx context.Context) *IpamVlanGroupsAvailableVlansCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsAvailableVlansCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) WithData(data *models.WritableCreateAvailableVLAN) *IpamVlanGroupsAvailableVlansCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) SetData(data *models.WritableCreateAvailableVLAN) { + o.Data = data +} + +// WithID adds the id to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) WithID(id int64) *IpamVlanGroupsAvailableVlansCreateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam vlan groups available vlans create params +func (o *IpamVlanGroupsAvailableVlansCreateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamVlanGroupsAvailableVlansCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/ipam/ipam_vlan_groups_available_vlans_create_responses.go b/netbox/client/ipam/ipam_vlan_groups_available_vlans_create_responses.go new file mode 100644 index 000000000..836fec224 --- /dev/null +++ b/netbox/client/ipam/ipam_vlan_groups_available_vlans_create_responses.go @@ -0,0 +1,80 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamVlanGroupsAvailableVlansCreateReader is a Reader for the IpamVlanGroupsAvailableVlansCreate structure. +type IpamVlanGroupsAvailableVlansCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamVlanGroupsAvailableVlansCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewIpamVlanGroupsAvailableVlansCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamVlanGroupsAvailableVlansCreateCreated creates a IpamVlanGroupsAvailableVlansCreateCreated with default headers values +func NewIpamVlanGroupsAvailableVlansCreateCreated() *IpamVlanGroupsAvailableVlansCreateCreated { + return &IpamVlanGroupsAvailableVlansCreateCreated{} +} + +/* IpamVlanGroupsAvailableVlansCreateCreated describes a response with status code 201, with default header values. + +IpamVlanGroupsAvailableVlansCreateCreated ipam vlan groups available vlans create created +*/ +type IpamVlanGroupsAvailableVlansCreateCreated struct { + Payload []*models.VLAN +} + +func (o *IpamVlanGroupsAvailableVlansCreateCreated) Error() string { + return fmt.Sprintf("[POST /ipam/vlan-groups/{id}/available-vlans/][%d] ipamVlanGroupsAvailableVlansCreateCreated %+v", 201, o.Payload) +} +func (o *IpamVlanGroupsAvailableVlansCreateCreated) GetPayload() []*models.VLAN { + return o.Payload +} + +func (o *IpamVlanGroupsAvailableVlansCreateCreated) 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/netbox/client/ipam/ipam_vlan_groups_available_vlans_list_parameters.go b/netbox/client/ipam/ipam_vlan_groups_available_vlans_list_parameters.go new file mode 100644 index 000000000..caa73dbbc --- /dev/null +++ b/netbox/client/ipam/ipam_vlan_groups_available_vlans_list_parameters.go @@ -0,0 +1,165 @@ +// 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 ipam + +// 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" +) + +// NewIpamVlanGroupsAvailableVlansListParams creates a new IpamVlanGroupsAvailableVlansListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewIpamVlanGroupsAvailableVlansListParams() *IpamVlanGroupsAvailableVlansListParams { + return &IpamVlanGroupsAvailableVlansListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewIpamVlanGroupsAvailableVlansListParamsWithTimeout creates a new IpamVlanGroupsAvailableVlansListParams object +// with the ability to set a timeout on a request. +func NewIpamVlanGroupsAvailableVlansListParamsWithTimeout(timeout time.Duration) *IpamVlanGroupsAvailableVlansListParams { + return &IpamVlanGroupsAvailableVlansListParams{ + timeout: timeout, + } +} + +// NewIpamVlanGroupsAvailableVlansListParamsWithContext creates a new IpamVlanGroupsAvailableVlansListParams object +// with the ability to set a context for a request. +func NewIpamVlanGroupsAvailableVlansListParamsWithContext(ctx context.Context) *IpamVlanGroupsAvailableVlansListParams { + return &IpamVlanGroupsAvailableVlansListParams{ + Context: ctx, + } +} + +// NewIpamVlanGroupsAvailableVlansListParamsWithHTTPClient creates a new IpamVlanGroupsAvailableVlansListParams object +// with the ability to set a custom HTTPClient for a request. +func NewIpamVlanGroupsAvailableVlansListParamsWithHTTPClient(client *http.Client) *IpamVlanGroupsAvailableVlansListParams { + return &IpamVlanGroupsAvailableVlansListParams{ + HTTPClient: client, + } +} + +/* IpamVlanGroupsAvailableVlansListParams contains all the parameters to send to the API endpoint + for the ipam vlan groups available vlans list operation. + + Typically these are written to a http.Request. +*/ +type IpamVlanGroupsAvailableVlansListParams struct { + + /* ID. + + A unique integer value identifying this VLAN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the ipam vlan groups available vlans list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamVlanGroupsAvailableVlansListParams) WithDefaults() *IpamVlanGroupsAvailableVlansListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the ipam vlan groups available vlans list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *IpamVlanGroupsAvailableVlansListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) WithTimeout(timeout time.Duration) *IpamVlanGroupsAvailableVlansListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) WithContext(ctx context.Context) *IpamVlanGroupsAvailableVlansListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) WithHTTPClient(client *http.Client) *IpamVlanGroupsAvailableVlansListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) WithID(id int64) *IpamVlanGroupsAvailableVlansListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the ipam vlan groups available vlans list params +func (o *IpamVlanGroupsAvailableVlansListParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *IpamVlanGroupsAvailableVlansListParams) 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/netbox/client/ipam/ipam_vlan_groups_available_vlans_list_responses.go b/netbox/client/ipam/ipam_vlan_groups_available_vlans_list_responses.go new file mode 100644 index 000000000..6c156fbcb --- /dev/null +++ b/netbox/client/ipam/ipam_vlan_groups_available_vlans_list_responses.go @@ -0,0 +1,80 @@ +// 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 ipam + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// IpamVlanGroupsAvailableVlansListReader is a Reader for the IpamVlanGroupsAvailableVlansList structure. +type IpamVlanGroupsAvailableVlansListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IpamVlanGroupsAvailableVlansListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIpamVlanGroupsAvailableVlansListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewIpamVlanGroupsAvailableVlansListOK creates a IpamVlanGroupsAvailableVlansListOK with default headers values +func NewIpamVlanGroupsAvailableVlansListOK() *IpamVlanGroupsAvailableVlansListOK { + return &IpamVlanGroupsAvailableVlansListOK{} +} + +/* IpamVlanGroupsAvailableVlansListOK describes a response with status code 200, with default header values. + +IpamVlanGroupsAvailableVlansListOK ipam vlan groups available vlans list o k +*/ +type IpamVlanGroupsAvailableVlansListOK struct { + Payload []*models.AvailableVLAN +} + +func (o *IpamVlanGroupsAvailableVlansListOK) Error() string { + return fmt.Sprintf("[GET /ipam/vlan-groups/{id}/available-vlans/][%d] ipamVlanGroupsAvailableVlansListOK %+v", 200, o.Payload) +} +func (o *IpamVlanGroupsAvailableVlansListOK) GetPayload() []*models.AvailableVLAN { + return o.Payload +} + +func (o *IpamVlanGroupsAvailableVlansListOK) 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/netbox/client/ipam/ipam_vlan_groups_list_parameters.go b/netbox/client/ipam/ipam_vlan_groups_list_parameters.go index 8de027f91..7caf216d5 100644 --- a/netbox/client/ipam/ipam_vlan_groups_list_parameters.go +++ b/netbox/client/ipam/ipam_vlan_groups_list_parameters.go @@ -93,9 +93,6 @@ type IpamVlanGroupsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -159,12 +156,45 @@ type IpamVlanGroupsListParams struct { // Location. Location *float64 + // MaxVid. + MaxVid *string + + // MaxVidGt. + MaxVidGt *string + + // MaxVidGte. + MaxVidGte *string + + // MaxVidLt. + MaxVidLt *string + + // MaxVidLte. + MaxVidLte *string + + // MaxVidn. + MaxVidn *string + + // MinVid. + MinVid *string + + // MinVidGt. + MinVidGt *string + + // MinVidGte. + MinVidGte *string + + // MinVidLt. + MinVidLt *string + + // MinVidLte. + MinVidLte *string + + // MinVidn. + MinVidn *string + // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -240,9 +270,6 @@ type IpamVlanGroupsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -270,6 +297,12 @@ type IpamVlanGroupsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -389,17 +422,6 @@ func (o *IpamVlanGroupsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the ipam vlan groups list params -func (o *IpamVlanGroupsListParams) WithDescriptionEmpty(descriptionEmpty *string) *IpamVlanGroupsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the ipam vlan groups list params -func (o *IpamVlanGroupsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithDescriptionIc(descriptionIc *string) *IpamVlanGroupsListParams { o.SetDescriptionIc(descriptionIc) @@ -620,6 +642,138 @@ func (o *IpamVlanGroupsListParams) SetLocation(location *float64) { o.Location = location } +// WithMaxVid adds the maxVid to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMaxVid(maxVid *string) *IpamVlanGroupsListParams { + o.SetMaxVid(maxVid) + return o +} + +// SetMaxVid adds the maxVid to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMaxVid(maxVid *string) { + o.MaxVid = maxVid +} + +// WithMaxVidGt adds the maxVidGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMaxVidGt(maxVidGt *string) *IpamVlanGroupsListParams { + o.SetMaxVidGt(maxVidGt) + return o +} + +// SetMaxVidGt adds the maxVidGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMaxVidGt(maxVidGt *string) { + o.MaxVidGt = maxVidGt +} + +// WithMaxVidGte adds the maxVidGte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMaxVidGte(maxVidGte *string) *IpamVlanGroupsListParams { + o.SetMaxVidGte(maxVidGte) + return o +} + +// SetMaxVidGte adds the maxVidGte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMaxVidGte(maxVidGte *string) { + o.MaxVidGte = maxVidGte +} + +// WithMaxVidLt adds the maxVidLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMaxVidLt(maxVidLt *string) *IpamVlanGroupsListParams { + o.SetMaxVidLt(maxVidLt) + return o +} + +// SetMaxVidLt adds the maxVidLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMaxVidLt(maxVidLt *string) { + o.MaxVidLt = maxVidLt +} + +// WithMaxVidLte adds the maxVidLte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMaxVidLte(maxVidLte *string) *IpamVlanGroupsListParams { + o.SetMaxVidLte(maxVidLte) + return o +} + +// SetMaxVidLte adds the maxVidLte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMaxVidLte(maxVidLte *string) { + o.MaxVidLte = maxVidLte +} + +// WithMaxVidn adds the maxVidn to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMaxVidn(maxVidn *string) *IpamVlanGroupsListParams { + o.SetMaxVidn(maxVidn) + return o +} + +// SetMaxVidn adds the maxVidN to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMaxVidn(maxVidn *string) { + o.MaxVidn = maxVidn +} + +// WithMinVid adds the minVid to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMinVid(minVid *string) *IpamVlanGroupsListParams { + o.SetMinVid(minVid) + return o +} + +// SetMinVid adds the minVid to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMinVid(minVid *string) { + o.MinVid = minVid +} + +// WithMinVidGt adds the minVidGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMinVidGt(minVidGt *string) *IpamVlanGroupsListParams { + o.SetMinVidGt(minVidGt) + return o +} + +// SetMinVidGt adds the minVidGt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMinVidGt(minVidGt *string) { + o.MinVidGt = minVidGt +} + +// WithMinVidGte adds the minVidGte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMinVidGte(minVidGte *string) *IpamVlanGroupsListParams { + o.SetMinVidGte(minVidGte) + return o +} + +// SetMinVidGte adds the minVidGte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMinVidGte(minVidGte *string) { + o.MinVidGte = minVidGte +} + +// WithMinVidLt adds the minVidLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMinVidLt(minVidLt *string) *IpamVlanGroupsListParams { + o.SetMinVidLt(minVidLt) + return o +} + +// SetMinVidLt adds the minVidLt to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMinVidLt(minVidLt *string) { + o.MinVidLt = minVidLt +} + +// WithMinVidLte adds the minVidLte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMinVidLte(minVidLte *string) *IpamVlanGroupsListParams { + o.SetMinVidLte(minVidLte) + return o +} + +// SetMinVidLte adds the minVidLte to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMinVidLte(minVidLte *string) { + o.MinVidLte = minVidLte +} + +// WithMinVidn adds the minVidn to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithMinVidn(minVidn *string) *IpamVlanGroupsListParams { + o.SetMinVidn(minVidn) + return o +} + +// SetMinVidn adds the minVidN to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetMinVidn(minVidn *string) { + o.MinVidn = minVidn +} + // WithName adds the name to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithName(name *string) *IpamVlanGroupsListParams { o.SetName(name) @@ -631,17 +785,6 @@ func (o *IpamVlanGroupsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam vlan groups list params -func (o *IpamVlanGroupsListParams) WithNameEmpty(nameEmpty *string) *IpamVlanGroupsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam vlan groups list params -func (o *IpamVlanGroupsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithNameIc(nameIc *string) *IpamVlanGroupsListParams { o.SetNameIc(nameIc) @@ -906,17 +1049,6 @@ func (o *IpamVlanGroupsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the ipam vlan groups list params -func (o *IpamVlanGroupsListParams) WithSlugEmpty(slugEmpty *string) *IpamVlanGroupsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the ipam vlan groups list params -func (o *IpamVlanGroupsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the ipam vlan groups list params func (o *IpamVlanGroupsListParams) WithSlugIc(slugIc *string) *IpamVlanGroupsListParams { o.SetSlugIc(slugIc) @@ -1016,6 +1148,28 @@ func (o *IpamVlanGroupsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithTag(tag *string) *IpamVlanGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) WithTagn(tagn *string) *IpamVlanGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the ipam vlan groups list params +func (o *IpamVlanGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -1126,23 +1280,6 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1483,35 +1620,222 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.Name != nil { + if o.MaxVid != nil { - // query param name - var qrName string + // query param max_vid + var qrMaxVid string - if o.Name != nil { - qrName = *o.Name + if o.MaxVid != nil { + qrMaxVid = *o.MaxVid } - qName := qrName - if qName != "" { + qMaxVid := qrMaxVid + if qMaxVid != "" { - if err := r.SetQueryParam("name", qName); err != nil { + if err := r.SetQueryParam("max_vid", qMaxVid); err != nil { return err } } } - if o.NameEmpty != nil { + if o.MaxVidGt != nil { - // query param name__empty - var qrNameEmpty string + // query param max_vid__gt + var qrMaxVidGt string - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty + if o.MaxVidGt != nil { + qrMaxVidGt = *o.MaxVidGt } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { + qMaxVidGt := qrMaxVidGt + if qMaxVidGt != "" { - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + if err := r.SetQueryParam("max_vid__gt", qMaxVidGt); err != nil { + return err + } + } + } + + if o.MaxVidGte != nil { + + // query param max_vid__gte + var qrMaxVidGte string + + if o.MaxVidGte != nil { + qrMaxVidGte = *o.MaxVidGte + } + qMaxVidGte := qrMaxVidGte + if qMaxVidGte != "" { + + if err := r.SetQueryParam("max_vid__gte", qMaxVidGte); err != nil { + return err + } + } + } + + if o.MaxVidLt != nil { + + // query param max_vid__lt + var qrMaxVidLt string + + if o.MaxVidLt != nil { + qrMaxVidLt = *o.MaxVidLt + } + qMaxVidLt := qrMaxVidLt + if qMaxVidLt != "" { + + if err := r.SetQueryParam("max_vid__lt", qMaxVidLt); err != nil { + return err + } + } + } + + if o.MaxVidLte != nil { + + // query param max_vid__lte + var qrMaxVidLte string + + if o.MaxVidLte != nil { + qrMaxVidLte = *o.MaxVidLte + } + qMaxVidLte := qrMaxVidLte + if qMaxVidLte != "" { + + if err := r.SetQueryParam("max_vid__lte", qMaxVidLte); err != nil { + return err + } + } + } + + if o.MaxVidn != nil { + + // query param max_vid__n + var qrMaxVidn string + + if o.MaxVidn != nil { + qrMaxVidn = *o.MaxVidn + } + qMaxVidn := qrMaxVidn + if qMaxVidn != "" { + + if err := r.SetQueryParam("max_vid__n", qMaxVidn); err != nil { + return err + } + } + } + + if o.MinVid != nil { + + // query param min_vid + var qrMinVid string + + if o.MinVid != nil { + qrMinVid = *o.MinVid + } + qMinVid := qrMinVid + if qMinVid != "" { + + if err := r.SetQueryParam("min_vid", qMinVid); err != nil { + return err + } + } + } + + if o.MinVidGt != nil { + + // query param min_vid__gt + var qrMinVidGt string + + if o.MinVidGt != nil { + qrMinVidGt = *o.MinVidGt + } + qMinVidGt := qrMinVidGt + if qMinVidGt != "" { + + if err := r.SetQueryParam("min_vid__gt", qMinVidGt); err != nil { + return err + } + } + } + + if o.MinVidGte != nil { + + // query param min_vid__gte + var qrMinVidGte string + + if o.MinVidGte != nil { + qrMinVidGte = *o.MinVidGte + } + qMinVidGte := qrMinVidGte + if qMinVidGte != "" { + + if err := r.SetQueryParam("min_vid__gte", qMinVidGte); err != nil { + return err + } + } + } + + if o.MinVidLt != nil { + + // query param min_vid__lt + var qrMinVidLt string + + if o.MinVidLt != nil { + qrMinVidLt = *o.MinVidLt + } + qMinVidLt := qrMinVidLt + if qMinVidLt != "" { + + if err := r.SetQueryParam("min_vid__lt", qMinVidLt); err != nil { + return err + } + } + } + + if o.MinVidLte != nil { + + // query param min_vid__lte + var qrMinVidLte string + + if o.MinVidLte != nil { + qrMinVidLte = *o.MinVidLte + } + qMinVidLte := qrMinVidLte + if qMinVidLte != "" { + + if err := r.SetQueryParam("min_vid__lte", qMinVidLte); err != nil { + return err + } + } + } + + if o.MinVidn != nil { + + // query param min_vid__n + var qrMinVidn string + + if o.MinVidn != nil { + qrMinVidn = *o.MinVidn + } + qMinVidn := qrMinVidn + if qMinVidn != "" { + + if err := r.SetQueryParam("min_vid__n", qMinVidn); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { return err } } @@ -1925,23 +2249,6 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -2095,6 +2402,40 @@ func (o *IpamVlanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + 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/netbox/client/ipam/ipam_vlan_groups_list_responses.go b/netbox/client/ipam/ipam_vlan_groups_list_responses.go index b6820d9c8..e51f3d1a6 100644 --- a/netbox/client/ipam/ipam_vlan_groups_list_responses.go +++ b/netbox/client/ipam/ipam_vlan_groups_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamVlanGroupsListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamVlanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamVlanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamVlanGroupsListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamVlanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamVlanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_vlans_list_parameters.go b/netbox/client/ipam/ipam_vlans_list_parameters.go index ae640654f..c1c24609c 100644 --- a/netbox/client/ipam/ipam_vlans_list_parameters.go +++ b/netbox/client/ipam/ipam_vlans_list_parameters.go @@ -90,6 +90,36 @@ type IpamVlansListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Group. Group *string @@ -138,9 +168,6 @@ type IpamVlansListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -387,6 +414,116 @@ func (o *IpamVlansListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the ipam vlans list params +func (o *IpamVlansListParams) WithDescription(description *string) *IpamVlansListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam vlans list params +func (o *IpamVlansListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionIc(descriptionIc *string) *IpamVlansListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionIe(descriptionIe *string) *IpamVlansListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionIew(descriptionIew *string) *IpamVlansListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionIsw(descriptionIsw *string) *IpamVlansListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionn(descriptionn *string) *IpamVlansListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionNic(descriptionNic *string) *IpamVlansListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionNie(descriptionNie *string) *IpamVlansListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionNiew(descriptionNiew *string) *IpamVlansListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam vlans list params +func (o *IpamVlansListParams) WithDescriptionNisw(descriptionNisw *string) *IpamVlansListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam vlans list params +func (o *IpamVlansListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithGroup adds the group to the ipam vlans list params func (o *IpamVlansListParams) WithGroup(group *string) *IpamVlansListParams { o.SetGroup(group) @@ -552,17 +689,6 @@ func (o *IpamVlansListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam vlans list params -func (o *IpamVlansListParams) WithNameEmpty(nameEmpty *string) *IpamVlansListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam vlans list params -func (o *IpamVlansListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam vlans list params func (o *IpamVlansListParams) WithNameIc(nameIc *string) *IpamVlansListParams { o.SetNameIc(nameIc) @@ -1151,6 +1277,176 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Group != nil { // query param group @@ -1406,23 +1702,6 @@ func (o *IpamVlansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/ipam/ipam_vlans_list_responses.go b/netbox/client/ipam/ipam_vlans_list_responses.go index 323150f62..e2120ce46 100644 --- a/netbox/client/ipam/ipam_vlans_list_responses.go +++ b/netbox/client/ipam/ipam_vlans_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamVlansListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamVlansListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamVlansListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamVlansListOKBody) contextValidateResults(ctx context.Context, format if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamVlansListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamVlansListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/ipam/ipam_vrfs_list_parameters.go b/netbox/client/ipam/ipam_vrfs_list_parameters.go index b9379d53f..d07e44298 100644 --- a/netbox/client/ipam/ipam_vrfs_list_parameters.go +++ b/netbox/client/ipam/ipam_vrfs_list_parameters.go @@ -84,6 +84,36 @@ type IpamVrfsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // EnforceUnique. EnforceUnique *string @@ -147,9 +177,6 @@ type IpamVrfsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -189,9 +216,6 @@ type IpamVrfsListParams struct { // Rd. Rd *string - // RdEmpty. - RdEmpty *string - // RdIc. RdIc *string @@ -335,6 +359,116 @@ func (o *IpamVrfsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescription(description *string) *IpamVrfsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionIc(descriptionIc *string) *IpamVrfsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionIe(descriptionIe *string) *IpamVrfsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionIew(descriptionIew *string) *IpamVrfsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionIsw(descriptionIsw *string) *IpamVrfsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionn(descriptionn *string) *IpamVrfsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionNic(descriptionNic *string) *IpamVrfsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionNie(descriptionNie *string) *IpamVrfsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionNiew(descriptionNiew *string) *IpamVrfsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the ipam vrfs list params +func (o *IpamVrfsListParams) WithDescriptionNisw(descriptionNisw *string) *IpamVrfsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the ipam vrfs list params +func (o *IpamVrfsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithEnforceUnique adds the enforceUnique to the ipam vrfs list params func (o *IpamVrfsListParams) WithEnforceUnique(enforceUnique *string) *IpamVrfsListParams { o.SetEnforceUnique(enforceUnique) @@ -555,17 +689,6 @@ func (o *IpamVrfsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the ipam vrfs list params -func (o *IpamVrfsListParams) WithNameEmpty(nameEmpty *string) *IpamVrfsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the ipam vrfs list params -func (o *IpamVrfsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the ipam vrfs list params func (o *IpamVrfsListParams) WithNameIc(nameIc *string) *IpamVrfsListParams { o.SetNameIc(nameIc) @@ -698,17 +821,6 @@ func (o *IpamVrfsListParams) SetRd(rd *string) { o.Rd = rd } -// WithRdEmpty adds the rdEmpty to the ipam vrfs list params -func (o *IpamVrfsListParams) WithRdEmpty(rdEmpty *string) *IpamVrfsListParams { - o.SetRdEmpty(rdEmpty) - return o -} - -// SetRdEmpty adds the rdEmpty to the ipam vrfs list params -func (o *IpamVrfsListParams) SetRdEmpty(rdEmpty *string) { - o.RdEmpty = rdEmpty -} - // WithRdIc adds the rdIc to the ipam vrfs list params func (o *IpamVrfsListParams) WithRdIc(rdIc *string) *IpamVrfsListParams { o.SetRdIc(rdIc) @@ -977,6 +1089,176 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.EnforceUnique != nil { // query param enforce_unique @@ -1317,23 +1599,6 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1538,23 +1803,6 @@ func (o *IpamVrfsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } } - if o.RdEmpty != nil { - - // query param rd__empty - var qrRdEmpty string - - if o.RdEmpty != nil { - qrRdEmpty = *o.RdEmpty - } - qRdEmpty := qrRdEmpty - if qRdEmpty != "" { - - if err := r.SetQueryParam("rd__empty", qRdEmpty); err != nil { - return err - } - } - } - if o.RdIc != nil { // query param rd__ic diff --git a/netbox/client/ipam/ipam_vrfs_list_responses.go b/netbox/client/ipam/ipam_vrfs_list_responses.go index e5e066600..78bc68e4b 100644 --- a/netbox/client/ipam/ipam_vrfs_list_responses.go +++ b/netbox/client/ipam/ipam_vrfs_list_responses.go @@ -182,6 +182,8 @@ func (o *IpamVrfsListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamVrfsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamVrfsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *IpamVrfsListOKBody) contextValidateResults(ctx context.Context, formats if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipamVrfsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipamVrfsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/net_box_api_client.go b/netbox/client/net_box_api_client.go index 65a9ac3a0..3c86a95b9 100644 --- a/netbox/client/net_box_api_client.go +++ b/netbox/client/net_box_api_client.go @@ -33,6 +33,7 @@ import ( "github.com/netbox-community/go-netbox/netbox/client/tenancy" "github.com/netbox-community/go-netbox/netbox/client/users" "github.com/netbox-community/go-netbox/netbox/client/virtualization" + "github.com/netbox-community/go-netbox/netbox/client/wireless" ) // Default net box API HTTP client. @@ -41,14 +42,14 @@ var Default = NewHTTPClient(nil) const ( // DefaultHost is the default Host // found in Meta (info) section of spec file - DefaultHost string = "localhost:8099" + DefaultHost string = "localhost" // DefaultBasePath is the default BasePath // found in Meta (info) section of spec file DefaultBasePath string = "/api" ) // DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http"} +var DefaultSchemes = []string{"https"} // NewHTTPClient creates a new net box API HTTP client. func NewHTTPClient(formats strfmt.Registry) *NetBoxAPI { @@ -85,6 +86,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *NetBoxAPI cli.Tenancy = tenancy.New(transport, formats) cli.Users = users.New(transport, formats) cli.Virtualization = virtualization.New(transport, formats) + cli.Wireless = wireless.New(transport, formats) return cli } @@ -145,6 +147,8 @@ type NetBoxAPI struct { Virtualization virtualization.ClientService + Wireless wireless.ClientService + Transport runtime.ClientTransport } @@ -159,4 +163,5 @@ func (c *NetBoxAPI) SetTransport(transport runtime.ClientTransport) { c.Tenancy.SetTransport(transport) c.Users.SetTransport(transport) c.Virtualization.SetTransport(transport) + c.Wireless.SetTransport(transport) } diff --git a/netbox/client/plugins/plugins_client.go b/netbox/client/plugins/plugins_client.go deleted file mode 100644 index b8006db01..000000000 --- a/netbox/client/plugins/plugins_client.go +++ /dev/null @@ -1,300 +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 plugins - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new plugins API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for plugins API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - PluginsNextboxUISavedtopologiesCreate(params *PluginsNextboxUISavedtopologiesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesCreateCreated, error) - - PluginsNextboxUISavedtopologiesDelete(params *PluginsNextboxUISavedtopologiesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesDeleteNoContent, error) - - PluginsNextboxUISavedtopologiesList(params *PluginsNextboxUISavedtopologiesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesListOK, error) - - PluginsNextboxUISavedtopologiesPartialUpdate(params *PluginsNextboxUISavedtopologiesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesPartialUpdateOK, error) - - PluginsNextboxUISavedtopologiesRead(params *PluginsNextboxUISavedtopologiesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesReadOK, error) - - PluginsNextboxUISavedtopologiesUpdate(params *PluginsNextboxUISavedtopologiesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesUpdateOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* - PluginsNextboxUISavedtopologiesCreate plugins nextbox ui savedtopologies create API -*/ -func (a *Client) PluginsNextboxUISavedtopologiesCreate(params *PluginsNextboxUISavedtopologiesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesCreateCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPluginsNextboxUISavedtopologiesCreateParams() - } - op := &runtime.ClientOperation{ - ID: "plugins_nextbox-ui_savedtopologies_create", - Method: "POST", - PathPattern: "/plugins/nextbox-ui/savedtopologies/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PluginsNextboxUISavedtopologiesCreateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PluginsNextboxUISavedtopologiesCreateCreated) - 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 plugins_nextbox-ui_savedtopologies_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PluginsNextboxUISavedtopologiesDelete plugins nextbox ui savedtopologies delete API -*/ -func (a *Client) PluginsNextboxUISavedtopologiesDelete(params *PluginsNextboxUISavedtopologiesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesDeleteNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPluginsNextboxUISavedtopologiesDeleteParams() - } - op := &runtime.ClientOperation{ - ID: "plugins_nextbox-ui_savedtopologies_delete", - Method: "DELETE", - PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PluginsNextboxUISavedtopologiesDeleteReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PluginsNextboxUISavedtopologiesDeleteNoContent) - 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 plugins_nextbox-ui_savedtopologies_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PluginsNextboxUISavedtopologiesList plugins nextbox ui savedtopologies list API -*/ -func (a *Client) PluginsNextboxUISavedtopologiesList(params *PluginsNextboxUISavedtopologiesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesListOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPluginsNextboxUISavedtopologiesListParams() - } - op := &runtime.ClientOperation{ - ID: "plugins_nextbox-ui_savedtopologies_list", - Method: "GET", - PathPattern: "/plugins/nextbox-ui/savedtopologies/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PluginsNextboxUISavedtopologiesListReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PluginsNextboxUISavedtopologiesListOK) - 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 plugins_nextbox-ui_savedtopologies_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PluginsNextboxUISavedtopologiesPartialUpdate plugins nextbox ui savedtopologies partial update API -*/ -func (a *Client) PluginsNextboxUISavedtopologiesPartialUpdate(params *PluginsNextboxUISavedtopologiesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesPartialUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPluginsNextboxUISavedtopologiesPartialUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "plugins_nextbox-ui_savedtopologies_partial_update", - Method: "PATCH", - PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PluginsNextboxUISavedtopologiesPartialUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PluginsNextboxUISavedtopologiesPartialUpdateOK) - 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 plugins_nextbox-ui_savedtopologies_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PluginsNextboxUISavedtopologiesRead plugins nextbox ui savedtopologies read API -*/ -func (a *Client) PluginsNextboxUISavedtopologiesRead(params *PluginsNextboxUISavedtopologiesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesReadOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPluginsNextboxUISavedtopologiesReadParams() - } - op := &runtime.ClientOperation{ - ID: "plugins_nextbox-ui_savedtopologies_read", - Method: "GET", - PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PluginsNextboxUISavedtopologiesReadReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PluginsNextboxUISavedtopologiesReadOK) - 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 plugins_nextbox-ui_savedtopologies_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -/* - PluginsNextboxUISavedtopologiesUpdate plugins nextbox ui savedtopologies update API -*/ -func (a *Client) PluginsNextboxUISavedtopologiesUpdate(params *PluginsNextboxUISavedtopologiesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PluginsNextboxUISavedtopologiesUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPluginsNextboxUISavedtopologiesUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "plugins_nextbox-ui_savedtopologies_update", - Method: "PUT", - PathPattern: "/plugins/nextbox-ui/savedtopologies/{id}/", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &PluginsNextboxUISavedtopologiesUpdateReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*PluginsNextboxUISavedtopologiesUpdateOK) - 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 plugins_nextbox-ui_savedtopologies_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go deleted file mode 100644 index 4a37ea464..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_parameters.go +++ /dev/null @@ -1,163 +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 plugins - -// 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/netbox-community/go-netbox/netbox/models" -) - -// NewPluginsNextboxUISavedtopologiesCreateParams creates a new PluginsNextboxUISavedtopologiesCreateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsNextboxUISavedtopologiesCreateParams() *PluginsNextboxUISavedtopologiesCreateParams { - return &PluginsNextboxUISavedtopologiesCreateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsNextboxUISavedtopologiesCreateParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesCreateParams object -// with the ability to set a timeout on a request. -func NewPluginsNextboxUISavedtopologiesCreateParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesCreateParams { - return &PluginsNextboxUISavedtopologiesCreateParams{ - timeout: timeout, - } -} - -// NewPluginsNextboxUISavedtopologiesCreateParamsWithContext creates a new PluginsNextboxUISavedtopologiesCreateParams object -// with the ability to set a context for a request. -func NewPluginsNextboxUISavedtopologiesCreateParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesCreateParams { - return &PluginsNextboxUISavedtopologiesCreateParams{ - Context: ctx, - } -} - -// NewPluginsNextboxUISavedtopologiesCreateParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesCreateParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsNextboxUISavedtopologiesCreateParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesCreateParams { - return &PluginsNextboxUISavedtopologiesCreateParams{ - HTTPClient: client, - } -} - -/* PluginsNextboxUISavedtopologiesCreateParams contains all the parameters to send to the API endpoint - for the plugins nextbox ui savedtopologies create operation. - - Typically these are written to a http.Request. -*/ -type PluginsNextboxUISavedtopologiesCreateParams struct { - - // Data. - Data *models.SavedTopology - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesCreateParams) WithDefaults() *PluginsNextboxUISavedtopologiesCreateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies create params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesCreateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesCreateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesCreateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesCreateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) WithData(data *models.SavedTopology) *PluginsNextboxUISavedtopologiesCreateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the plugins nextbox ui savedtopologies create params -func (o *PluginsNextboxUISavedtopologiesCreateParams) SetData(data *models.SavedTopology) { - o.Data = data -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsNextboxUISavedtopologiesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go deleted file mode 100644 index 39cee696b..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_parameters.go +++ /dev/null @@ -1,165 +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 plugins - -// 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" -) - -// NewPluginsNextboxUISavedtopologiesDeleteParams creates a new PluginsNextboxUISavedtopologiesDeleteParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsNextboxUISavedtopologiesDeleteParams() *PluginsNextboxUISavedtopologiesDeleteParams { - return &PluginsNextboxUISavedtopologiesDeleteParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsNextboxUISavedtopologiesDeleteParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesDeleteParams object -// with the ability to set a timeout on a request. -func NewPluginsNextboxUISavedtopologiesDeleteParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesDeleteParams { - return &PluginsNextboxUISavedtopologiesDeleteParams{ - timeout: timeout, - } -} - -// NewPluginsNextboxUISavedtopologiesDeleteParamsWithContext creates a new PluginsNextboxUISavedtopologiesDeleteParams object -// with the ability to set a context for a request. -func NewPluginsNextboxUISavedtopologiesDeleteParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesDeleteParams { - return &PluginsNextboxUISavedtopologiesDeleteParams{ - Context: ctx, - } -} - -// NewPluginsNextboxUISavedtopologiesDeleteParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesDeleteParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsNextboxUISavedtopologiesDeleteParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesDeleteParams { - return &PluginsNextboxUISavedtopologiesDeleteParams{ - HTTPClient: client, - } -} - -/* PluginsNextboxUISavedtopologiesDeleteParams contains all the parameters to send to the API endpoint - for the plugins nextbox ui savedtopologies delete operation. - - Typically these are written to a http.Request. -*/ -type PluginsNextboxUISavedtopologiesDeleteParams struct { - - /* ID. - - A unique integer value identifying this saved topology. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithDefaults() *PluginsNextboxUISavedtopologiesDeleteParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies delete params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesDeleteParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesDeleteParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesDeleteParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) WithID(id int64) *PluginsNextboxUISavedtopologiesDeleteParams { - o.SetID(id) - return o -} - -// SetID adds the id to the plugins nextbox ui savedtopologies delete params -func (o *PluginsNextboxUISavedtopologiesDeleteParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsNextboxUISavedtopologiesDeleteParams) 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go deleted file mode 100644 index 18a6e4f3d..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_parameters.go +++ /dev/null @@ -1,211 +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 plugins - -// 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" -) - -// NewPluginsNextboxUISavedtopologiesListParams creates a new PluginsNextboxUISavedtopologiesListParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsNextboxUISavedtopologiesListParams() *PluginsNextboxUISavedtopologiesListParams { - return &PluginsNextboxUISavedtopologiesListParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsNextboxUISavedtopologiesListParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesListParams object -// with the ability to set a timeout on a request. -func NewPluginsNextboxUISavedtopologiesListParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesListParams { - return &PluginsNextboxUISavedtopologiesListParams{ - timeout: timeout, - } -} - -// NewPluginsNextboxUISavedtopologiesListParamsWithContext creates a new PluginsNextboxUISavedtopologiesListParams object -// with the ability to set a context for a request. -func NewPluginsNextboxUISavedtopologiesListParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesListParams { - return &PluginsNextboxUISavedtopologiesListParams{ - Context: ctx, - } -} - -// NewPluginsNextboxUISavedtopologiesListParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesListParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsNextboxUISavedtopologiesListParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesListParams { - return &PluginsNextboxUISavedtopologiesListParams{ - HTTPClient: client, - } -} - -/* PluginsNextboxUISavedtopologiesListParams contains all the parameters to send to the API endpoint - for the plugins nextbox ui savedtopologies list operation. - - Typically these are written to a http.Request. -*/ -type PluginsNextboxUISavedtopologiesListParams struct { - - /* Limit. - - Number of results to return per page. - */ - Limit *int64 - - /* Offset. - - The initial index from which to return the results. - */ - Offset *int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesListParams) WithDefaults() *PluginsNextboxUISavedtopologiesListParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies list params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesListParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithLimit adds the limit to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) WithLimit(limit *int64) *PluginsNextboxUISavedtopologiesListParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithOffset adds the offset to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) WithOffset(offset *int64) *PluginsNextboxUISavedtopologiesListParams { - o.SetOffset(offset) - return o -} - -// SetOffset adds the offset to the plugins nextbox ui savedtopologies list params -func (o *PluginsNextboxUISavedtopologiesListParams) SetOffset(offset *int64) { - o.Offset = offset -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsNextboxUISavedtopologiesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - } - - if o.Offset != nil { - - // query param offset - var qrOffset int64 - - if o.Offset != nil { - qrOffset = *o.Offset - } - qOffset := swag.FormatInt64(qrOffset) - if qOffset != "" { - - if err := r.SetQueryParam("offset", qOffset); err != nil { - return err - } - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go deleted file mode 100644 index 542beecb7..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_list_responses.go +++ /dev/null @@ -1,243 +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 plugins - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// PluginsNextboxUISavedtopologiesListReader is a Reader for the PluginsNextboxUISavedtopologiesList structure. -type PluginsNextboxUISavedtopologiesListReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PluginsNextboxUISavedtopologiesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPluginsNextboxUISavedtopologiesListOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPluginsNextboxUISavedtopologiesListOK creates a PluginsNextboxUISavedtopologiesListOK with default headers values -func NewPluginsNextboxUISavedtopologiesListOK() *PluginsNextboxUISavedtopologiesListOK { - return &PluginsNextboxUISavedtopologiesListOK{} -} - -/* PluginsNextboxUISavedtopologiesListOK describes a response with status code 200, with default header values. - -PluginsNextboxUISavedtopologiesListOK plugins nextbox Ui savedtopologies list o k -*/ -type PluginsNextboxUISavedtopologiesListOK struct { - Payload *PluginsNextboxUISavedtopologiesListOKBody -} - -func (o *PluginsNextboxUISavedtopologiesListOK) Error() string { - return fmt.Sprintf("[GET /plugins/nextbox-ui/savedtopologies/][%d] pluginsNextboxUiSavedtopologiesListOK %+v", 200, o.Payload) -} -func (o *PluginsNextboxUISavedtopologiesListOK) GetPayload() *PluginsNextboxUISavedtopologiesListOKBody { - return o.Payload -} - -func (o *PluginsNextboxUISavedtopologiesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(PluginsNextboxUISavedtopologiesListOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/*PluginsNextboxUISavedtopologiesListOKBody plugins nextbox UI savedtopologies list o k body -swagger:model PluginsNextboxUISavedtopologiesListOKBody -*/ -type PluginsNextboxUISavedtopologiesListOKBody struct { - - // count - // Required: true - Count *int64 `json:"count"` - - // next - // Format: uri - Next *strfmt.URI `json:"next,omitempty"` - - // previous - // Format: uri - Previous *strfmt.URI `json:"previous,omitempty"` - - // results - // Required: true - Results []*models.SavedTopology `json:"results"` -} - -// Validate validates this plugins nextbox UI savedtopologies list o k body -func (o *PluginsNextboxUISavedtopologiesListOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateCount(formats); err != nil { - res = append(res, err) - } - - if err := o.validateNext(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePrevious(formats); err != nil { - res = append(res, err) - } - - if err := o.validateResults(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *PluginsNextboxUISavedtopologiesListOKBody) validateCount(formats strfmt.Registry) error { - - if err := validate.Required("pluginsNextboxUiSavedtopologiesListOK"+"."+"count", "body", o.Count); err != nil { - return err - } - - return nil -} - -func (o *PluginsNextboxUISavedtopologiesListOKBody) validateNext(formats strfmt.Registry) error { - if swag.IsZero(o.Next) { // not required - return nil - } - - if err := validate.FormatOf("pluginsNextboxUiSavedtopologiesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *PluginsNextboxUISavedtopologiesListOKBody) validatePrevious(formats strfmt.Registry) error { - if swag.IsZero(o.Previous) { // not required - return nil - } - - if err := validate.FormatOf("pluginsNextboxUiSavedtopologiesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { - return err - } - - return nil -} - -func (o *PluginsNextboxUISavedtopologiesListOKBody) validateResults(formats strfmt.Registry) error { - - if err := validate.Required("pluginsNextboxUiSavedtopologiesListOK"+"."+"results", "body", o.Results); err != nil { - return err - } - - for i := 0; i < len(o.Results); i++ { - if swag.IsZero(o.Results[i]) { // not required - continue - } - - if o.Results[i] != nil { - if err := o.Results[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pluginsNextboxUiSavedtopologiesListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this plugins nextbox UI savedtopologies list o k body based on the context it is used -func (o *PluginsNextboxUISavedtopologiesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateResults(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *PluginsNextboxUISavedtopologiesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(o.Results); i++ { - - if o.Results[i] != nil { - if err := o.Results[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pluginsNextboxUiSavedtopologiesListOK" + "." + "results" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (o *PluginsNextboxUISavedtopologiesListOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *PluginsNextboxUISavedtopologiesListOKBody) UnmarshalBinary(b []byte) error { - var res PluginsNextboxUISavedtopologiesListOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go deleted file mode 100644 index f9e4d357d..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_parameters.go +++ /dev/null @@ -1,186 +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 plugins - -// 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" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewPluginsNextboxUISavedtopologiesPartialUpdateParams creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsNextboxUISavedtopologiesPartialUpdateParams() *PluginsNextboxUISavedtopologiesPartialUpdateParams { - return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object -// with the ability to set a timeout on a request. -func NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ - timeout: timeout, - } -} - -// NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithContext creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object -// with the ability to set a context for a request. -func NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ - Context: ctx, - } -} - -// NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesPartialUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsNextboxUISavedtopologiesPartialUpdateParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - return &PluginsNextboxUISavedtopologiesPartialUpdateParams{ - HTTPClient: client, - } -} - -/* PluginsNextboxUISavedtopologiesPartialUpdateParams contains all the parameters to send to the API endpoint - for the plugins nextbox ui savedtopologies partial update operation. - - Typically these are written to a http.Request. -*/ -type PluginsNextboxUISavedtopologiesPartialUpdateParams struct { - - // Data. - Data *models.SavedTopology - - /* ID. - - A unique integer value identifying this saved topology. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithDefaults() *PluginsNextboxUISavedtopologiesPartialUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies partial update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithData(data *models.SavedTopology) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetData(data *models.SavedTopology) { - o.Data = data -} - -// WithID adds the id to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WithID(id int64) *PluginsNextboxUISavedtopologiesPartialUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the plugins nextbox ui savedtopologies partial update params -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsNextboxUISavedtopologiesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go deleted file mode 100644 index 2d252ba75..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_partial_update_responses.go +++ /dev/null @@ -1,82 +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 plugins - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// PluginsNextboxUISavedtopologiesPartialUpdateReader is a Reader for the PluginsNextboxUISavedtopologiesPartialUpdate structure. -type PluginsNextboxUISavedtopologiesPartialUpdateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PluginsNextboxUISavedtopologiesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPluginsNextboxUISavedtopologiesPartialUpdateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) - } -} - -// NewPluginsNextboxUISavedtopologiesPartialUpdateOK creates a PluginsNextboxUISavedtopologiesPartialUpdateOK with default headers values -func NewPluginsNextboxUISavedtopologiesPartialUpdateOK() *PluginsNextboxUISavedtopologiesPartialUpdateOK { - return &PluginsNextboxUISavedtopologiesPartialUpdateOK{} -} - -/* PluginsNextboxUISavedtopologiesPartialUpdateOK describes a response with status code 200, with default header values. - -PluginsNextboxUISavedtopologiesPartialUpdateOK plugins nextbox Ui savedtopologies partial update o k -*/ -type PluginsNextboxUISavedtopologiesPartialUpdateOK struct { - Payload *models.SavedTopology -} - -func (o *PluginsNextboxUISavedtopologiesPartialUpdateOK) Error() string { - return fmt.Sprintf("[PATCH /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesPartialUpdateOK %+v", 200, o.Payload) -} -func (o *PluginsNextboxUISavedtopologiesPartialUpdateOK) GetPayload() *models.SavedTopology { - return o.Payload -} - -func (o *PluginsNextboxUISavedtopologiesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.SavedTopology) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go deleted file mode 100644 index 4f74b1aea..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_parameters.go +++ /dev/null @@ -1,165 +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 plugins - -// 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" -) - -// NewPluginsNextboxUISavedtopologiesReadParams creates a new PluginsNextboxUISavedtopologiesReadParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsNextboxUISavedtopologiesReadParams() *PluginsNextboxUISavedtopologiesReadParams { - return &PluginsNextboxUISavedtopologiesReadParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsNextboxUISavedtopologiesReadParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesReadParams object -// with the ability to set a timeout on a request. -func NewPluginsNextboxUISavedtopologiesReadParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesReadParams { - return &PluginsNextboxUISavedtopologiesReadParams{ - timeout: timeout, - } -} - -// NewPluginsNextboxUISavedtopologiesReadParamsWithContext creates a new PluginsNextboxUISavedtopologiesReadParams object -// with the ability to set a context for a request. -func NewPluginsNextboxUISavedtopologiesReadParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesReadParams { - return &PluginsNextboxUISavedtopologiesReadParams{ - Context: ctx, - } -} - -// NewPluginsNextboxUISavedtopologiesReadParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesReadParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsNextboxUISavedtopologiesReadParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesReadParams { - return &PluginsNextboxUISavedtopologiesReadParams{ - HTTPClient: client, - } -} - -/* PluginsNextboxUISavedtopologiesReadParams contains all the parameters to send to the API endpoint - for the plugins nextbox ui savedtopologies read operation. - - Typically these are written to a http.Request. -*/ -type PluginsNextboxUISavedtopologiesReadParams struct { - - /* ID. - - A unique integer value identifying this saved topology. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesReadParams) WithDefaults() *PluginsNextboxUISavedtopologiesReadParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies read params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesReadParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) WithID(id int64) *PluginsNextboxUISavedtopologiesReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the plugins nextbox ui savedtopologies read params -func (o *PluginsNextboxUISavedtopologiesReadParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsNextboxUISavedtopologiesReadParams) 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go b/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go deleted file mode 100644 index f7a3a5150..000000000 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_update_parameters.go +++ /dev/null @@ -1,186 +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 plugins - -// 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" - - "github.com/netbox-community/go-netbox/netbox/models" -) - -// NewPluginsNextboxUISavedtopologiesUpdateParams creates a new PluginsNextboxUISavedtopologiesUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewPluginsNextboxUISavedtopologiesUpdateParams() *PluginsNextboxUISavedtopologiesUpdateParams { - return &PluginsNextboxUISavedtopologiesUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewPluginsNextboxUISavedtopologiesUpdateParamsWithTimeout creates a new PluginsNextboxUISavedtopologiesUpdateParams object -// with the ability to set a timeout on a request. -func NewPluginsNextboxUISavedtopologiesUpdateParamsWithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesUpdateParams { - return &PluginsNextboxUISavedtopologiesUpdateParams{ - timeout: timeout, - } -} - -// NewPluginsNextboxUISavedtopologiesUpdateParamsWithContext creates a new PluginsNextboxUISavedtopologiesUpdateParams object -// with the ability to set a context for a request. -func NewPluginsNextboxUISavedtopologiesUpdateParamsWithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesUpdateParams { - return &PluginsNextboxUISavedtopologiesUpdateParams{ - Context: ctx, - } -} - -// NewPluginsNextboxUISavedtopologiesUpdateParamsWithHTTPClient creates a new PluginsNextboxUISavedtopologiesUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewPluginsNextboxUISavedtopologiesUpdateParamsWithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesUpdateParams { - return &PluginsNextboxUISavedtopologiesUpdateParams{ - HTTPClient: client, - } -} - -/* PluginsNextboxUISavedtopologiesUpdateParams contains all the parameters to send to the API endpoint - for the plugins nextbox ui savedtopologies update operation. - - Typically these are written to a http.Request. -*/ -type PluginsNextboxUISavedtopologiesUpdateParams struct { - - // Data. - Data *models.SavedTopology - - /* ID. - - A unique integer value identifying this saved topology. - */ - ID int64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the plugins nextbox ui savedtopologies update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithDefaults() *PluginsNextboxUISavedtopologiesUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the plugins nextbox ui savedtopologies update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithTimeout(timeout time.Duration) *PluginsNextboxUISavedtopologiesUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithContext(ctx context.Context) *PluginsNextboxUISavedtopologiesUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithHTTPClient(client *http.Client) *PluginsNextboxUISavedtopologiesUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithData adds the data to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithData(data *models.SavedTopology) *PluginsNextboxUISavedtopologiesUpdateParams { - o.SetData(data) - return o -} - -// SetData adds the data to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetData(data *models.SavedTopology) { - o.Data = data -} - -// WithID adds the id to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WithID(id int64) *PluginsNextboxUISavedtopologiesUpdateParams { - o.SetID(id) - return o -} - -// SetID adds the id to the plugins nextbox ui savedtopologies update params -func (o *PluginsNextboxUISavedtopologiesUpdateParams) SetID(id int64) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *PluginsNextboxUISavedtopologiesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Data != nil { - if err := r.SetBodyParam(o.Data); err != nil { - return err - } - } - - // 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/netbox/client/status/status_client.go b/netbox/client/status/status_client.go index 2fab90987..37e207aac 100644 --- a/netbox/client/status/status_client.go +++ b/netbox/client/status/status_client.go @@ -64,7 +64,7 @@ func (a *Client) StatusList(params *StatusListParams, authInfo runtime.ClientAut PathPattern: "/status/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &StatusListReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/tenancy/tenancy_client.go b/netbox/client/tenancy/tenancy_client.go index 6714105a9..2c1b8c830 100644 --- a/netbox/client/tenancy/tenancy_client.go +++ b/netbox/client/tenancy/tenancy_client.go @@ -45,6 +45,78 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + TenancyContactAssignmentsBulkDelete(params *TenancyContactAssignmentsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsBulkDeleteNoContent, error) + + TenancyContactAssignmentsBulkPartialUpdate(params *TenancyContactAssignmentsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsBulkPartialUpdateOK, error) + + TenancyContactAssignmentsBulkUpdate(params *TenancyContactAssignmentsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsBulkUpdateOK, error) + + TenancyContactAssignmentsCreate(params *TenancyContactAssignmentsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsCreateCreated, error) + + TenancyContactAssignmentsDelete(params *TenancyContactAssignmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsDeleteNoContent, error) + + TenancyContactAssignmentsList(params *TenancyContactAssignmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsListOK, error) + + TenancyContactAssignmentsPartialUpdate(params *TenancyContactAssignmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsPartialUpdateOK, error) + + TenancyContactAssignmentsRead(params *TenancyContactAssignmentsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsReadOK, error) + + TenancyContactAssignmentsUpdate(params *TenancyContactAssignmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsUpdateOK, error) + + TenancyContactGroupsBulkDelete(params *TenancyContactGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsBulkDeleteNoContent, error) + + TenancyContactGroupsBulkPartialUpdate(params *TenancyContactGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsBulkPartialUpdateOK, error) + + TenancyContactGroupsBulkUpdate(params *TenancyContactGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsBulkUpdateOK, error) + + TenancyContactGroupsCreate(params *TenancyContactGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsCreateCreated, error) + + TenancyContactGroupsDelete(params *TenancyContactGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsDeleteNoContent, error) + + TenancyContactGroupsList(params *TenancyContactGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsListOK, error) + + TenancyContactGroupsPartialUpdate(params *TenancyContactGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsPartialUpdateOK, error) + + TenancyContactGroupsRead(params *TenancyContactGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsReadOK, error) + + TenancyContactGroupsUpdate(params *TenancyContactGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsUpdateOK, error) + + TenancyContactRolesBulkDelete(params *TenancyContactRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesBulkDeleteNoContent, error) + + TenancyContactRolesBulkPartialUpdate(params *TenancyContactRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesBulkPartialUpdateOK, error) + + TenancyContactRolesBulkUpdate(params *TenancyContactRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesBulkUpdateOK, error) + + TenancyContactRolesCreate(params *TenancyContactRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesCreateCreated, error) + + TenancyContactRolesDelete(params *TenancyContactRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesDeleteNoContent, error) + + TenancyContactRolesList(params *TenancyContactRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesListOK, error) + + TenancyContactRolesPartialUpdate(params *TenancyContactRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesPartialUpdateOK, error) + + TenancyContactRolesRead(params *TenancyContactRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesReadOK, error) + + TenancyContactRolesUpdate(params *TenancyContactRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesUpdateOK, error) + + TenancyContactsBulkDelete(params *TenancyContactsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsBulkDeleteNoContent, error) + + TenancyContactsBulkPartialUpdate(params *TenancyContactsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsBulkPartialUpdateOK, error) + + TenancyContactsBulkUpdate(params *TenancyContactsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsBulkUpdateOK, error) + + TenancyContactsCreate(params *TenancyContactsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsCreateCreated, error) + + TenancyContactsDelete(params *TenancyContactsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsDeleteNoContent, error) + + TenancyContactsList(params *TenancyContactsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsListOK, error) + + TenancyContactsPartialUpdate(params *TenancyContactsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsPartialUpdateOK, error) + + TenancyContactsRead(params *TenancyContactsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsReadOK, error) + + TenancyContactsUpdate(params *TenancyContactsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsUpdateOK, error) + TenancyTenantGroupsBulkDelete(params *TenancyTenantGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkDeleteNoContent, error) TenancyTenantGroupsBulkPartialUpdate(params *TenancyTenantGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyTenantGroupsBulkPartialUpdateOK, error) @@ -84,6 +156,1410 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* + TenancyContactAssignmentsBulkDelete tenancy contact assignments bulk delete API +*/ +func (a *Client) TenancyContactAssignmentsBulkDelete(params *TenancyContactAssignmentsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_bulk_delete", + Method: "DELETE", + PathPattern: "/tenancy/contact-assignments/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsBulkDeleteNoContent) + 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 tenancy_contact-assignments_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsBulkPartialUpdate tenancy contact assignments bulk partial update API +*/ +func (a *Client) TenancyContactAssignmentsBulkPartialUpdate(params *TenancyContactAssignmentsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_bulk_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contact-assignments/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsBulkPartialUpdateOK) + 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 tenancy_contact-assignments_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsBulkUpdate tenancy contact assignments bulk update API +*/ +func (a *Client) TenancyContactAssignmentsBulkUpdate(params *TenancyContactAssignmentsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_bulk_update", + Method: "PUT", + PathPattern: "/tenancy/contact-assignments/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsBulkUpdateOK) + 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 tenancy_contact-assignments_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsCreate tenancy contact assignments create API +*/ +func (a *Client) TenancyContactAssignmentsCreate(params *TenancyContactAssignmentsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_create", + Method: "POST", + PathPattern: "/tenancy/contact-assignments/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsCreateCreated) + 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 tenancy_contact-assignments_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsDelete tenancy contact assignments delete API +*/ +func (a *Client) TenancyContactAssignmentsDelete(params *TenancyContactAssignmentsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_delete", + Method: "DELETE", + PathPattern: "/tenancy/contact-assignments/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsDeleteNoContent) + 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 tenancy_contact-assignments_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) TenancyContactAssignmentsList(params *TenancyContactAssignmentsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsListParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_list", + Method: "GET", + PathPattern: "/tenancy/contact-assignments/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsListOK) + 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 tenancy_contact-assignments_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsPartialUpdate tenancy contact assignments partial update API +*/ +func (a *Client) TenancyContactAssignmentsPartialUpdate(params *TenancyContactAssignmentsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contact-assignments/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsPartialUpdateOK) + 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 tenancy_contact-assignments_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsRead tenancy contact assignments read API +*/ +func (a *Client) TenancyContactAssignmentsRead(params *TenancyContactAssignmentsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsReadParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_read", + Method: "GET", + PathPattern: "/tenancy/contact-assignments/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsReadOK) + 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 tenancy_contact-assignments_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactAssignmentsUpdate tenancy contact assignments update API +*/ +func (a *Client) TenancyContactAssignmentsUpdate(params *TenancyContactAssignmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactAssignmentsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactAssignmentsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-assignments_update", + Method: "PUT", + PathPattern: "/tenancy/contact-assignments/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactAssignmentsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactAssignmentsUpdateOK) + 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 tenancy_contact-assignments_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsBulkDelete tenancy contact groups bulk delete API +*/ +func (a *Client) TenancyContactGroupsBulkDelete(params *TenancyContactGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_bulk_delete", + Method: "DELETE", + PathPattern: "/tenancy/contact-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsBulkDeleteNoContent) + 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 tenancy_contact-groups_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsBulkPartialUpdate tenancy contact groups bulk partial update API +*/ +func (a *Client) TenancyContactGroupsBulkPartialUpdate(params *TenancyContactGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_bulk_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contact-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsBulkPartialUpdateOK) + 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 tenancy_contact-groups_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsBulkUpdate tenancy contact groups bulk update API +*/ +func (a *Client) TenancyContactGroupsBulkUpdate(params *TenancyContactGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_bulk_update", + Method: "PUT", + PathPattern: "/tenancy/contact-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsBulkUpdateOK) + 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 tenancy_contact-groups_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsCreate tenancy contact groups create API +*/ +func (a *Client) TenancyContactGroupsCreate(params *TenancyContactGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_create", + Method: "POST", + PathPattern: "/tenancy/contact-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsCreateCreated) + 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 tenancy_contact-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsDelete tenancy contact groups delete API +*/ +func (a *Client) TenancyContactGroupsDelete(params *TenancyContactGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_delete", + Method: "DELETE", + PathPattern: "/tenancy/contact-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsDeleteNoContent) + 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 tenancy_contact-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) TenancyContactGroupsList(params *TenancyContactGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsListParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_list", + Method: "GET", + PathPattern: "/tenancy/contact-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsListOK) + 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 tenancy_contact-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsPartialUpdate tenancy contact groups partial update API +*/ +func (a *Client) TenancyContactGroupsPartialUpdate(params *TenancyContactGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contact-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsPartialUpdateOK) + 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 tenancy_contact-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsRead tenancy contact groups read API +*/ +func (a *Client) TenancyContactGroupsRead(params *TenancyContactGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsReadParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_read", + Method: "GET", + PathPattern: "/tenancy/contact-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsReadOK) + 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 tenancy_contact-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactGroupsUpdate tenancy contact groups update API +*/ +func (a *Client) TenancyContactGroupsUpdate(params *TenancyContactGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactGroupsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactGroupsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-groups_update", + Method: "PUT", + PathPattern: "/tenancy/contact-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactGroupsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactGroupsUpdateOK) + 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 tenancy_contact-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesBulkDelete tenancy contact roles bulk delete API +*/ +func (a *Client) TenancyContactRolesBulkDelete(params *TenancyContactRolesBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_bulk_delete", + Method: "DELETE", + PathPattern: "/tenancy/contact-roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesBulkDeleteNoContent) + 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 tenancy_contact-roles_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesBulkPartialUpdate tenancy contact roles bulk partial update API +*/ +func (a *Client) TenancyContactRolesBulkPartialUpdate(params *TenancyContactRolesBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_bulk_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contact-roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesBulkPartialUpdateOK) + 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 tenancy_contact-roles_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesBulkUpdate tenancy contact roles bulk update API +*/ +func (a *Client) TenancyContactRolesBulkUpdate(params *TenancyContactRolesBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_bulk_update", + Method: "PUT", + PathPattern: "/tenancy/contact-roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesBulkUpdateOK) + 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 tenancy_contact-roles_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesCreate tenancy contact roles create API +*/ +func (a *Client) TenancyContactRolesCreate(params *TenancyContactRolesCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesCreateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_create", + Method: "POST", + PathPattern: "/tenancy/contact-roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesCreateCreated) + 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 tenancy_contact-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesDelete tenancy contact roles delete API +*/ +func (a *Client) TenancyContactRolesDelete(params *TenancyContactRolesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_delete", + Method: "DELETE", + PathPattern: "/tenancy/contact-roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesDeleteNoContent) + 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 tenancy_contact-roles_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) TenancyContactRolesList(params *TenancyContactRolesListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesListParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_list", + Method: "GET", + PathPattern: "/tenancy/contact-roles/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesListOK) + 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 tenancy_contact-roles_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesPartialUpdate tenancy contact roles partial update API +*/ +func (a *Client) TenancyContactRolesPartialUpdate(params *TenancyContactRolesPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contact-roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesPartialUpdateOK) + 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 tenancy_contact-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesRead tenancy contact roles read API +*/ +func (a *Client) TenancyContactRolesRead(params *TenancyContactRolesReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesReadParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_read", + Method: "GET", + PathPattern: "/tenancy/contact-roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesReadOK) + 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 tenancy_contact-roles_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactRolesUpdate tenancy contact roles update API +*/ +func (a *Client) TenancyContactRolesUpdate(params *TenancyContactRolesUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactRolesUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactRolesUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contact-roles_update", + Method: "PUT", + PathPattern: "/tenancy/contact-roles/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactRolesUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactRolesUpdateOK) + 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 tenancy_contact-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsBulkDelete tenancy contacts bulk delete API +*/ +func (a *Client) TenancyContactsBulkDelete(params *TenancyContactsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_bulk_delete", + Method: "DELETE", + PathPattern: "/tenancy/contacts/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsBulkDeleteNoContent) + 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 tenancy_contacts_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsBulkPartialUpdate tenancy contacts bulk partial update API +*/ +func (a *Client) TenancyContactsBulkPartialUpdate(params *TenancyContactsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_bulk_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contacts/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsBulkPartialUpdateOK) + 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 tenancy_contacts_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsBulkUpdate tenancy contacts bulk update API +*/ +func (a *Client) TenancyContactsBulkUpdate(params *TenancyContactsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_bulk_update", + Method: "PUT", + PathPattern: "/tenancy/contacts/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsBulkUpdateOK) + 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 tenancy_contacts_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsCreate tenancy contacts create API +*/ +func (a *Client) TenancyContactsCreate(params *TenancyContactsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_create", + Method: "POST", + PathPattern: "/tenancy/contacts/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsCreateCreated) + 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 tenancy_contacts_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsDelete tenancy contacts delete API +*/ +func (a *Client) TenancyContactsDelete(params *TenancyContactsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_delete", + Method: "DELETE", + PathPattern: "/tenancy/contacts/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsDeleteNoContent) + 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 tenancy_contacts_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) TenancyContactsList(params *TenancyContactsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsListParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_list", + Method: "GET", + PathPattern: "/tenancy/contacts/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsListOK) + 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 tenancy_contacts_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsPartialUpdate tenancy contacts partial update API +*/ +func (a *Client) TenancyContactsPartialUpdate(params *TenancyContactsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_partial_update", + Method: "PATCH", + PathPattern: "/tenancy/contacts/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsPartialUpdateOK) + 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 tenancy_contacts_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsRead tenancy contacts read API +*/ +func (a *Client) TenancyContactsRead(params *TenancyContactsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsReadParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_read", + Method: "GET", + PathPattern: "/tenancy/contacts/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsReadOK) + 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 tenancy_contacts_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenancyContactsUpdate tenancy contacts update API +*/ +func (a *Client) TenancyContactsUpdate(params *TenancyContactsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TenancyContactsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenancyContactsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "tenancy_contacts_update", + Method: "PUT", + PathPattern: "/tenancy/contacts/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &TenancyContactsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*TenancyContactsUpdateOK) + 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 tenancy_contacts_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* TenancyTenantGroupsBulkDelete tenancy tenant groups bulk delete API */ @@ -98,7 +1574,7 @@ func (a *Client) TenancyTenantGroupsBulkDelete(params *TenancyTenantGroupsBulkDe PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -137,7 +1613,7 @@ func (a *Client) TenancyTenantGroupsBulkPartialUpdate(params *TenancyTenantGroup PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -176,7 +1652,7 @@ func (a *Client) TenancyTenantGroupsBulkUpdate(params *TenancyTenantGroupsBulkUp PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -215,7 +1691,7 @@ func (a *Client) TenancyTenantGroupsCreate(params *TenancyTenantGroupsCreatePara PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -254,7 +1730,7 @@ func (a *Client) TenancyTenantGroupsDelete(params *TenancyTenantGroupsDeletePara PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -293,7 +1769,7 @@ func (a *Client) TenancyTenantGroupsList(params *TenancyTenantGroupsListParams, PathPattern: "/tenancy/tenant-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -332,7 +1808,7 @@ func (a *Client) TenancyTenantGroupsPartialUpdate(params *TenancyTenantGroupsPar PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -371,7 +1847,7 @@ func (a *Client) TenancyTenantGroupsRead(params *TenancyTenantGroupsReadParams, PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -410,7 +1886,7 @@ func (a *Client) TenancyTenantGroupsUpdate(params *TenancyTenantGroupsUpdatePara PathPattern: "/tenancy/tenant-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -449,7 +1925,7 @@ func (a *Client) TenancyTenantsBulkDelete(params *TenancyTenantsBulkDeleteParams PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -488,7 +1964,7 @@ func (a *Client) TenancyTenantsBulkPartialUpdate(params *TenancyTenantsBulkParti PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -527,7 +2003,7 @@ func (a *Client) TenancyTenantsBulkUpdate(params *TenancyTenantsBulkUpdateParams PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -566,7 +2042,7 @@ func (a *Client) TenancyTenantsCreate(params *TenancyTenantsCreateParams, authIn PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -605,7 +2081,7 @@ func (a *Client) TenancyTenantsDelete(params *TenancyTenantsDeleteParams, authIn PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -644,7 +2120,7 @@ func (a *Client) TenancyTenantsList(params *TenancyTenantsListParams, authInfo r PathPattern: "/tenancy/tenants/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -683,7 +2159,7 @@ func (a *Client) TenancyTenantsPartialUpdate(params *TenancyTenantsPartialUpdate PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -722,7 +2198,7 @@ func (a *Client) TenancyTenantsRead(params *TenancyTenantsReadParams, authInfo r PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -761,7 +2237,7 @@ func (a *Client) TenancyTenantsUpdate(params *TenancyTenantsUpdateParams, authIn PathPattern: "/tenancy/tenants/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &TenancyTenantsUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_parameters.go new file mode 100644 index 000000000..9a4b5b5b5 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactAssignmentsBulkDeleteParams creates a new TenancyContactAssignmentsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsBulkDeleteParams() *TenancyContactAssignmentsBulkDeleteParams { + return &TenancyContactAssignmentsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsBulkDeleteParamsWithTimeout creates a new TenancyContactAssignmentsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsBulkDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsBulkDeleteParams { + return &TenancyContactAssignmentsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsBulkDeleteParamsWithContext creates a new TenancyContactAssignmentsBulkDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsBulkDeleteParamsWithContext(ctx context.Context) *TenancyContactAssignmentsBulkDeleteParams { + return &TenancyContactAssignmentsBulkDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsBulkDeleteParamsWithHTTPClient creates a new TenancyContactAssignmentsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsBulkDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsBulkDeleteParams { + return &TenancyContactAssignmentsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsBulkDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments bulk delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsBulkDeleteParams) WithDefaults() *TenancyContactAssignmentsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments bulk delete params +func (o *TenancyContactAssignmentsBulkDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments bulk delete params +func (o *TenancyContactAssignmentsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments bulk delete params +func (o *TenancyContactAssignmentsBulkDeleteParams) WithContext(ctx context.Context) *TenancyContactAssignmentsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments bulk delete params +func (o *TenancyContactAssignmentsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments bulk delete params +func (o *TenancyContactAssignmentsBulkDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments bulk delete params +func (o *TenancyContactAssignmentsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsBulkDeleteParams) 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/netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_responses.go new file mode 100644 index 000000000..e13a4051c --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactAssignmentsBulkDeleteReader is a Reader for the TenancyContactAssignmentsBulkDelete structure. +type TenancyContactAssignmentsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactAssignmentsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsBulkDeleteNoContent creates a TenancyContactAssignmentsBulkDeleteNoContent with default headers values +func NewTenancyContactAssignmentsBulkDeleteNoContent() *TenancyContactAssignmentsBulkDeleteNoContent { + return &TenancyContactAssignmentsBulkDeleteNoContent{} +} + +/* TenancyContactAssignmentsBulkDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactAssignmentsBulkDeleteNoContent tenancy contact assignments bulk delete no content +*/ +type TenancyContactAssignmentsBulkDeleteNoContent struct { +} + +func (o *TenancyContactAssignmentsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contact-assignments/][%d] tenancyContactAssignmentsBulkDeleteNoContent ", 204) +} + +func (o *TenancyContactAssignmentsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_parameters.go new file mode 100644 index 000000000..d01c791c3 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactAssignmentsBulkPartialUpdateParams creates a new TenancyContactAssignmentsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsBulkPartialUpdateParams() *TenancyContactAssignmentsBulkPartialUpdateParams { + return &TenancyContactAssignmentsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsBulkPartialUpdateParamsWithTimeout creates a new TenancyContactAssignmentsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsBulkPartialUpdateParams { + return &TenancyContactAssignmentsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsBulkPartialUpdateParamsWithContext creates a new TenancyContactAssignmentsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsBulkPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactAssignmentsBulkPartialUpdateParams { + return &TenancyContactAssignmentsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsBulkPartialUpdateParamsWithHTTPClient creates a new TenancyContactAssignmentsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsBulkPartialUpdateParams { + return &TenancyContactAssignmentsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableContactAssignment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) WithDefaults() *TenancyContactAssignmentsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactAssignmentsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) WithData(data *models.WritableContactAssignment) *TenancyContactAssignmentsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact assignments bulk partial update params +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) SetData(data *models.WritableContactAssignment) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_responses.go similarity index 53% rename from netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_responses.go rename to netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_responses.go index c2e754123..5baf52eaf 100644 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_create_responses.go +++ b/netbox/client/tenancy/tenancy_contact_assignments_bulk_partial_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package plugins +package tenancy // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// PluginsNextboxUISavedtopologiesCreateReader is a Reader for the PluginsNextboxUISavedtopologiesCreate structure. -type PluginsNextboxUISavedtopologiesCreateReader struct { +// TenancyContactAssignmentsBulkPartialUpdateReader is a Reader for the TenancyContactAssignmentsBulkPartialUpdate structure. +type TenancyContactAssignmentsBulkPartialUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *PluginsNextboxUISavedtopologiesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *TenancyContactAssignmentsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 201: - result := NewPluginsNextboxUISavedtopologiesCreateCreated() + case 200: + result := NewTenancyContactAssignmentsBulkPartialUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *PluginsNextboxUISavedtopologiesCreateReader) ReadResponse(response runt } } -// NewPluginsNextboxUISavedtopologiesCreateCreated creates a PluginsNextboxUISavedtopologiesCreateCreated with default headers values -func NewPluginsNextboxUISavedtopologiesCreateCreated() *PluginsNextboxUISavedtopologiesCreateCreated { - return &PluginsNextboxUISavedtopologiesCreateCreated{} +// NewTenancyContactAssignmentsBulkPartialUpdateOK creates a TenancyContactAssignmentsBulkPartialUpdateOK with default headers values +func NewTenancyContactAssignmentsBulkPartialUpdateOK() *TenancyContactAssignmentsBulkPartialUpdateOK { + return &TenancyContactAssignmentsBulkPartialUpdateOK{} } -/* PluginsNextboxUISavedtopologiesCreateCreated describes a response with status code 201, with default header values. +/* TenancyContactAssignmentsBulkPartialUpdateOK describes a response with status code 200, with default header values. -PluginsNextboxUISavedtopologiesCreateCreated plugins nextbox Ui savedtopologies create created +TenancyContactAssignmentsBulkPartialUpdateOK tenancy contact assignments bulk partial update o k */ -type PluginsNextboxUISavedtopologiesCreateCreated struct { - Payload *models.SavedTopology +type TenancyContactAssignmentsBulkPartialUpdateOK struct { + Payload *models.ContactAssignment } -func (o *PluginsNextboxUISavedtopologiesCreateCreated) Error() string { - return fmt.Sprintf("[POST /plugins/nextbox-ui/savedtopologies/][%d] pluginsNextboxUiSavedtopologiesCreateCreated %+v", 201, o.Payload) +func (o *TenancyContactAssignmentsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contact-assignments/][%d] tenancyContactAssignmentsBulkPartialUpdateOK %+v", 200, o.Payload) } -func (o *PluginsNextboxUISavedtopologiesCreateCreated) GetPayload() *models.SavedTopology { +func (o *TenancyContactAssignmentsBulkPartialUpdateOK) GetPayload() *models.ContactAssignment { return o.Payload } -func (o *PluginsNextboxUISavedtopologiesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *TenancyContactAssignmentsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SavedTopology) + o.Payload = new(models.ContactAssignment) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/tenancy/tenancy_contact_assignments_bulk_update_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_bulk_update_parameters.go new file mode 100644 index 000000000..b8e311cbb --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactAssignmentsBulkUpdateParams creates a new TenancyContactAssignmentsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsBulkUpdateParams() *TenancyContactAssignmentsBulkUpdateParams { + return &TenancyContactAssignmentsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsBulkUpdateParamsWithTimeout creates a new TenancyContactAssignmentsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsBulkUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsBulkUpdateParams { + return &TenancyContactAssignmentsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsBulkUpdateParamsWithContext creates a new TenancyContactAssignmentsBulkUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsBulkUpdateParamsWithContext(ctx context.Context) *TenancyContactAssignmentsBulkUpdateParams { + return &TenancyContactAssignmentsBulkUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsBulkUpdateParamsWithHTTPClient creates a new TenancyContactAssignmentsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsBulkUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsBulkUpdateParams { + return &TenancyContactAssignmentsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsBulkUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments bulk update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsBulkUpdateParams struct { + + // Data. + Data *models.WritableContactAssignment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsBulkUpdateParams) WithDefaults() *TenancyContactAssignmentsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) WithContext(ctx context.Context) *TenancyContactAssignmentsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) WithData(data *models.WritableContactAssignment) *TenancyContactAssignmentsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact assignments bulk update params +func (o *TenancyContactAssignmentsBulkUpdateParams) SetData(data *models.WritableContactAssignment) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_bulk_update_responses.go similarity index 59% rename from netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_responses.go rename to netbox/client/tenancy/tenancy_contact_assignments_bulk_update_responses.go index 515d843d6..bf568c0c7 100644 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_read_responses.go +++ b/netbox/client/tenancy/tenancy_contact_assignments_bulk_update_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package plugins +package tenancy // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -30,16 +30,16 @@ import ( "github.com/netbox-community/go-netbox/netbox/models" ) -// PluginsNextboxUISavedtopologiesReadReader is a Reader for the PluginsNextboxUISavedtopologiesRead structure. -type PluginsNextboxUISavedtopologiesReadReader struct { +// TenancyContactAssignmentsBulkUpdateReader is a Reader for the TenancyContactAssignmentsBulkUpdate structure. +type TenancyContactAssignmentsBulkUpdateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *PluginsNextboxUISavedtopologiesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *TenancyContactAssignmentsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewPluginsNextboxUISavedtopologiesReadOK() + result := NewTenancyContactAssignmentsBulkUpdateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -49,29 +49,29 @@ func (o *PluginsNextboxUISavedtopologiesReadReader) ReadResponse(response runtim } } -// NewPluginsNextboxUISavedtopologiesReadOK creates a PluginsNextboxUISavedtopologiesReadOK with default headers values -func NewPluginsNextboxUISavedtopologiesReadOK() *PluginsNextboxUISavedtopologiesReadOK { - return &PluginsNextboxUISavedtopologiesReadOK{} +// NewTenancyContactAssignmentsBulkUpdateOK creates a TenancyContactAssignmentsBulkUpdateOK with default headers values +func NewTenancyContactAssignmentsBulkUpdateOK() *TenancyContactAssignmentsBulkUpdateOK { + return &TenancyContactAssignmentsBulkUpdateOK{} } -/* PluginsNextboxUISavedtopologiesReadOK describes a response with status code 200, with default header values. +/* TenancyContactAssignmentsBulkUpdateOK describes a response with status code 200, with default header values. -PluginsNextboxUISavedtopologiesReadOK plugins nextbox Ui savedtopologies read o k +TenancyContactAssignmentsBulkUpdateOK tenancy contact assignments bulk update o k */ -type PluginsNextboxUISavedtopologiesReadOK struct { - Payload *models.SavedTopology +type TenancyContactAssignmentsBulkUpdateOK struct { + Payload *models.ContactAssignment } -func (o *PluginsNextboxUISavedtopologiesReadOK) Error() string { - return fmt.Sprintf("[GET /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesReadOK %+v", 200, o.Payload) +func (o *TenancyContactAssignmentsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contact-assignments/][%d] tenancyContactAssignmentsBulkUpdateOK %+v", 200, o.Payload) } -func (o *PluginsNextboxUISavedtopologiesReadOK) GetPayload() *models.SavedTopology { +func (o *TenancyContactAssignmentsBulkUpdateOK) GetPayload() *models.ContactAssignment { return o.Payload } -func (o *PluginsNextboxUISavedtopologiesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *TenancyContactAssignmentsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.SavedTopology) + o.Payload = new(models.ContactAssignment) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/netbox/client/tenancy/tenancy_contact_assignments_create_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_create_parameters.go new file mode 100644 index 000000000..6e2d35a6b --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_create_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactAssignmentsCreateParams creates a new TenancyContactAssignmentsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsCreateParams() *TenancyContactAssignmentsCreateParams { + return &TenancyContactAssignmentsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsCreateParamsWithTimeout creates a new TenancyContactAssignmentsCreateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsCreateParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsCreateParams { + return &TenancyContactAssignmentsCreateParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsCreateParamsWithContext creates a new TenancyContactAssignmentsCreateParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsCreateParamsWithContext(ctx context.Context) *TenancyContactAssignmentsCreateParams { + return &TenancyContactAssignmentsCreateParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsCreateParamsWithHTTPClient creates a new TenancyContactAssignmentsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsCreateParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsCreateParams { + return &TenancyContactAssignmentsCreateParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsCreateParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments create operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsCreateParams struct { + + // Data. + Data *models.WritableContactAssignment + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsCreateParams) WithDefaults() *TenancyContactAssignmentsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) WithContext(ctx context.Context) *TenancyContactAssignmentsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) WithData(data *models.WritableContactAssignment) *TenancyContactAssignmentsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact assignments create params +func (o *TenancyContactAssignmentsCreateParams) SetData(data *models.WritableContactAssignment) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_create_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_create_responses.go new file mode 100644 index 000000000..45f83a3dd --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_create_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactAssignmentsCreateReader is a Reader for the TenancyContactAssignmentsCreate structure. +type TenancyContactAssignmentsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewTenancyContactAssignmentsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsCreateCreated creates a TenancyContactAssignmentsCreateCreated with default headers values +func NewTenancyContactAssignmentsCreateCreated() *TenancyContactAssignmentsCreateCreated { + return &TenancyContactAssignmentsCreateCreated{} +} + +/* TenancyContactAssignmentsCreateCreated describes a response with status code 201, with default header values. + +TenancyContactAssignmentsCreateCreated tenancy contact assignments create created +*/ +type TenancyContactAssignmentsCreateCreated struct { + Payload *models.ContactAssignment +} + +func (o *TenancyContactAssignmentsCreateCreated) Error() string { + return fmt.Sprintf("[POST /tenancy/contact-assignments/][%d] tenancyContactAssignmentsCreateCreated %+v", 201, o.Payload) +} +func (o *TenancyContactAssignmentsCreateCreated) GetPayload() *models.ContactAssignment { + return o.Payload +} + +func (o *TenancyContactAssignmentsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_delete_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_delete_parameters.go new file mode 100644 index 000000000..d1b67448d --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactAssignmentsDeleteParams creates a new TenancyContactAssignmentsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsDeleteParams() *TenancyContactAssignmentsDeleteParams { + return &TenancyContactAssignmentsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsDeleteParamsWithTimeout creates a new TenancyContactAssignmentsDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsDeleteParams { + return &TenancyContactAssignmentsDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsDeleteParamsWithContext creates a new TenancyContactAssignmentsDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsDeleteParamsWithContext(ctx context.Context) *TenancyContactAssignmentsDeleteParams { + return &TenancyContactAssignmentsDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsDeleteParamsWithHTTPClient creates a new TenancyContactAssignmentsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsDeleteParams { + return &TenancyContactAssignmentsDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsDeleteParams struct { + + /* ID. + + A unique integer value identifying this contact assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsDeleteParams) WithDefaults() *TenancyContactAssignmentsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) WithContext(ctx context.Context) *TenancyContactAssignmentsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) WithID(id int64) *TenancyContactAssignmentsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact assignments delete params +func (o *TenancyContactAssignmentsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsDeleteParams) 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/netbox/client/tenancy/tenancy_contact_assignments_delete_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_delete_responses.go new file mode 100644 index 000000000..f87e7474f --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactAssignmentsDeleteReader is a Reader for the TenancyContactAssignmentsDelete structure. +type TenancyContactAssignmentsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactAssignmentsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsDeleteNoContent creates a TenancyContactAssignmentsDeleteNoContent with default headers values +func NewTenancyContactAssignmentsDeleteNoContent() *TenancyContactAssignmentsDeleteNoContent { + return &TenancyContactAssignmentsDeleteNoContent{} +} + +/* TenancyContactAssignmentsDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactAssignmentsDeleteNoContent tenancy contact assignments delete no content +*/ +type TenancyContactAssignmentsDeleteNoContent struct { +} + +func (o *TenancyContactAssignmentsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contact-assignments/{id}/][%d] tenancyContactAssignmentsDeleteNoContent ", 204) +} + +func (o *TenancyContactAssignmentsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go new file mode 100644 index 000000000..89678a856 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_list_parameters.go @@ -0,0 +1,1141 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactAssignmentsListParams creates a new TenancyContactAssignmentsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsListParams() *TenancyContactAssignmentsListParams { + return &TenancyContactAssignmentsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsListParamsWithTimeout creates a new TenancyContactAssignmentsListParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsListParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsListParams { + return &TenancyContactAssignmentsListParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsListParamsWithContext creates a new TenancyContactAssignmentsListParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsListParamsWithContext(ctx context.Context) *TenancyContactAssignmentsListParams { + return &TenancyContactAssignmentsListParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsListParamsWithHTTPClient creates a new TenancyContactAssignmentsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsListParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsListParams { + return &TenancyContactAssignmentsListParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsListParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments list operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsListParams struct { + + // ContactID. + ContactID *string + + // ContactIDn. + ContactIDn *string + + // ContentType. + ContentType *string + + // ContentTypen. + ContentTypen *string + + // ContentTypeID. + ContentTypeID *string + + // ContentTypeIDn. + ContentTypeIDn *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // ObjectID. + ObjectID *string + + // ObjectIDGt. + ObjectIDGt *string + + // ObjectIDGte. + ObjectIDGte *string + + // ObjectIDLt. + ObjectIDLt *string + + // ObjectIDLte. + ObjectIDLte *string + + // ObjectIDn. + ObjectIDn *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Priority. + Priority *string + + // Priorityn. + Priorityn *string + + // Role. + Role *string + + // Rolen. + Rolen *string + + // RoleID. + RoleID *string + + // RoleIDn. + RoleIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsListParams) WithDefaults() *TenancyContactAssignmentsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContext(ctx context.Context) *TenancyContactAssignmentsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContactID adds the contactID to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContactID(contactID *string) *TenancyContactAssignmentsListParams { + o.SetContactID(contactID) + return o +} + +// SetContactID adds the contactId to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContactID(contactID *string) { + o.ContactID = contactID +} + +// WithContactIDn adds the contactIDn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContactIDn(contactIDn *string) *TenancyContactAssignmentsListParams { + o.SetContactIDn(contactIDn) + return o +} + +// SetContactIDn adds the contactIdN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContactIDn(contactIDn *string) { + o.ContactIDn = contactIDn +} + +// WithContentType adds the contentType to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContentType(contentType *string) *TenancyContactAssignmentsListParams { + o.SetContentType(contentType) + return o +} + +// SetContentType adds the contentType to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContentType(contentType *string) { + o.ContentType = contentType +} + +// WithContentTypen adds the contentTypen to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContentTypen(contentTypen *string) *TenancyContactAssignmentsListParams { + o.SetContentTypen(contentTypen) + return o +} + +// SetContentTypen adds the contentTypeN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContentTypen(contentTypen *string) { + o.ContentTypen = contentTypen +} + +// WithContentTypeID adds the contentTypeID to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContentTypeID(contentTypeID *string) *TenancyContactAssignmentsListParams { + o.SetContentTypeID(contentTypeID) + return o +} + +// SetContentTypeID adds the contentTypeId to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContentTypeID(contentTypeID *string) { + o.ContentTypeID = contentTypeID +} + +// WithContentTypeIDn adds the contentTypeIDn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithContentTypeIDn(contentTypeIDn *string) *TenancyContactAssignmentsListParams { + o.SetContentTypeIDn(contentTypeIDn) + return o +} + +// SetContentTypeIDn adds the contentTypeIdN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetContentTypeIDn(contentTypeIDn *string) { + o.ContentTypeIDn = contentTypeIDn +} + +// WithCreated adds the created to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithCreated(created *string) *TenancyContactAssignmentsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithCreatedGte(createdGte *string) *TenancyContactAssignmentsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithCreatedLte(createdLte *string) *TenancyContactAssignmentsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithID adds the id to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithID(id *string) *TenancyContactAssignmentsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithIDGt(iDGt *string) *TenancyContactAssignmentsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithIDGte(iDGte *string) *TenancyContactAssignmentsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithIDLt(iDLt *string) *TenancyContactAssignmentsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithIDLte(iDLte *string) *TenancyContactAssignmentsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithIDn(iDn *string) *TenancyContactAssignmentsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLastUpdated(lastUpdated *string) *TenancyContactAssignmentsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactAssignmentsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactAssignmentsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithLimit(limit *int64) *TenancyContactAssignmentsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithObjectID adds the objectID to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithObjectID(objectID *string) *TenancyContactAssignmentsListParams { + o.SetObjectID(objectID) + return o +} + +// SetObjectID adds the objectId to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetObjectID(objectID *string) { + o.ObjectID = objectID +} + +// WithObjectIDGt adds the objectIDGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithObjectIDGt(objectIDGt *string) *TenancyContactAssignmentsListParams { + o.SetObjectIDGt(objectIDGt) + return o +} + +// SetObjectIDGt adds the objectIdGt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetObjectIDGt(objectIDGt *string) { + o.ObjectIDGt = objectIDGt +} + +// WithObjectIDGte adds the objectIDGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithObjectIDGte(objectIDGte *string) *TenancyContactAssignmentsListParams { + o.SetObjectIDGte(objectIDGte) + return o +} + +// SetObjectIDGte adds the objectIdGte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetObjectIDGte(objectIDGte *string) { + o.ObjectIDGte = objectIDGte +} + +// WithObjectIDLt adds the objectIDLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithObjectIDLt(objectIDLt *string) *TenancyContactAssignmentsListParams { + o.SetObjectIDLt(objectIDLt) + return o +} + +// SetObjectIDLt adds the objectIdLt to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetObjectIDLt(objectIDLt *string) { + o.ObjectIDLt = objectIDLt +} + +// WithObjectIDLte adds the objectIDLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithObjectIDLte(objectIDLte *string) *TenancyContactAssignmentsListParams { + o.SetObjectIDLte(objectIDLte) + return o +} + +// SetObjectIDLte adds the objectIdLte to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetObjectIDLte(objectIDLte *string) { + o.ObjectIDLte = objectIDLte +} + +// WithObjectIDn adds the objectIDn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithObjectIDn(objectIDn *string) *TenancyContactAssignmentsListParams { + o.SetObjectIDn(objectIDn) + return o +} + +// SetObjectIDn adds the objectIdN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetObjectIDn(objectIDn *string) { + o.ObjectIDn = objectIDn +} + +// WithOffset adds the offset to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithOffset(offset *int64) *TenancyContactAssignmentsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPriority adds the priority to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithPriority(priority *string) *TenancyContactAssignmentsListParams { + o.SetPriority(priority) + return o +} + +// SetPriority adds the priority to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetPriority(priority *string) { + o.Priority = priority +} + +// WithPriorityn adds the priorityn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithPriorityn(priorityn *string) *TenancyContactAssignmentsListParams { + o.SetPriorityn(priorityn) + return o +} + +// SetPriorityn adds the priorityN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetPriorityn(priorityn *string) { + o.Priorityn = priorityn +} + +// WithRole adds the role to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithRole(role *string) *TenancyContactAssignmentsListParams { + o.SetRole(role) + return o +} + +// SetRole adds the role to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetRole(role *string) { + o.Role = role +} + +// WithRolen adds the rolen to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithRolen(rolen *string) *TenancyContactAssignmentsListParams { + o.SetRolen(rolen) + return o +} + +// SetRolen adds the roleN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetRolen(rolen *string) { + o.Rolen = rolen +} + +// WithRoleID adds the roleID to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithRoleID(roleID *string) *TenancyContactAssignmentsListParams { + o.SetRoleID(roleID) + return o +} + +// SetRoleID adds the roleId to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetRoleID(roleID *string) { + o.RoleID = roleID +} + +// WithRoleIDn adds the roleIDn to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) WithRoleIDn(roleIDn *string) *TenancyContactAssignmentsListParams { + o.SetRoleIDn(roleIDn) + return o +} + +// SetRoleIDn adds the roleIdN to the tenancy contact assignments list params +func (o *TenancyContactAssignmentsListParams) SetRoleIDn(roleIDn *string) { + o.RoleIDn = roleIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ContactID != nil { + + // query param contact_id + var qrContactID string + + if o.ContactID != nil { + qrContactID = *o.ContactID + } + qContactID := qrContactID + if qContactID != "" { + + if err := r.SetQueryParam("contact_id", qContactID); err != nil { + return err + } + } + } + + if o.ContactIDn != nil { + + // query param contact_id__n + var qrContactIDn string + + if o.ContactIDn != nil { + qrContactIDn = *o.ContactIDn + } + qContactIDn := qrContactIDn + if qContactIDn != "" { + + if err := r.SetQueryParam("contact_id__n", qContactIDn); err != nil { + return err + } + } + } + + if o.ContentType != nil { + + // query param content_type + var qrContentType string + + if o.ContentType != nil { + qrContentType = *o.ContentType + } + qContentType := qrContentType + if qContentType != "" { + + if err := r.SetQueryParam("content_type", qContentType); err != nil { + return err + } + } + } + + if o.ContentTypen != nil { + + // query param content_type__n + var qrContentTypen string + + if o.ContentTypen != nil { + qrContentTypen = *o.ContentTypen + } + qContentTypen := qrContentTypen + if qContentTypen != "" { + + if err := r.SetQueryParam("content_type__n", qContentTypen); err != nil { + return err + } + } + } + + if o.ContentTypeID != nil { + + // query param content_type_id + var qrContentTypeID string + + if o.ContentTypeID != nil { + qrContentTypeID = *o.ContentTypeID + } + qContentTypeID := qrContentTypeID + if qContentTypeID != "" { + + if err := r.SetQueryParam("content_type_id", qContentTypeID); err != nil { + return err + } + } + } + + if o.ContentTypeIDn != nil { + + // query param content_type_id__n + var qrContentTypeIDn string + + if o.ContentTypeIDn != nil { + qrContentTypeIDn = *o.ContentTypeIDn + } + qContentTypeIDn := qrContentTypeIDn + if qContentTypeIDn != "" { + + if err := r.SetQueryParam("content_type_id__n", qContentTypeIDn); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.ObjectID != nil { + + // query param object_id + var qrObjectID string + + if o.ObjectID != nil { + qrObjectID = *o.ObjectID + } + qObjectID := qrObjectID + if qObjectID != "" { + + if err := r.SetQueryParam("object_id", qObjectID); err != nil { + return err + } + } + } + + if o.ObjectIDGt != nil { + + // query param object_id__gt + var qrObjectIDGt string + + if o.ObjectIDGt != nil { + qrObjectIDGt = *o.ObjectIDGt + } + qObjectIDGt := qrObjectIDGt + if qObjectIDGt != "" { + + if err := r.SetQueryParam("object_id__gt", qObjectIDGt); err != nil { + return err + } + } + } + + if o.ObjectIDGte != nil { + + // query param object_id__gte + var qrObjectIDGte string + + if o.ObjectIDGte != nil { + qrObjectIDGte = *o.ObjectIDGte + } + qObjectIDGte := qrObjectIDGte + if qObjectIDGte != "" { + + if err := r.SetQueryParam("object_id__gte", qObjectIDGte); err != nil { + return err + } + } + } + + if o.ObjectIDLt != nil { + + // query param object_id__lt + var qrObjectIDLt string + + if o.ObjectIDLt != nil { + qrObjectIDLt = *o.ObjectIDLt + } + qObjectIDLt := qrObjectIDLt + if qObjectIDLt != "" { + + if err := r.SetQueryParam("object_id__lt", qObjectIDLt); err != nil { + return err + } + } + } + + if o.ObjectIDLte != nil { + + // query param object_id__lte + var qrObjectIDLte string + + if o.ObjectIDLte != nil { + qrObjectIDLte = *o.ObjectIDLte + } + qObjectIDLte := qrObjectIDLte + if qObjectIDLte != "" { + + if err := r.SetQueryParam("object_id__lte", qObjectIDLte); err != nil { + return err + } + } + } + + if o.ObjectIDn != nil { + + // query param object_id__n + var qrObjectIDn string + + if o.ObjectIDn != nil { + qrObjectIDn = *o.ObjectIDn + } + qObjectIDn := qrObjectIDn + if qObjectIDn != "" { + + if err := r.SetQueryParam("object_id__n", qObjectIDn); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Priority != nil { + + // query param priority + var qrPriority string + + if o.Priority != nil { + qrPriority = *o.Priority + } + qPriority := qrPriority + if qPriority != "" { + + if err := r.SetQueryParam("priority", qPriority); err != nil { + return err + } + } + } + + if o.Priorityn != nil { + + // query param priority__n + var qrPriorityn string + + if o.Priorityn != nil { + qrPriorityn = *o.Priorityn + } + qPriorityn := qrPriorityn + if qPriorityn != "" { + + if err := r.SetQueryParam("priority__n", qPriorityn); err != nil { + return err + } + } + } + + if o.Role != nil { + + // query param role + var qrRole string + + if o.Role != nil { + qrRole = *o.Role + } + qRole := qrRole + if qRole != "" { + + if err := r.SetQueryParam("role", qRole); err != nil { + return err + } + } + } + + if o.Rolen != nil { + + // query param role__n + var qrRolen string + + if o.Rolen != nil { + qrRolen = *o.Rolen + } + qRolen := qrRolen + if qRolen != "" { + + if err := r.SetQueryParam("role__n", qRolen); err != nil { + return err + } + } + } + + if o.RoleID != nil { + + // query param role_id + var qrRoleID string + + if o.RoleID != nil { + qrRoleID = *o.RoleID + } + qRoleID := qrRoleID + if qRoleID != "" { + + if err := r.SetQueryParam("role_id", qRoleID); err != nil { + return err + } + } + } + + if o.RoleIDn != nil { + + // query param role_id__n + var qrRoleIDn string + + if o.RoleIDn != nil { + qrRoleIDn = *o.RoleIDn + } + qRoleIDn := qrRoleIDn + if qRoleIDn != "" { + + if err := r.SetQueryParam("role_id__n", qRoleIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_list_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_list_responses.go new file mode 100644 index 000000000..6a6a06112 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_list_responses.go @@ -0,0 +1,247 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactAssignmentsListReader is a Reader for the TenancyContactAssignmentsList structure. +type TenancyContactAssignmentsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactAssignmentsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsListOK creates a TenancyContactAssignmentsListOK with default headers values +func NewTenancyContactAssignmentsListOK() *TenancyContactAssignmentsListOK { + return &TenancyContactAssignmentsListOK{} +} + +/* TenancyContactAssignmentsListOK describes a response with status code 200, with default header values. + +TenancyContactAssignmentsListOK tenancy contact assignments list o k +*/ +type TenancyContactAssignmentsListOK struct { + Payload *TenancyContactAssignmentsListOKBody +} + +func (o *TenancyContactAssignmentsListOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contact-assignments/][%d] tenancyContactAssignmentsListOK %+v", 200, o.Payload) +} +func (o *TenancyContactAssignmentsListOK) GetPayload() *TenancyContactAssignmentsListOKBody { + return o.Payload +} + +func (o *TenancyContactAssignmentsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(TenancyContactAssignmentsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*TenancyContactAssignmentsListOKBody tenancy contact assignments list o k body +swagger:model TenancyContactAssignmentsListOKBody +*/ +type TenancyContactAssignmentsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ContactAssignment `json:"results"` +} + +// Validate validates this tenancy contact assignments list o k body +func (o *TenancyContactAssignmentsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactAssignmentsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactAssignmentsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactAssignmentsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactAssignmentsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactAssignmentsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactAssignmentsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactAssignmentsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactAssignmentsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this tenancy contact assignments list o k body based on the context it is used +func (o *TenancyContactAssignmentsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactAssignmentsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactAssignmentsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *TenancyContactAssignmentsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *TenancyContactAssignmentsListOKBody) UnmarshalBinary(b []byte) error { + var res TenancyContactAssignmentsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_partial_update_parameters.go new file mode 100644 index 000000000..624d137c7 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactAssignmentsPartialUpdateParams creates a new TenancyContactAssignmentsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsPartialUpdateParams() *TenancyContactAssignmentsPartialUpdateParams { + return &TenancyContactAssignmentsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsPartialUpdateParamsWithTimeout creates a new TenancyContactAssignmentsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsPartialUpdateParams { + return &TenancyContactAssignmentsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsPartialUpdateParamsWithContext creates a new TenancyContactAssignmentsPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactAssignmentsPartialUpdateParams { + return &TenancyContactAssignmentsPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsPartialUpdateParamsWithHTTPClient creates a new TenancyContactAssignmentsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsPartialUpdateParams { + return &TenancyContactAssignmentsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsPartialUpdateParams struct { + + // Data. + Data *models.WritableContactAssignment + + /* ID. + + A unique integer value identifying this contact assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsPartialUpdateParams) WithDefaults() *TenancyContactAssignmentsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactAssignmentsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) WithData(data *models.WritableContactAssignment) *TenancyContactAssignmentsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) SetData(data *models.WritableContactAssignment) { + o.Data = data +} + +// WithID adds the id to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) WithID(id int64) *TenancyContactAssignmentsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact assignments partial update params +func (o *TenancyContactAssignmentsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contact_assignments_partial_update_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_partial_update_responses.go new file mode 100644 index 000000000..7679f3a55 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactAssignmentsPartialUpdateReader is a Reader for the TenancyContactAssignmentsPartialUpdate structure. +type TenancyContactAssignmentsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactAssignmentsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsPartialUpdateOK creates a TenancyContactAssignmentsPartialUpdateOK with default headers values +func NewTenancyContactAssignmentsPartialUpdateOK() *TenancyContactAssignmentsPartialUpdateOK { + return &TenancyContactAssignmentsPartialUpdateOK{} +} + +/* TenancyContactAssignmentsPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactAssignmentsPartialUpdateOK tenancy contact assignments partial update o k +*/ +type TenancyContactAssignmentsPartialUpdateOK struct { + Payload *models.ContactAssignment +} + +func (o *TenancyContactAssignmentsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contact-assignments/{id}/][%d] tenancyContactAssignmentsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactAssignmentsPartialUpdateOK) GetPayload() *models.ContactAssignment { + return o.Payload +} + +func (o *TenancyContactAssignmentsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_read_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_read_parameters.go new file mode 100644 index 000000000..be4d39d80 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_read_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactAssignmentsReadParams creates a new TenancyContactAssignmentsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsReadParams() *TenancyContactAssignmentsReadParams { + return &TenancyContactAssignmentsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsReadParamsWithTimeout creates a new TenancyContactAssignmentsReadParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsReadParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsReadParams { + return &TenancyContactAssignmentsReadParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsReadParamsWithContext creates a new TenancyContactAssignmentsReadParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsReadParamsWithContext(ctx context.Context) *TenancyContactAssignmentsReadParams { + return &TenancyContactAssignmentsReadParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsReadParamsWithHTTPClient creates a new TenancyContactAssignmentsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsReadParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsReadParams { + return &TenancyContactAssignmentsReadParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsReadParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments read operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsReadParams struct { + + /* ID. + + A unique integer value identifying this contact assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsReadParams) WithDefaults() *TenancyContactAssignmentsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) WithContext(ctx context.Context) *TenancyContactAssignmentsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) WithID(id int64) *TenancyContactAssignmentsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact assignments read params +func (o *TenancyContactAssignmentsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsReadParams) 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/netbox/client/tenancy/tenancy_contact_assignments_read_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_read_responses.go new file mode 100644 index 000000000..4b2995fc6 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_read_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactAssignmentsReadReader is a Reader for the TenancyContactAssignmentsRead structure. +type TenancyContactAssignmentsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactAssignmentsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsReadOK creates a TenancyContactAssignmentsReadOK with default headers values +func NewTenancyContactAssignmentsReadOK() *TenancyContactAssignmentsReadOK { + return &TenancyContactAssignmentsReadOK{} +} + +/* TenancyContactAssignmentsReadOK describes a response with status code 200, with default header values. + +TenancyContactAssignmentsReadOK tenancy contact assignments read o k +*/ +type TenancyContactAssignmentsReadOK struct { + Payload *models.ContactAssignment +} + +func (o *TenancyContactAssignmentsReadOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contact-assignments/{id}/][%d] tenancyContactAssignmentsReadOK %+v", 200, o.Payload) +} +func (o *TenancyContactAssignmentsReadOK) GetPayload() *models.ContactAssignment { + return o.Payload +} + +func (o *TenancyContactAssignmentsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_assignments_update_parameters.go b/netbox/client/tenancy/tenancy_contact_assignments_update_parameters.go new file mode 100644 index 000000000..e720baa62 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactAssignmentsUpdateParams creates a new TenancyContactAssignmentsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactAssignmentsUpdateParams() *TenancyContactAssignmentsUpdateParams { + return &TenancyContactAssignmentsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactAssignmentsUpdateParamsWithTimeout creates a new TenancyContactAssignmentsUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactAssignmentsUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactAssignmentsUpdateParams { + return &TenancyContactAssignmentsUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactAssignmentsUpdateParamsWithContext creates a new TenancyContactAssignmentsUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactAssignmentsUpdateParamsWithContext(ctx context.Context) *TenancyContactAssignmentsUpdateParams { + return &TenancyContactAssignmentsUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactAssignmentsUpdateParamsWithHTTPClient creates a new TenancyContactAssignmentsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactAssignmentsUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactAssignmentsUpdateParams { + return &TenancyContactAssignmentsUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactAssignmentsUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact assignments update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactAssignmentsUpdateParams struct { + + // Data. + Data *models.WritableContactAssignment + + /* ID. + + A unique integer value identifying this contact assignment. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact assignments update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsUpdateParams) WithDefaults() *TenancyContactAssignmentsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact assignments update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactAssignmentsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactAssignmentsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) WithContext(ctx context.Context) *TenancyContactAssignmentsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactAssignmentsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) WithData(data *models.WritableContactAssignment) *TenancyContactAssignmentsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) SetData(data *models.WritableContactAssignment) { + o.Data = data +} + +// WithID adds the id to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) WithID(id int64) *TenancyContactAssignmentsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact assignments update params +func (o *TenancyContactAssignmentsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactAssignmentsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contact_assignments_update_responses.go b/netbox/client/tenancy/tenancy_contact_assignments_update_responses.go new file mode 100644 index 000000000..a543f79b6 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_assignments_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactAssignmentsUpdateReader is a Reader for the TenancyContactAssignmentsUpdate structure. +type TenancyContactAssignmentsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactAssignmentsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactAssignmentsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactAssignmentsUpdateOK creates a TenancyContactAssignmentsUpdateOK with default headers values +func NewTenancyContactAssignmentsUpdateOK() *TenancyContactAssignmentsUpdateOK { + return &TenancyContactAssignmentsUpdateOK{} +} + +/* TenancyContactAssignmentsUpdateOK describes a response with status code 200, with default header values. + +TenancyContactAssignmentsUpdateOK tenancy contact assignments update o k +*/ +type TenancyContactAssignmentsUpdateOK struct { + Payload *models.ContactAssignment +} + +func (o *TenancyContactAssignmentsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contact-assignments/{id}/][%d] tenancyContactAssignmentsUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactAssignmentsUpdateOK) GetPayload() *models.ContactAssignment { + return o.Payload +} + +func (o *TenancyContactAssignmentsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactAssignment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_bulk_delete_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_bulk_delete_parameters.go new file mode 100644 index 000000000..1f1bd09c5 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactGroupsBulkDeleteParams creates a new TenancyContactGroupsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsBulkDeleteParams() *TenancyContactGroupsBulkDeleteParams { + return &TenancyContactGroupsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsBulkDeleteParamsWithTimeout creates a new TenancyContactGroupsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsBulkDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsBulkDeleteParams { + return &TenancyContactGroupsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsBulkDeleteParamsWithContext creates a new TenancyContactGroupsBulkDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsBulkDeleteParamsWithContext(ctx context.Context) *TenancyContactGroupsBulkDeleteParams { + return &TenancyContactGroupsBulkDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsBulkDeleteParamsWithHTTPClient creates a new TenancyContactGroupsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsBulkDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsBulkDeleteParams { + return &TenancyContactGroupsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsBulkDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contact groups bulk delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsBulkDeleteParams) WithDefaults() *TenancyContactGroupsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups bulk delete params +func (o *TenancyContactGroupsBulkDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups bulk delete params +func (o *TenancyContactGroupsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups bulk delete params +func (o *TenancyContactGroupsBulkDeleteParams) WithContext(ctx context.Context) *TenancyContactGroupsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups bulk delete params +func (o *TenancyContactGroupsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups bulk delete params +func (o *TenancyContactGroupsBulkDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups bulk delete params +func (o *TenancyContactGroupsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsBulkDeleteParams) 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/netbox/client/tenancy/tenancy_contact_groups_bulk_delete_responses.go b/netbox/client/tenancy/tenancy_contact_groups_bulk_delete_responses.go new file mode 100644 index 000000000..c8c7f27aa --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactGroupsBulkDeleteReader is a Reader for the TenancyContactGroupsBulkDelete structure. +type TenancyContactGroupsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactGroupsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsBulkDeleteNoContent creates a TenancyContactGroupsBulkDeleteNoContent with default headers values +func NewTenancyContactGroupsBulkDeleteNoContent() *TenancyContactGroupsBulkDeleteNoContent { + return &TenancyContactGroupsBulkDeleteNoContent{} +} + +/* TenancyContactGroupsBulkDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactGroupsBulkDeleteNoContent tenancy contact groups bulk delete no content +*/ +type TenancyContactGroupsBulkDeleteNoContent struct { +} + +func (o *TenancyContactGroupsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contact-groups/][%d] tenancyContactGroupsBulkDeleteNoContent ", 204) +} + +func (o *TenancyContactGroupsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_parameters.go new file mode 100644 index 000000000..30a83f84e --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactGroupsBulkPartialUpdateParams creates a new TenancyContactGroupsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsBulkPartialUpdateParams() *TenancyContactGroupsBulkPartialUpdateParams { + return &TenancyContactGroupsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsBulkPartialUpdateParamsWithTimeout creates a new TenancyContactGroupsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsBulkPartialUpdateParams { + return &TenancyContactGroupsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsBulkPartialUpdateParamsWithContext creates a new TenancyContactGroupsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsBulkPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactGroupsBulkPartialUpdateParams { + return &TenancyContactGroupsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsBulkPartialUpdateParamsWithHTTPClient creates a new TenancyContactGroupsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsBulkPartialUpdateParams { + return &TenancyContactGroupsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact groups bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableContactGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsBulkPartialUpdateParams) WithDefaults() *TenancyContactGroupsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactGroupsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) WithData(data *models.WritableContactGroup) *TenancyContactGroupsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact groups bulk partial update params +func (o *TenancyContactGroupsBulkPartialUpdateParams) SetData(data *models.WritableContactGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_responses.go b/netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_responses.go new file mode 100644 index 000000000..8c221e2f6 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsBulkPartialUpdateReader is a Reader for the TenancyContactGroupsBulkPartialUpdate structure. +type TenancyContactGroupsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactGroupsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsBulkPartialUpdateOK creates a TenancyContactGroupsBulkPartialUpdateOK with default headers values +func NewTenancyContactGroupsBulkPartialUpdateOK() *TenancyContactGroupsBulkPartialUpdateOK { + return &TenancyContactGroupsBulkPartialUpdateOK{} +} + +/* TenancyContactGroupsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactGroupsBulkPartialUpdateOK tenancy contact groups bulk partial update o k +*/ +type TenancyContactGroupsBulkPartialUpdateOK struct { + Payload *models.ContactGroup +} + +func (o *TenancyContactGroupsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contact-groups/][%d] tenancyContactGroupsBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactGroupsBulkPartialUpdateOK) GetPayload() *models.ContactGroup { + return o.Payload +} + +func (o *TenancyContactGroupsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_bulk_update_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_bulk_update_parameters.go new file mode 100644 index 000000000..a096fa0fe --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactGroupsBulkUpdateParams creates a new TenancyContactGroupsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsBulkUpdateParams() *TenancyContactGroupsBulkUpdateParams { + return &TenancyContactGroupsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsBulkUpdateParamsWithTimeout creates a new TenancyContactGroupsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsBulkUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsBulkUpdateParams { + return &TenancyContactGroupsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsBulkUpdateParamsWithContext creates a new TenancyContactGroupsBulkUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsBulkUpdateParamsWithContext(ctx context.Context) *TenancyContactGroupsBulkUpdateParams { + return &TenancyContactGroupsBulkUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsBulkUpdateParamsWithHTTPClient creates a new TenancyContactGroupsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsBulkUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsBulkUpdateParams { + return &TenancyContactGroupsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsBulkUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact groups bulk update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsBulkUpdateParams struct { + + // Data. + Data *models.WritableContactGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsBulkUpdateParams) WithDefaults() *TenancyContactGroupsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) WithContext(ctx context.Context) *TenancyContactGroupsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) WithData(data *models.WritableContactGroup) *TenancyContactGroupsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact groups bulk update params +func (o *TenancyContactGroupsBulkUpdateParams) SetData(data *models.WritableContactGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_bulk_update_responses.go b/netbox/client/tenancy/tenancy_contact_groups_bulk_update_responses.go new file mode 100644 index 000000000..4615f19b6 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsBulkUpdateReader is a Reader for the TenancyContactGroupsBulkUpdate structure. +type TenancyContactGroupsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactGroupsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsBulkUpdateOK creates a TenancyContactGroupsBulkUpdateOK with default headers values +func NewTenancyContactGroupsBulkUpdateOK() *TenancyContactGroupsBulkUpdateOK { + return &TenancyContactGroupsBulkUpdateOK{} +} + +/* TenancyContactGroupsBulkUpdateOK describes a response with status code 200, with default header values. + +TenancyContactGroupsBulkUpdateOK tenancy contact groups bulk update o k +*/ +type TenancyContactGroupsBulkUpdateOK struct { + Payload *models.ContactGroup +} + +func (o *TenancyContactGroupsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contact-groups/][%d] tenancyContactGroupsBulkUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactGroupsBulkUpdateOK) GetPayload() *models.ContactGroup { + return o.Payload +} + +func (o *TenancyContactGroupsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_create_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_create_parameters.go new file mode 100644 index 000000000..413e1a995 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_create_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactGroupsCreateParams creates a new TenancyContactGroupsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsCreateParams() *TenancyContactGroupsCreateParams { + return &TenancyContactGroupsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsCreateParamsWithTimeout creates a new TenancyContactGroupsCreateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsCreateParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsCreateParams { + return &TenancyContactGroupsCreateParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsCreateParamsWithContext creates a new TenancyContactGroupsCreateParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsCreateParamsWithContext(ctx context.Context) *TenancyContactGroupsCreateParams { + return &TenancyContactGroupsCreateParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsCreateParamsWithHTTPClient creates a new TenancyContactGroupsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsCreateParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsCreateParams { + return &TenancyContactGroupsCreateParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsCreateParams contains all the parameters to send to the API endpoint + for the tenancy contact groups create operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsCreateParams struct { + + // Data. + Data *models.WritableContactGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsCreateParams) WithDefaults() *TenancyContactGroupsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) WithContext(ctx context.Context) *TenancyContactGroupsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) WithData(data *models.WritableContactGroup) *TenancyContactGroupsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact groups create params +func (o *TenancyContactGroupsCreateParams) SetData(data *models.WritableContactGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_create_responses.go b/netbox/client/tenancy/tenancy_contact_groups_create_responses.go new file mode 100644 index 000000000..514df6e9e --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_create_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsCreateReader is a Reader for the TenancyContactGroupsCreate structure. +type TenancyContactGroupsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewTenancyContactGroupsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsCreateCreated creates a TenancyContactGroupsCreateCreated with default headers values +func NewTenancyContactGroupsCreateCreated() *TenancyContactGroupsCreateCreated { + return &TenancyContactGroupsCreateCreated{} +} + +/* TenancyContactGroupsCreateCreated describes a response with status code 201, with default header values. + +TenancyContactGroupsCreateCreated tenancy contact groups create created +*/ +type TenancyContactGroupsCreateCreated struct { + Payload *models.ContactGroup +} + +func (o *TenancyContactGroupsCreateCreated) Error() string { + return fmt.Sprintf("[POST /tenancy/contact-groups/][%d] tenancyContactGroupsCreateCreated %+v", 201, o.Payload) +} +func (o *TenancyContactGroupsCreateCreated) GetPayload() *models.ContactGroup { + return o.Payload +} + +func (o *TenancyContactGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_delete_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_delete_parameters.go new file mode 100644 index 000000000..a074584f3 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactGroupsDeleteParams creates a new TenancyContactGroupsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsDeleteParams() *TenancyContactGroupsDeleteParams { + return &TenancyContactGroupsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsDeleteParamsWithTimeout creates a new TenancyContactGroupsDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsDeleteParams { + return &TenancyContactGroupsDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsDeleteParamsWithContext creates a new TenancyContactGroupsDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsDeleteParamsWithContext(ctx context.Context) *TenancyContactGroupsDeleteParams { + return &TenancyContactGroupsDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsDeleteParamsWithHTTPClient creates a new TenancyContactGroupsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsDeleteParams { + return &TenancyContactGroupsDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contact groups delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsDeleteParams struct { + + /* ID. + + A unique integer value identifying this contact group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsDeleteParams) WithDefaults() *TenancyContactGroupsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) WithContext(ctx context.Context) *TenancyContactGroupsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) WithID(id int64) *TenancyContactGroupsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact groups delete params +func (o *TenancyContactGroupsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsDeleteParams) 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/netbox/client/tenancy/tenancy_contact_groups_delete_responses.go b/netbox/client/tenancy/tenancy_contact_groups_delete_responses.go new file mode 100644 index 000000000..d4f4263fb --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactGroupsDeleteReader is a Reader for the TenancyContactGroupsDelete structure. +type TenancyContactGroupsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactGroupsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsDeleteNoContent creates a TenancyContactGroupsDeleteNoContent with default headers values +func NewTenancyContactGroupsDeleteNoContent() *TenancyContactGroupsDeleteNoContent { + return &TenancyContactGroupsDeleteNoContent{} +} + +/* TenancyContactGroupsDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactGroupsDeleteNoContent tenancy contact groups delete no content +*/ +type TenancyContactGroupsDeleteNoContent struct { +} + +func (o *TenancyContactGroupsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contact-groups/{id}/][%d] tenancyContactGroupsDeleteNoContent ", 204) +} + +func (o *TenancyContactGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go new file mode 100644 index 000000000..bc7b8f69d --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_list_parameters.go @@ -0,0 +1,1730 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactGroupsListParams creates a new TenancyContactGroupsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsListParams() *TenancyContactGroupsListParams { + return &TenancyContactGroupsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsListParamsWithTimeout creates a new TenancyContactGroupsListParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsListParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsListParams { + return &TenancyContactGroupsListParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsListParamsWithContext creates a new TenancyContactGroupsListParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsListParamsWithContext(ctx context.Context) *TenancyContactGroupsListParams { + return &TenancyContactGroupsListParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsListParamsWithHTTPClient creates a new TenancyContactGroupsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsListParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsListParams { + return &TenancyContactGroupsListParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsListParams contains all the parameters to send to the API endpoint + for the tenancy contact groups list operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Parent. + Parent *string + + // Parentn. + Parentn *string + + // ParentID. + ParentID *string + + // ParentIDn. + ParentIDn *string + + // Q. + Q *string + + // Slug. + Slug *string + + // SlugIc. + SlugIc *string + + // SlugIe. + SlugIe *string + + // SlugIew. + SlugIew *string + + // SlugIsw. + SlugIsw *string + + // Slugn. + Slugn *string + + // SlugNic. + SlugNic *string + + // SlugNie. + SlugNie *string + + // SlugNiew. + SlugNiew *string + + // SlugNisw. + SlugNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsListParams) WithDefaults() *TenancyContactGroupsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithContext(ctx context.Context) *TenancyContactGroupsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithCreated(created *string) *TenancyContactGroupsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithCreatedGte(createdGte *string) *TenancyContactGroupsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithCreatedLte(createdLte *string) *TenancyContactGroupsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescription(description *string) *TenancyContactGroupsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionIc(descriptionIc *string) *TenancyContactGroupsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionIe(descriptionIe *string) *TenancyContactGroupsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionIew(descriptionIew *string) *TenancyContactGroupsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionIsw(descriptionIsw *string) *TenancyContactGroupsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionn(descriptionn *string) *TenancyContactGroupsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionNic(descriptionNic *string) *TenancyContactGroupsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionNie(descriptionNie *string) *TenancyContactGroupsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionNiew(descriptionNiew *string) *TenancyContactGroupsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithDescriptionNisw(descriptionNisw *string) *TenancyContactGroupsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithID adds the id to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithID(id *string) *TenancyContactGroupsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithIDGt(iDGt *string) *TenancyContactGroupsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithIDGte(iDGte *string) *TenancyContactGroupsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithIDLt(iDLt *string) *TenancyContactGroupsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithIDLte(iDLte *string) *TenancyContactGroupsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithIDn(iDn *string) *TenancyContactGroupsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLastUpdated(lastUpdated *string) *TenancyContactGroupsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactGroupsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactGroupsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithLimit(limit *int64) *TenancyContactGroupsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithName(name *string) *TenancyContactGroupsListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameIc(nameIc *string) *TenancyContactGroupsListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameIe(nameIe *string) *TenancyContactGroupsListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameIew(nameIew *string) *TenancyContactGroupsListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameIsw(nameIsw *string) *TenancyContactGroupsListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNamen(namen *string) *TenancyContactGroupsListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameNic(nameNic *string) *TenancyContactGroupsListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameNie(nameNie *string) *TenancyContactGroupsListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameNiew(nameNiew *string) *TenancyContactGroupsListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithNameNisw(nameNisw *string) *TenancyContactGroupsListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithOffset(offset *int64) *TenancyContactGroupsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithParent adds the parent to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithParent(parent *string) *TenancyContactGroupsListParams { + o.SetParent(parent) + return o +} + +// SetParent adds the parent to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetParent(parent *string) { + o.Parent = parent +} + +// WithParentn adds the parentn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithParentn(parentn *string) *TenancyContactGroupsListParams { + o.SetParentn(parentn) + return o +} + +// SetParentn adds the parentN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetParentn(parentn *string) { + o.Parentn = parentn +} + +// WithParentID adds the parentID to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithParentID(parentID *string) *TenancyContactGroupsListParams { + o.SetParentID(parentID) + return o +} + +// SetParentID adds the parentId to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetParentID(parentID *string) { + o.ParentID = parentID +} + +// WithParentIDn adds the parentIDn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithParentIDn(parentIDn *string) *TenancyContactGroupsListParams { + o.SetParentIDn(parentIDn) + return o +} + +// SetParentIDn adds the parentIdN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetParentIDn(parentIDn *string) { + o.ParentIDn = parentIDn +} + +// WithQ adds the q to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithQ(q *string) *TenancyContactGroupsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetQ(q *string) { + o.Q = q +} + +// WithSlug adds the slug to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlug(slug *string) *TenancyContactGroupsListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlug(slug *string) { + o.Slug = slug +} + +// WithSlugIc adds the slugIc to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugIc(slugIc *string) *TenancyContactGroupsListParams { + o.SetSlugIc(slugIc) + return o +} + +// SetSlugIc adds the slugIc to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugIc(slugIc *string) { + o.SlugIc = slugIc +} + +// WithSlugIe adds the slugIe to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugIe(slugIe *string) *TenancyContactGroupsListParams { + o.SetSlugIe(slugIe) + return o +} + +// SetSlugIe adds the slugIe to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugIe(slugIe *string) { + o.SlugIe = slugIe +} + +// WithSlugIew adds the slugIew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugIew(slugIew *string) *TenancyContactGroupsListParams { + o.SetSlugIew(slugIew) + return o +} + +// SetSlugIew adds the slugIew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugIew(slugIew *string) { + o.SlugIew = slugIew +} + +// WithSlugIsw adds the slugIsw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugIsw(slugIsw *string) *TenancyContactGroupsListParams { + o.SetSlugIsw(slugIsw) + return o +} + +// SetSlugIsw adds the slugIsw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugIsw(slugIsw *string) { + o.SlugIsw = slugIsw +} + +// WithSlugn adds the slugn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugn(slugn *string) *TenancyContactGroupsListParams { + o.SetSlugn(slugn) + return o +} + +// SetSlugn adds the slugN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugn(slugn *string) { + o.Slugn = slugn +} + +// WithSlugNic adds the slugNic to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugNic(slugNic *string) *TenancyContactGroupsListParams { + o.SetSlugNic(slugNic) + return o +} + +// SetSlugNic adds the slugNic to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugNic(slugNic *string) { + o.SlugNic = slugNic +} + +// WithSlugNie adds the slugNie to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugNie(slugNie *string) *TenancyContactGroupsListParams { + o.SetSlugNie(slugNie) + return o +} + +// SetSlugNie adds the slugNie to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugNie(slugNie *string) { + o.SlugNie = slugNie +} + +// WithSlugNiew adds the slugNiew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugNiew(slugNiew *string) *TenancyContactGroupsListParams { + o.SetSlugNiew(slugNiew) + return o +} + +// SetSlugNiew adds the slugNiew to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugNiew(slugNiew *string) { + o.SlugNiew = slugNiew +} + +// WithSlugNisw adds the slugNisw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithSlugNisw(slugNisw *string) *TenancyContactGroupsListParams { + o.SetSlugNisw(slugNisw) + return o +} + +// SetSlugNisw adds the slugNisw to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetSlugNisw(slugNisw *string) { + o.SlugNisw = slugNisw +} + +// WithTag adds the tag to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithTag(tag *string) *TenancyContactGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) WithTagn(tagn *string) *TenancyContactGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the tenancy contact groups list params +func (o *TenancyContactGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Parent != nil { + + // query param parent + var qrParent string + + if o.Parent != nil { + qrParent = *o.Parent + } + qParent := qrParent + if qParent != "" { + + if err := r.SetQueryParam("parent", qParent); err != nil { + return err + } + } + } + + if o.Parentn != nil { + + // query param parent__n + var qrParentn string + + if o.Parentn != nil { + qrParentn = *o.Parentn + } + qParentn := qrParentn + if qParentn != "" { + + if err := r.SetQueryParam("parent__n", qParentn); err != nil { + return err + } + } + } + + if o.ParentID != nil { + + // query param parent_id + var qrParentID string + + if o.ParentID != nil { + qrParentID = *o.ParentID + } + qParentID := qrParentID + if qParentID != "" { + + if err := r.SetQueryParam("parent_id", qParentID); err != nil { + return err + } + } + } + + if o.ParentIDn != nil { + + // query param parent_id__n + var qrParentIDn string + + if o.ParentIDn != nil { + qrParentIDn = *o.ParentIDn + } + qParentIDn := qrParentIDn + if qParentIDn != "" { + + if err := r.SetQueryParam("parent_id__n", qParentIDn); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Slug != nil { + + // query param slug + var qrSlug string + + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + } + + if o.SlugIc != nil { + + // query param slug__ic + var qrSlugIc string + + if o.SlugIc != nil { + qrSlugIc = *o.SlugIc + } + qSlugIc := qrSlugIc + if qSlugIc != "" { + + if err := r.SetQueryParam("slug__ic", qSlugIc); err != nil { + return err + } + } + } + + if o.SlugIe != nil { + + // query param slug__ie + var qrSlugIe string + + if o.SlugIe != nil { + qrSlugIe = *o.SlugIe + } + qSlugIe := qrSlugIe + if qSlugIe != "" { + + if err := r.SetQueryParam("slug__ie", qSlugIe); err != nil { + return err + } + } + } + + if o.SlugIew != nil { + + // query param slug__iew + var qrSlugIew string + + if o.SlugIew != nil { + qrSlugIew = *o.SlugIew + } + qSlugIew := qrSlugIew + if qSlugIew != "" { + + if err := r.SetQueryParam("slug__iew", qSlugIew); err != nil { + return err + } + } + } + + if o.SlugIsw != nil { + + // query param slug__isw + var qrSlugIsw string + + if o.SlugIsw != nil { + qrSlugIsw = *o.SlugIsw + } + qSlugIsw := qrSlugIsw + if qSlugIsw != "" { + + if err := r.SetQueryParam("slug__isw", qSlugIsw); err != nil { + return err + } + } + } + + if o.Slugn != nil { + + // query param slug__n + var qrSlugn string + + if o.Slugn != nil { + qrSlugn = *o.Slugn + } + qSlugn := qrSlugn + if qSlugn != "" { + + if err := r.SetQueryParam("slug__n", qSlugn); err != nil { + return err + } + } + } + + if o.SlugNic != nil { + + // query param slug__nic + var qrSlugNic string + + if o.SlugNic != nil { + qrSlugNic = *o.SlugNic + } + qSlugNic := qrSlugNic + if qSlugNic != "" { + + if err := r.SetQueryParam("slug__nic", qSlugNic); err != nil { + return err + } + } + } + + if o.SlugNie != nil { + + // query param slug__nie + var qrSlugNie string + + if o.SlugNie != nil { + qrSlugNie = *o.SlugNie + } + qSlugNie := qrSlugNie + if qSlugNie != "" { + + if err := r.SetQueryParam("slug__nie", qSlugNie); err != nil { + return err + } + } + } + + if o.SlugNiew != nil { + + // query param slug__niew + var qrSlugNiew string + + if o.SlugNiew != nil { + qrSlugNiew = *o.SlugNiew + } + qSlugNiew := qrSlugNiew + if qSlugNiew != "" { + + if err := r.SetQueryParam("slug__niew", qSlugNiew); err != nil { + return err + } + } + } + + if o.SlugNisw != nil { + + // query param slug__nisw + var qrSlugNisw string + + if o.SlugNisw != nil { + qrSlugNisw = *o.SlugNisw + } + qSlugNisw := qrSlugNisw + if qSlugNisw != "" { + + if err := r.SetQueryParam("slug__nisw", qSlugNisw); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_list_responses.go b/netbox/client/tenancy/tenancy_contact_groups_list_responses.go new file mode 100644 index 000000000..dc7665ed5 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_list_responses.go @@ -0,0 +1,247 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsListReader is a Reader for the TenancyContactGroupsList structure. +type TenancyContactGroupsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactGroupsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsListOK creates a TenancyContactGroupsListOK with default headers values +func NewTenancyContactGroupsListOK() *TenancyContactGroupsListOK { + return &TenancyContactGroupsListOK{} +} + +/* TenancyContactGroupsListOK describes a response with status code 200, with default header values. + +TenancyContactGroupsListOK tenancy contact groups list o k +*/ +type TenancyContactGroupsListOK struct { + Payload *TenancyContactGroupsListOKBody +} + +func (o *TenancyContactGroupsListOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contact-groups/][%d] tenancyContactGroupsListOK %+v", 200, o.Payload) +} +func (o *TenancyContactGroupsListOK) GetPayload() *TenancyContactGroupsListOKBody { + return o.Payload +} + +func (o *TenancyContactGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(TenancyContactGroupsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*TenancyContactGroupsListOKBody tenancy contact groups list o k body +swagger:model TenancyContactGroupsListOKBody +*/ +type TenancyContactGroupsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ContactGroup `json:"results"` +} + +// Validate validates this tenancy contact groups list o k body +func (o *TenancyContactGroupsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactGroupsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactGroupsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactGroupsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactGroupsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactGroupsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactGroupsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactGroupsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactGroupsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this tenancy contact groups list o k body based on the context it is used +func (o *TenancyContactGroupsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactGroupsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *TenancyContactGroupsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *TenancyContactGroupsListOKBody) UnmarshalBinary(b []byte) error { + var res TenancyContactGroupsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_partial_update_parameters.go new file mode 100644 index 000000000..41f555dc2 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactGroupsPartialUpdateParams creates a new TenancyContactGroupsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsPartialUpdateParams() *TenancyContactGroupsPartialUpdateParams { + return &TenancyContactGroupsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsPartialUpdateParamsWithTimeout creates a new TenancyContactGroupsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsPartialUpdateParams { + return &TenancyContactGroupsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsPartialUpdateParamsWithContext creates a new TenancyContactGroupsPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactGroupsPartialUpdateParams { + return &TenancyContactGroupsPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsPartialUpdateParamsWithHTTPClient creates a new TenancyContactGroupsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsPartialUpdateParams { + return &TenancyContactGroupsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact groups partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsPartialUpdateParams struct { + + // Data. + Data *models.WritableContactGroup + + /* ID. + + A unique integer value identifying this contact group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsPartialUpdateParams) WithDefaults() *TenancyContactGroupsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactGroupsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) WithData(data *models.WritableContactGroup) *TenancyContactGroupsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) SetData(data *models.WritableContactGroup) { + o.Data = data +} + +// WithID adds the id to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) WithID(id int64) *TenancyContactGroupsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact groups partial update params +func (o *TenancyContactGroupsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contact_groups_partial_update_responses.go b/netbox/client/tenancy/tenancy_contact_groups_partial_update_responses.go new file mode 100644 index 000000000..dba29aa17 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsPartialUpdateReader is a Reader for the TenancyContactGroupsPartialUpdate structure. +type TenancyContactGroupsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactGroupsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsPartialUpdateOK creates a TenancyContactGroupsPartialUpdateOK with default headers values +func NewTenancyContactGroupsPartialUpdateOK() *TenancyContactGroupsPartialUpdateOK { + return &TenancyContactGroupsPartialUpdateOK{} +} + +/* TenancyContactGroupsPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactGroupsPartialUpdateOK tenancy contact groups partial update o k +*/ +type TenancyContactGroupsPartialUpdateOK struct { + Payload *models.ContactGroup +} + +func (o *TenancyContactGroupsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contact-groups/{id}/][%d] tenancyContactGroupsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactGroupsPartialUpdateOK) GetPayload() *models.ContactGroup { + return o.Payload +} + +func (o *TenancyContactGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_read_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_read_parameters.go new file mode 100644 index 000000000..1ae7e42d2 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_read_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactGroupsReadParams creates a new TenancyContactGroupsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsReadParams() *TenancyContactGroupsReadParams { + return &TenancyContactGroupsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsReadParamsWithTimeout creates a new TenancyContactGroupsReadParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsReadParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsReadParams { + return &TenancyContactGroupsReadParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsReadParamsWithContext creates a new TenancyContactGroupsReadParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsReadParamsWithContext(ctx context.Context) *TenancyContactGroupsReadParams { + return &TenancyContactGroupsReadParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsReadParamsWithHTTPClient creates a new TenancyContactGroupsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsReadParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsReadParams { + return &TenancyContactGroupsReadParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsReadParams contains all the parameters to send to the API endpoint + for the tenancy contact groups read operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsReadParams struct { + + /* ID. + + A unique integer value identifying this contact group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsReadParams) WithDefaults() *TenancyContactGroupsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) WithContext(ctx context.Context) *TenancyContactGroupsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) WithID(id int64) *TenancyContactGroupsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact groups read params +func (o *TenancyContactGroupsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsReadParams) 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/netbox/client/tenancy/tenancy_contact_groups_read_responses.go b/netbox/client/tenancy/tenancy_contact_groups_read_responses.go new file mode 100644 index 000000000..245279c2b --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_read_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsReadReader is a Reader for the TenancyContactGroupsRead structure. +type TenancyContactGroupsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactGroupsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsReadOK creates a TenancyContactGroupsReadOK with default headers values +func NewTenancyContactGroupsReadOK() *TenancyContactGroupsReadOK { + return &TenancyContactGroupsReadOK{} +} + +/* TenancyContactGroupsReadOK describes a response with status code 200, with default header values. + +TenancyContactGroupsReadOK tenancy contact groups read o k +*/ +type TenancyContactGroupsReadOK struct { + Payload *models.ContactGroup +} + +func (o *TenancyContactGroupsReadOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contact-groups/{id}/][%d] tenancyContactGroupsReadOK %+v", 200, o.Payload) +} +func (o *TenancyContactGroupsReadOK) GetPayload() *models.ContactGroup { + return o.Payload +} + +func (o *TenancyContactGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_groups_update_parameters.go b/netbox/client/tenancy/tenancy_contact_groups_update_parameters.go new file mode 100644 index 000000000..76b633055 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactGroupsUpdateParams creates a new TenancyContactGroupsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactGroupsUpdateParams() *TenancyContactGroupsUpdateParams { + return &TenancyContactGroupsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactGroupsUpdateParamsWithTimeout creates a new TenancyContactGroupsUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactGroupsUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactGroupsUpdateParams { + return &TenancyContactGroupsUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactGroupsUpdateParamsWithContext creates a new TenancyContactGroupsUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactGroupsUpdateParamsWithContext(ctx context.Context) *TenancyContactGroupsUpdateParams { + return &TenancyContactGroupsUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactGroupsUpdateParamsWithHTTPClient creates a new TenancyContactGroupsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactGroupsUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactGroupsUpdateParams { + return &TenancyContactGroupsUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactGroupsUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact groups update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactGroupsUpdateParams struct { + + // Data. + Data *models.WritableContactGroup + + /* ID. + + A unique integer value identifying this contact group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact groups update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsUpdateParams) WithDefaults() *TenancyContactGroupsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact groups update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactGroupsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactGroupsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) WithContext(ctx context.Context) *TenancyContactGroupsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactGroupsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) WithData(data *models.WritableContactGroup) *TenancyContactGroupsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) SetData(data *models.WritableContactGroup) { + o.Data = data +} + +// WithID adds the id to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) WithID(id int64) *TenancyContactGroupsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact groups update params +func (o *TenancyContactGroupsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contact_groups_update_responses.go b/netbox/client/tenancy/tenancy_contact_groups_update_responses.go new file mode 100644 index 000000000..8e7c382f8 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_groups_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactGroupsUpdateReader is a Reader for the TenancyContactGroupsUpdate structure. +type TenancyContactGroupsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactGroupsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactGroupsUpdateOK creates a TenancyContactGroupsUpdateOK with default headers values +func NewTenancyContactGroupsUpdateOK() *TenancyContactGroupsUpdateOK { + return &TenancyContactGroupsUpdateOK{} +} + +/* TenancyContactGroupsUpdateOK describes a response with status code 200, with default header values. + +TenancyContactGroupsUpdateOK tenancy contact groups update o k +*/ +type TenancyContactGroupsUpdateOK struct { + Payload *models.ContactGroup +} + +func (o *TenancyContactGroupsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contact-groups/{id}/][%d] tenancyContactGroupsUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactGroupsUpdateOK) GetPayload() *models.ContactGroup { + return o.Payload +} + +func (o *TenancyContactGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_bulk_delete_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_bulk_delete_parameters.go new file mode 100644 index 000000000..aed9a6b56 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactRolesBulkDeleteParams creates a new TenancyContactRolesBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesBulkDeleteParams() *TenancyContactRolesBulkDeleteParams { + return &TenancyContactRolesBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesBulkDeleteParamsWithTimeout creates a new TenancyContactRolesBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesBulkDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactRolesBulkDeleteParams { + return &TenancyContactRolesBulkDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesBulkDeleteParamsWithContext creates a new TenancyContactRolesBulkDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesBulkDeleteParamsWithContext(ctx context.Context) *TenancyContactRolesBulkDeleteParams { + return &TenancyContactRolesBulkDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesBulkDeleteParamsWithHTTPClient creates a new TenancyContactRolesBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesBulkDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactRolesBulkDeleteParams { + return &TenancyContactRolesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesBulkDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contact roles bulk delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesBulkDeleteParams) WithDefaults() *TenancyContactRolesBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles bulk delete params +func (o *TenancyContactRolesBulkDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactRolesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles bulk delete params +func (o *TenancyContactRolesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles bulk delete params +func (o *TenancyContactRolesBulkDeleteParams) WithContext(ctx context.Context) *TenancyContactRolesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles bulk delete params +func (o *TenancyContactRolesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles bulk delete params +func (o *TenancyContactRolesBulkDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactRolesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles bulk delete params +func (o *TenancyContactRolesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesBulkDeleteParams) 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/netbox/client/tenancy/tenancy_contact_roles_bulk_delete_responses.go b/netbox/client/tenancy/tenancy_contact_roles_bulk_delete_responses.go new file mode 100644 index 000000000..72440f974 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactRolesBulkDeleteReader is a Reader for the TenancyContactRolesBulkDelete structure. +type TenancyContactRolesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactRolesBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesBulkDeleteNoContent creates a TenancyContactRolesBulkDeleteNoContent with default headers values +func NewTenancyContactRolesBulkDeleteNoContent() *TenancyContactRolesBulkDeleteNoContent { + return &TenancyContactRolesBulkDeleteNoContent{} +} + +/* TenancyContactRolesBulkDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactRolesBulkDeleteNoContent tenancy contact roles bulk delete no content +*/ +type TenancyContactRolesBulkDeleteNoContent struct { +} + +func (o *TenancyContactRolesBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contact-roles/][%d] tenancyContactRolesBulkDeleteNoContent ", 204) +} + +func (o *TenancyContactRolesBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_parameters.go new file mode 100644 index 000000000..5b2dc0036 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactRolesBulkPartialUpdateParams creates a new TenancyContactRolesBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesBulkPartialUpdateParams() *TenancyContactRolesBulkPartialUpdateParams { + return &TenancyContactRolesBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesBulkPartialUpdateParamsWithTimeout creates a new TenancyContactRolesBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactRolesBulkPartialUpdateParams { + return &TenancyContactRolesBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesBulkPartialUpdateParamsWithContext creates a new TenancyContactRolesBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesBulkPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactRolesBulkPartialUpdateParams { + return &TenancyContactRolesBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesBulkPartialUpdateParamsWithHTTPClient creates a new TenancyContactRolesBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactRolesBulkPartialUpdateParams { + return &TenancyContactRolesBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact roles bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesBulkPartialUpdateParams struct { + + // Data. + Data *models.ContactRole + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesBulkPartialUpdateParams) WithDefaults() *TenancyContactRolesBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactRolesBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactRolesBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactRolesBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) WithData(data *models.ContactRole) *TenancyContactRolesBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact roles bulk partial update params +func (o *TenancyContactRolesBulkPartialUpdateParams) SetData(data *models.ContactRole) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_responses.go b/netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_responses.go new file mode 100644 index 000000000..f2cc2ab59 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesBulkPartialUpdateReader is a Reader for the TenancyContactRolesBulkPartialUpdate structure. +type TenancyContactRolesBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactRolesBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesBulkPartialUpdateOK creates a TenancyContactRolesBulkPartialUpdateOK with default headers values +func NewTenancyContactRolesBulkPartialUpdateOK() *TenancyContactRolesBulkPartialUpdateOK { + return &TenancyContactRolesBulkPartialUpdateOK{} +} + +/* TenancyContactRolesBulkPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactRolesBulkPartialUpdateOK tenancy contact roles bulk partial update o k +*/ +type TenancyContactRolesBulkPartialUpdateOK struct { + Payload *models.ContactRole +} + +func (o *TenancyContactRolesBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contact-roles/][%d] tenancyContactRolesBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactRolesBulkPartialUpdateOK) GetPayload() *models.ContactRole { + return o.Payload +} + +func (o *TenancyContactRolesBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_bulk_update_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_bulk_update_parameters.go new file mode 100644 index 000000000..6b6d4b86a --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactRolesBulkUpdateParams creates a new TenancyContactRolesBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesBulkUpdateParams() *TenancyContactRolesBulkUpdateParams { + return &TenancyContactRolesBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesBulkUpdateParamsWithTimeout creates a new TenancyContactRolesBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesBulkUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactRolesBulkUpdateParams { + return &TenancyContactRolesBulkUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesBulkUpdateParamsWithContext creates a new TenancyContactRolesBulkUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesBulkUpdateParamsWithContext(ctx context.Context) *TenancyContactRolesBulkUpdateParams { + return &TenancyContactRolesBulkUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesBulkUpdateParamsWithHTTPClient creates a new TenancyContactRolesBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesBulkUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactRolesBulkUpdateParams { + return &TenancyContactRolesBulkUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesBulkUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact roles bulk update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesBulkUpdateParams struct { + + // Data. + Data *models.ContactRole + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesBulkUpdateParams) WithDefaults() *TenancyContactRolesBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactRolesBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) WithContext(ctx context.Context) *TenancyContactRolesBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactRolesBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) WithData(data *models.ContactRole) *TenancyContactRolesBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact roles bulk update params +func (o *TenancyContactRolesBulkUpdateParams) SetData(data *models.ContactRole) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_bulk_update_responses.go b/netbox/client/tenancy/tenancy_contact_roles_bulk_update_responses.go new file mode 100644 index 000000000..47752de67 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesBulkUpdateReader is a Reader for the TenancyContactRolesBulkUpdate structure. +type TenancyContactRolesBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactRolesBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesBulkUpdateOK creates a TenancyContactRolesBulkUpdateOK with default headers values +func NewTenancyContactRolesBulkUpdateOK() *TenancyContactRolesBulkUpdateOK { + return &TenancyContactRolesBulkUpdateOK{} +} + +/* TenancyContactRolesBulkUpdateOK describes a response with status code 200, with default header values. + +TenancyContactRolesBulkUpdateOK tenancy contact roles bulk update o k +*/ +type TenancyContactRolesBulkUpdateOK struct { + Payload *models.ContactRole +} + +func (o *TenancyContactRolesBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contact-roles/][%d] tenancyContactRolesBulkUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactRolesBulkUpdateOK) GetPayload() *models.ContactRole { + return o.Payload +} + +func (o *TenancyContactRolesBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_create_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_create_parameters.go new file mode 100644 index 000000000..6884d0685 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_create_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactRolesCreateParams creates a new TenancyContactRolesCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesCreateParams() *TenancyContactRolesCreateParams { + return &TenancyContactRolesCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesCreateParamsWithTimeout creates a new TenancyContactRolesCreateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesCreateParamsWithTimeout(timeout time.Duration) *TenancyContactRolesCreateParams { + return &TenancyContactRolesCreateParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesCreateParamsWithContext creates a new TenancyContactRolesCreateParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesCreateParamsWithContext(ctx context.Context) *TenancyContactRolesCreateParams { + return &TenancyContactRolesCreateParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesCreateParamsWithHTTPClient creates a new TenancyContactRolesCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesCreateParamsWithHTTPClient(client *http.Client) *TenancyContactRolesCreateParams { + return &TenancyContactRolesCreateParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesCreateParams contains all the parameters to send to the API endpoint + for the tenancy contact roles create operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesCreateParams struct { + + // Data. + Data *models.ContactRole + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesCreateParams) WithDefaults() *TenancyContactRolesCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) WithTimeout(timeout time.Duration) *TenancyContactRolesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) WithContext(ctx context.Context) *TenancyContactRolesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) WithHTTPClient(client *http.Client) *TenancyContactRolesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) WithData(data *models.ContactRole) *TenancyContactRolesCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact roles create params +func (o *TenancyContactRolesCreateParams) SetData(data *models.ContactRole) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_create_responses.go b/netbox/client/tenancy/tenancy_contact_roles_create_responses.go new file mode 100644 index 000000000..d50d1f90a --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_create_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesCreateReader is a Reader for the TenancyContactRolesCreate structure. +type TenancyContactRolesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewTenancyContactRolesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesCreateCreated creates a TenancyContactRolesCreateCreated with default headers values +func NewTenancyContactRolesCreateCreated() *TenancyContactRolesCreateCreated { + return &TenancyContactRolesCreateCreated{} +} + +/* TenancyContactRolesCreateCreated describes a response with status code 201, with default header values. + +TenancyContactRolesCreateCreated tenancy contact roles create created +*/ +type TenancyContactRolesCreateCreated struct { + Payload *models.ContactRole +} + +func (o *TenancyContactRolesCreateCreated) Error() string { + return fmt.Sprintf("[POST /tenancy/contact-roles/][%d] tenancyContactRolesCreateCreated %+v", 201, o.Payload) +} +func (o *TenancyContactRolesCreateCreated) GetPayload() *models.ContactRole { + return o.Payload +} + +func (o *TenancyContactRolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_delete_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_delete_parameters.go new file mode 100644 index 000000000..dc1107dc2 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactRolesDeleteParams creates a new TenancyContactRolesDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesDeleteParams() *TenancyContactRolesDeleteParams { + return &TenancyContactRolesDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesDeleteParamsWithTimeout creates a new TenancyContactRolesDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactRolesDeleteParams { + return &TenancyContactRolesDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesDeleteParamsWithContext creates a new TenancyContactRolesDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesDeleteParamsWithContext(ctx context.Context) *TenancyContactRolesDeleteParams { + return &TenancyContactRolesDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesDeleteParamsWithHTTPClient creates a new TenancyContactRolesDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactRolesDeleteParams { + return &TenancyContactRolesDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contact roles delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesDeleteParams struct { + + /* ID. + + A unique integer value identifying this contact role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesDeleteParams) WithDefaults() *TenancyContactRolesDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactRolesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) WithContext(ctx context.Context) *TenancyContactRolesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactRolesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) WithID(id int64) *TenancyContactRolesDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact roles delete params +func (o *TenancyContactRolesDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesDeleteParams) 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/netbox/client/tenancy/tenancy_contact_roles_delete_responses.go b/netbox/client/tenancy/tenancy_contact_roles_delete_responses.go new file mode 100644 index 000000000..f81af036c --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactRolesDeleteReader is a Reader for the TenancyContactRolesDelete structure. +type TenancyContactRolesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactRolesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesDeleteNoContent creates a TenancyContactRolesDeleteNoContent with default headers values +func NewTenancyContactRolesDeleteNoContent() *TenancyContactRolesDeleteNoContent { + return &TenancyContactRolesDeleteNoContent{} +} + +/* TenancyContactRolesDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactRolesDeleteNoContent tenancy contact roles delete no content +*/ +type TenancyContactRolesDeleteNoContent struct { +} + +func (o *TenancyContactRolesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contact-roles/{id}/][%d] tenancyContactRolesDeleteNoContent ", 204) +} + +func (o *TenancyContactRolesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go new file mode 100644 index 000000000..b2e6550af --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_list_parameters.go @@ -0,0 +1,1606 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactRolesListParams creates a new TenancyContactRolesListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesListParams() *TenancyContactRolesListParams { + return &TenancyContactRolesListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesListParamsWithTimeout creates a new TenancyContactRolesListParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesListParamsWithTimeout(timeout time.Duration) *TenancyContactRolesListParams { + return &TenancyContactRolesListParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesListParamsWithContext creates a new TenancyContactRolesListParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesListParamsWithContext(ctx context.Context) *TenancyContactRolesListParams { + return &TenancyContactRolesListParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesListParamsWithHTTPClient creates a new TenancyContactRolesListParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesListParamsWithHTTPClient(client *http.Client) *TenancyContactRolesListParams { + return &TenancyContactRolesListParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesListParams contains all the parameters to send to the API endpoint + for the tenancy contact roles list operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Slug. + Slug *string + + // SlugIc. + SlugIc *string + + // SlugIe. + SlugIe *string + + // SlugIew. + SlugIew *string + + // SlugIsw. + SlugIsw *string + + // Slugn. + Slugn *string + + // SlugNic. + SlugNic *string + + // SlugNie. + SlugNie *string + + // SlugNiew. + SlugNiew *string + + // SlugNisw. + SlugNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesListParams) WithDefaults() *TenancyContactRolesListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithTimeout(timeout time.Duration) *TenancyContactRolesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithContext(ctx context.Context) *TenancyContactRolesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithHTTPClient(client *http.Client) *TenancyContactRolesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithCreated(created *string) *TenancyContactRolesListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithCreatedGte(createdGte *string) *TenancyContactRolesListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithCreatedLte(createdLte *string) *TenancyContactRolesListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescription(description *string) *TenancyContactRolesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionIc(descriptionIc *string) *TenancyContactRolesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionIe(descriptionIe *string) *TenancyContactRolesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionIew(descriptionIew *string) *TenancyContactRolesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionIsw(descriptionIsw *string) *TenancyContactRolesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionn(descriptionn *string) *TenancyContactRolesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionNic(descriptionNic *string) *TenancyContactRolesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionNie(descriptionNie *string) *TenancyContactRolesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionNiew(descriptionNiew *string) *TenancyContactRolesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithDescriptionNisw(descriptionNisw *string) *TenancyContactRolesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithID adds the id to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithID(id *string) *TenancyContactRolesListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithIDGt(iDGt *string) *TenancyContactRolesListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithIDGte(iDGte *string) *TenancyContactRolesListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithIDLt(iDLt *string) *TenancyContactRolesListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithIDLte(iDLte *string) *TenancyContactRolesListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithIDn(iDn *string) *TenancyContactRolesListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLastUpdated(lastUpdated *string) *TenancyContactRolesListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactRolesListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactRolesListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithLimit(limit *int64) *TenancyContactRolesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithName(name *string) *TenancyContactRolesListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameIc(nameIc *string) *TenancyContactRolesListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameIe(nameIe *string) *TenancyContactRolesListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameIew(nameIew *string) *TenancyContactRolesListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameIsw(nameIsw *string) *TenancyContactRolesListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNamen(namen *string) *TenancyContactRolesListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameNic(nameNic *string) *TenancyContactRolesListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameNie(nameNie *string) *TenancyContactRolesListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameNiew(nameNiew *string) *TenancyContactRolesListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithNameNisw(nameNisw *string) *TenancyContactRolesListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithOffset(offset *int64) *TenancyContactRolesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithQ(q *string) *TenancyContactRolesListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetQ(q *string) { + o.Q = q +} + +// WithSlug adds the slug to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlug(slug *string) *TenancyContactRolesListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlug(slug *string) { + o.Slug = slug +} + +// WithSlugIc adds the slugIc to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugIc(slugIc *string) *TenancyContactRolesListParams { + o.SetSlugIc(slugIc) + return o +} + +// SetSlugIc adds the slugIc to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugIc(slugIc *string) { + o.SlugIc = slugIc +} + +// WithSlugIe adds the slugIe to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugIe(slugIe *string) *TenancyContactRolesListParams { + o.SetSlugIe(slugIe) + return o +} + +// SetSlugIe adds the slugIe to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugIe(slugIe *string) { + o.SlugIe = slugIe +} + +// WithSlugIew adds the slugIew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugIew(slugIew *string) *TenancyContactRolesListParams { + o.SetSlugIew(slugIew) + return o +} + +// SetSlugIew adds the slugIew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugIew(slugIew *string) { + o.SlugIew = slugIew +} + +// WithSlugIsw adds the slugIsw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugIsw(slugIsw *string) *TenancyContactRolesListParams { + o.SetSlugIsw(slugIsw) + return o +} + +// SetSlugIsw adds the slugIsw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugIsw(slugIsw *string) { + o.SlugIsw = slugIsw +} + +// WithSlugn adds the slugn to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugn(slugn *string) *TenancyContactRolesListParams { + o.SetSlugn(slugn) + return o +} + +// SetSlugn adds the slugN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugn(slugn *string) { + o.Slugn = slugn +} + +// WithSlugNic adds the slugNic to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugNic(slugNic *string) *TenancyContactRolesListParams { + o.SetSlugNic(slugNic) + return o +} + +// SetSlugNic adds the slugNic to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugNic(slugNic *string) { + o.SlugNic = slugNic +} + +// WithSlugNie adds the slugNie to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugNie(slugNie *string) *TenancyContactRolesListParams { + o.SetSlugNie(slugNie) + return o +} + +// SetSlugNie adds the slugNie to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugNie(slugNie *string) { + o.SlugNie = slugNie +} + +// WithSlugNiew adds the slugNiew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugNiew(slugNiew *string) *TenancyContactRolesListParams { + o.SetSlugNiew(slugNiew) + return o +} + +// SetSlugNiew adds the slugNiew to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugNiew(slugNiew *string) { + o.SlugNiew = slugNiew +} + +// WithSlugNisw adds the slugNisw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithSlugNisw(slugNisw *string) *TenancyContactRolesListParams { + o.SetSlugNisw(slugNisw) + return o +} + +// SetSlugNisw adds the slugNisw to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetSlugNisw(slugNisw *string) { + o.SlugNisw = slugNisw +} + +// WithTag adds the tag to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithTag(tag *string) *TenancyContactRolesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) WithTagn(tagn *string) *TenancyContactRolesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the tenancy contact roles list params +func (o *TenancyContactRolesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Slug != nil { + + // query param slug + var qrSlug string + + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + } + + if o.SlugIc != nil { + + // query param slug__ic + var qrSlugIc string + + if o.SlugIc != nil { + qrSlugIc = *o.SlugIc + } + qSlugIc := qrSlugIc + if qSlugIc != "" { + + if err := r.SetQueryParam("slug__ic", qSlugIc); err != nil { + return err + } + } + } + + if o.SlugIe != nil { + + // query param slug__ie + var qrSlugIe string + + if o.SlugIe != nil { + qrSlugIe = *o.SlugIe + } + qSlugIe := qrSlugIe + if qSlugIe != "" { + + if err := r.SetQueryParam("slug__ie", qSlugIe); err != nil { + return err + } + } + } + + if o.SlugIew != nil { + + // query param slug__iew + var qrSlugIew string + + if o.SlugIew != nil { + qrSlugIew = *o.SlugIew + } + qSlugIew := qrSlugIew + if qSlugIew != "" { + + if err := r.SetQueryParam("slug__iew", qSlugIew); err != nil { + return err + } + } + } + + if o.SlugIsw != nil { + + // query param slug__isw + var qrSlugIsw string + + if o.SlugIsw != nil { + qrSlugIsw = *o.SlugIsw + } + qSlugIsw := qrSlugIsw + if qSlugIsw != "" { + + if err := r.SetQueryParam("slug__isw", qSlugIsw); err != nil { + return err + } + } + } + + if o.Slugn != nil { + + // query param slug__n + var qrSlugn string + + if o.Slugn != nil { + qrSlugn = *o.Slugn + } + qSlugn := qrSlugn + if qSlugn != "" { + + if err := r.SetQueryParam("slug__n", qSlugn); err != nil { + return err + } + } + } + + if o.SlugNic != nil { + + // query param slug__nic + var qrSlugNic string + + if o.SlugNic != nil { + qrSlugNic = *o.SlugNic + } + qSlugNic := qrSlugNic + if qSlugNic != "" { + + if err := r.SetQueryParam("slug__nic", qSlugNic); err != nil { + return err + } + } + } + + if o.SlugNie != nil { + + // query param slug__nie + var qrSlugNie string + + if o.SlugNie != nil { + qrSlugNie = *o.SlugNie + } + qSlugNie := qrSlugNie + if qSlugNie != "" { + + if err := r.SetQueryParam("slug__nie", qSlugNie); err != nil { + return err + } + } + } + + if o.SlugNiew != nil { + + // query param slug__niew + var qrSlugNiew string + + if o.SlugNiew != nil { + qrSlugNiew = *o.SlugNiew + } + qSlugNiew := qrSlugNiew + if qSlugNiew != "" { + + if err := r.SetQueryParam("slug__niew", qSlugNiew); err != nil { + return err + } + } + } + + if o.SlugNisw != nil { + + // query param slug__nisw + var qrSlugNisw string + + if o.SlugNisw != nil { + qrSlugNisw = *o.SlugNisw + } + qSlugNisw := qrSlugNisw + if qSlugNisw != "" { + + if err := r.SetQueryParam("slug__nisw", qSlugNisw); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_list_responses.go b/netbox/client/tenancy/tenancy_contact_roles_list_responses.go new file mode 100644 index 000000000..42b4f873f --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_list_responses.go @@ -0,0 +1,247 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesListReader is a Reader for the TenancyContactRolesList structure. +type TenancyContactRolesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactRolesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesListOK creates a TenancyContactRolesListOK with default headers values +func NewTenancyContactRolesListOK() *TenancyContactRolesListOK { + return &TenancyContactRolesListOK{} +} + +/* TenancyContactRolesListOK describes a response with status code 200, with default header values. + +TenancyContactRolesListOK tenancy contact roles list o k +*/ +type TenancyContactRolesListOK struct { + Payload *TenancyContactRolesListOKBody +} + +func (o *TenancyContactRolesListOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contact-roles/][%d] tenancyContactRolesListOK %+v", 200, o.Payload) +} +func (o *TenancyContactRolesListOK) GetPayload() *TenancyContactRolesListOKBody { + return o.Payload +} + +func (o *TenancyContactRolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(TenancyContactRolesListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*TenancyContactRolesListOKBody tenancy contact roles list o k body +swagger:model TenancyContactRolesListOKBody +*/ +type TenancyContactRolesListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.ContactRole `json:"results"` +} + +// Validate validates this tenancy contact roles list o k body +func (o *TenancyContactRolesListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactRolesListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactRolesListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactRolesListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactRolesListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactRolesListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactRolesListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactRolesListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactRolesListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this tenancy contact roles list o k body based on the context it is used +func (o *TenancyContactRolesListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactRolesListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactRolesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *TenancyContactRolesListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *TenancyContactRolesListOKBody) UnmarshalBinary(b []byte) error { + var res TenancyContactRolesListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_partial_update_parameters.go new file mode 100644 index 000000000..3c83f80a2 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactRolesPartialUpdateParams creates a new TenancyContactRolesPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesPartialUpdateParams() *TenancyContactRolesPartialUpdateParams { + return &TenancyContactRolesPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesPartialUpdateParamsWithTimeout creates a new TenancyContactRolesPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactRolesPartialUpdateParams { + return &TenancyContactRolesPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesPartialUpdateParamsWithContext creates a new TenancyContactRolesPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactRolesPartialUpdateParams { + return &TenancyContactRolesPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesPartialUpdateParamsWithHTTPClient creates a new TenancyContactRolesPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactRolesPartialUpdateParams { + return &TenancyContactRolesPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact roles partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesPartialUpdateParams struct { + + // Data. + Data *models.ContactRole + + /* ID. + + A unique integer value identifying this contact role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesPartialUpdateParams) WithDefaults() *TenancyContactRolesPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactRolesPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactRolesPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactRolesPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) WithData(data *models.ContactRole) *TenancyContactRolesPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) SetData(data *models.ContactRole) { + o.Data = data +} + +// WithID adds the id to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) WithID(id int64) *TenancyContactRolesPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact roles partial update params +func (o *TenancyContactRolesPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contact_roles_partial_update_responses.go b/netbox/client/tenancy/tenancy_contact_roles_partial_update_responses.go new file mode 100644 index 000000000..7a52aed4c --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesPartialUpdateReader is a Reader for the TenancyContactRolesPartialUpdate structure. +type TenancyContactRolesPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactRolesPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesPartialUpdateOK creates a TenancyContactRolesPartialUpdateOK with default headers values +func NewTenancyContactRolesPartialUpdateOK() *TenancyContactRolesPartialUpdateOK { + return &TenancyContactRolesPartialUpdateOK{} +} + +/* TenancyContactRolesPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactRolesPartialUpdateOK tenancy contact roles partial update o k +*/ +type TenancyContactRolesPartialUpdateOK struct { + Payload *models.ContactRole +} + +func (o *TenancyContactRolesPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contact-roles/{id}/][%d] tenancyContactRolesPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactRolesPartialUpdateOK) GetPayload() *models.ContactRole { + return o.Payload +} + +func (o *TenancyContactRolesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_read_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_read_parameters.go new file mode 100644 index 000000000..45f7bcf80 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_read_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactRolesReadParams creates a new TenancyContactRolesReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesReadParams() *TenancyContactRolesReadParams { + return &TenancyContactRolesReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesReadParamsWithTimeout creates a new TenancyContactRolesReadParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesReadParamsWithTimeout(timeout time.Duration) *TenancyContactRolesReadParams { + return &TenancyContactRolesReadParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesReadParamsWithContext creates a new TenancyContactRolesReadParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesReadParamsWithContext(ctx context.Context) *TenancyContactRolesReadParams { + return &TenancyContactRolesReadParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesReadParamsWithHTTPClient creates a new TenancyContactRolesReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesReadParamsWithHTTPClient(client *http.Client) *TenancyContactRolesReadParams { + return &TenancyContactRolesReadParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesReadParams contains all the parameters to send to the API endpoint + for the tenancy contact roles read operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesReadParams struct { + + /* ID. + + A unique integer value identifying this contact role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesReadParams) WithDefaults() *TenancyContactRolesReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) WithTimeout(timeout time.Duration) *TenancyContactRolesReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) WithContext(ctx context.Context) *TenancyContactRolesReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) WithHTTPClient(client *http.Client) *TenancyContactRolesReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) WithID(id int64) *TenancyContactRolesReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact roles read params +func (o *TenancyContactRolesReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesReadParams) 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/netbox/client/tenancy/tenancy_contact_roles_read_responses.go b/netbox/client/tenancy/tenancy_contact_roles_read_responses.go new file mode 100644 index 000000000..c7ad4d10d --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_read_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesReadReader is a Reader for the TenancyContactRolesRead structure. +type TenancyContactRolesReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactRolesReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesReadOK creates a TenancyContactRolesReadOK with default headers values +func NewTenancyContactRolesReadOK() *TenancyContactRolesReadOK { + return &TenancyContactRolesReadOK{} +} + +/* TenancyContactRolesReadOK describes a response with status code 200, with default header values. + +TenancyContactRolesReadOK tenancy contact roles read o k +*/ +type TenancyContactRolesReadOK struct { + Payload *models.ContactRole +} + +func (o *TenancyContactRolesReadOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contact-roles/{id}/][%d] tenancyContactRolesReadOK %+v", 200, o.Payload) +} +func (o *TenancyContactRolesReadOK) GetPayload() *models.ContactRole { + return o.Payload +} + +func (o *TenancyContactRolesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contact_roles_update_parameters.go b/netbox/client/tenancy/tenancy_contact_roles_update_parameters.go new file mode 100644 index 000000000..582f4915a --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactRolesUpdateParams creates a new TenancyContactRolesUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactRolesUpdateParams() *TenancyContactRolesUpdateParams { + return &TenancyContactRolesUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactRolesUpdateParamsWithTimeout creates a new TenancyContactRolesUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactRolesUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactRolesUpdateParams { + return &TenancyContactRolesUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactRolesUpdateParamsWithContext creates a new TenancyContactRolesUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactRolesUpdateParamsWithContext(ctx context.Context) *TenancyContactRolesUpdateParams { + return &TenancyContactRolesUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactRolesUpdateParamsWithHTTPClient creates a new TenancyContactRolesUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactRolesUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactRolesUpdateParams { + return &TenancyContactRolesUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactRolesUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contact roles update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactRolesUpdateParams struct { + + // Data. + Data *models.ContactRole + + /* ID. + + A unique integer value identifying this contact role. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contact roles update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesUpdateParams) WithDefaults() *TenancyContactRolesUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contact roles update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactRolesUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactRolesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) WithContext(ctx context.Context) *TenancyContactRolesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactRolesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) WithData(data *models.ContactRole) *TenancyContactRolesUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) SetData(data *models.ContactRole) { + o.Data = data +} + +// WithID adds the id to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) WithID(id int64) *TenancyContactRolesUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contact roles update params +func (o *TenancyContactRolesUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contact_roles_update_responses.go b/netbox/client/tenancy/tenancy_contact_roles_update_responses.go new file mode 100644 index 000000000..d93a9be86 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contact_roles_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactRolesUpdateReader is a Reader for the TenancyContactRolesUpdate structure. +type TenancyContactRolesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactRolesUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactRolesUpdateOK creates a TenancyContactRolesUpdateOK with default headers values +func NewTenancyContactRolesUpdateOK() *TenancyContactRolesUpdateOK { + return &TenancyContactRolesUpdateOK{} +} + +/* TenancyContactRolesUpdateOK describes a response with status code 200, with default header values. + +TenancyContactRolesUpdateOK tenancy contact roles update o k +*/ +type TenancyContactRolesUpdateOK struct { + Payload *models.ContactRole +} + +func (o *TenancyContactRolesUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contact-roles/{id}/][%d] tenancyContactRolesUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactRolesUpdateOK) GetPayload() *models.ContactRole { + return o.Payload +} + +func (o *TenancyContactRolesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ContactRole) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_bulk_delete_parameters.go b/netbox/client/tenancy/tenancy_contacts_bulk_delete_parameters.go new file mode 100644 index 000000000..b6b989f8d --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactsBulkDeleteParams creates a new TenancyContactsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsBulkDeleteParams() *TenancyContactsBulkDeleteParams { + return &TenancyContactsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsBulkDeleteParamsWithTimeout creates a new TenancyContactsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsBulkDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactsBulkDeleteParams { + return &TenancyContactsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactsBulkDeleteParamsWithContext creates a new TenancyContactsBulkDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactsBulkDeleteParamsWithContext(ctx context.Context) *TenancyContactsBulkDeleteParams { + return &TenancyContactsBulkDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactsBulkDeleteParamsWithHTTPClient creates a new TenancyContactsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsBulkDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactsBulkDeleteParams { + return &TenancyContactsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactsBulkDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contacts bulk delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsBulkDeleteParams) WithDefaults() *TenancyContactsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts bulk delete params +func (o *TenancyContactsBulkDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts bulk delete params +func (o *TenancyContactsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts bulk delete params +func (o *TenancyContactsBulkDeleteParams) WithContext(ctx context.Context) *TenancyContactsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts bulk delete params +func (o *TenancyContactsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts bulk delete params +func (o *TenancyContactsBulkDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts bulk delete params +func (o *TenancyContactsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsBulkDeleteParams) 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/netbox/client/tenancy/tenancy_contacts_bulk_delete_responses.go b/netbox/client/tenancy/tenancy_contacts_bulk_delete_responses.go new file mode 100644 index 000000000..7860a6ee4 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactsBulkDeleteReader is a Reader for the TenancyContactsBulkDelete structure. +type TenancyContactsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsBulkDeleteNoContent creates a TenancyContactsBulkDeleteNoContent with default headers values +func NewTenancyContactsBulkDeleteNoContent() *TenancyContactsBulkDeleteNoContent { + return &TenancyContactsBulkDeleteNoContent{} +} + +/* TenancyContactsBulkDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactsBulkDeleteNoContent tenancy contacts bulk delete no content +*/ +type TenancyContactsBulkDeleteNoContent struct { +} + +func (o *TenancyContactsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contacts/][%d] tenancyContactsBulkDeleteNoContent ", 204) +} + +func (o *TenancyContactsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_bulk_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contacts_bulk_partial_update_parameters.go new file mode 100644 index 000000000..410014a36 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactsBulkPartialUpdateParams creates a new TenancyContactsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsBulkPartialUpdateParams() *TenancyContactsBulkPartialUpdateParams { + return &TenancyContactsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsBulkPartialUpdateParamsWithTimeout creates a new TenancyContactsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactsBulkPartialUpdateParams { + return &TenancyContactsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactsBulkPartialUpdateParamsWithContext creates a new TenancyContactsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactsBulkPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactsBulkPartialUpdateParams { + return &TenancyContactsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactsBulkPartialUpdateParamsWithHTTPClient creates a new TenancyContactsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactsBulkPartialUpdateParams { + return &TenancyContactsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contacts bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableContact + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsBulkPartialUpdateParams) WithDefaults() *TenancyContactsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) WithData(data *models.WritableContact) *TenancyContactsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contacts bulk partial update params +func (o *TenancyContactsBulkPartialUpdateParams) SetData(data *models.WritableContact) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_bulk_partial_update_responses.go b/netbox/client/tenancy/tenancy_contacts_bulk_partial_update_responses.go new file mode 100644 index 000000000..a201e7e48 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsBulkPartialUpdateReader is a Reader for the TenancyContactsBulkPartialUpdate structure. +type TenancyContactsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsBulkPartialUpdateOK creates a TenancyContactsBulkPartialUpdateOK with default headers values +func NewTenancyContactsBulkPartialUpdateOK() *TenancyContactsBulkPartialUpdateOK { + return &TenancyContactsBulkPartialUpdateOK{} +} + +/* TenancyContactsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactsBulkPartialUpdateOK tenancy contacts bulk partial update o k +*/ +type TenancyContactsBulkPartialUpdateOK struct { + Payload *models.Contact +} + +func (o *TenancyContactsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contacts/][%d] tenancyContactsBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactsBulkPartialUpdateOK) GetPayload() *models.Contact { + return o.Payload +} + +func (o *TenancyContactsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Contact) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_bulk_update_parameters.go b/netbox/client/tenancy/tenancy_contacts_bulk_update_parameters.go new file mode 100644 index 000000000..488b9f2a3 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactsBulkUpdateParams creates a new TenancyContactsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsBulkUpdateParams() *TenancyContactsBulkUpdateParams { + return &TenancyContactsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsBulkUpdateParamsWithTimeout creates a new TenancyContactsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsBulkUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactsBulkUpdateParams { + return &TenancyContactsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactsBulkUpdateParamsWithContext creates a new TenancyContactsBulkUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactsBulkUpdateParamsWithContext(ctx context.Context) *TenancyContactsBulkUpdateParams { + return &TenancyContactsBulkUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactsBulkUpdateParamsWithHTTPClient creates a new TenancyContactsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsBulkUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactsBulkUpdateParams { + return &TenancyContactsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactsBulkUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contacts bulk update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsBulkUpdateParams struct { + + // Data. + Data *models.WritableContact + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsBulkUpdateParams) WithDefaults() *TenancyContactsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) WithContext(ctx context.Context) *TenancyContactsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) WithData(data *models.WritableContact) *TenancyContactsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contacts bulk update params +func (o *TenancyContactsBulkUpdateParams) SetData(data *models.WritableContact) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_bulk_update_responses.go b/netbox/client/tenancy/tenancy_contacts_bulk_update_responses.go new file mode 100644 index 000000000..5e505e769 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsBulkUpdateReader is a Reader for the TenancyContactsBulkUpdate structure. +type TenancyContactsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsBulkUpdateOK creates a TenancyContactsBulkUpdateOK with default headers values +func NewTenancyContactsBulkUpdateOK() *TenancyContactsBulkUpdateOK { + return &TenancyContactsBulkUpdateOK{} +} + +/* TenancyContactsBulkUpdateOK describes a response with status code 200, with default header values. + +TenancyContactsBulkUpdateOK tenancy contacts bulk update o k +*/ +type TenancyContactsBulkUpdateOK struct { + Payload *models.Contact +} + +func (o *TenancyContactsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contacts/][%d] tenancyContactsBulkUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactsBulkUpdateOK) GetPayload() *models.Contact { + return o.Payload +} + +func (o *TenancyContactsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Contact) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_create_parameters.go b/netbox/client/tenancy/tenancy_contacts_create_parameters.go new file mode 100644 index 000000000..ae322c338 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_create_parameters.go @@ -0,0 +1,163 @@ +// 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 tenancy + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactsCreateParams creates a new TenancyContactsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsCreateParams() *TenancyContactsCreateParams { + return &TenancyContactsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsCreateParamsWithTimeout creates a new TenancyContactsCreateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsCreateParamsWithTimeout(timeout time.Duration) *TenancyContactsCreateParams { + return &TenancyContactsCreateParams{ + timeout: timeout, + } +} + +// NewTenancyContactsCreateParamsWithContext creates a new TenancyContactsCreateParams object +// with the ability to set a context for a request. +func NewTenancyContactsCreateParamsWithContext(ctx context.Context) *TenancyContactsCreateParams { + return &TenancyContactsCreateParams{ + Context: ctx, + } +} + +// NewTenancyContactsCreateParamsWithHTTPClient creates a new TenancyContactsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsCreateParamsWithHTTPClient(client *http.Client) *TenancyContactsCreateParams { + return &TenancyContactsCreateParams{ + HTTPClient: client, + } +} + +/* TenancyContactsCreateParams contains all the parameters to send to the API endpoint + for the tenancy contacts create operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsCreateParams struct { + + // Data. + Data *models.WritableContact + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsCreateParams) WithDefaults() *TenancyContactsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts create params +func (o *TenancyContactsCreateParams) WithTimeout(timeout time.Duration) *TenancyContactsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts create params +func (o *TenancyContactsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts create params +func (o *TenancyContactsCreateParams) WithContext(ctx context.Context) *TenancyContactsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts create params +func (o *TenancyContactsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts create params +func (o *TenancyContactsCreateParams) WithHTTPClient(client *http.Client) *TenancyContactsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts create params +func (o *TenancyContactsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contacts create params +func (o *TenancyContactsCreateParams) WithData(data *models.WritableContact) *TenancyContactsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contacts create params +func (o *TenancyContactsCreateParams) SetData(data *models.WritableContact) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_create_responses.go b/netbox/client/tenancy/tenancy_contacts_create_responses.go new file mode 100644 index 000000000..00d5c138e --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_create_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsCreateReader is a Reader for the TenancyContactsCreate structure. +type TenancyContactsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewTenancyContactsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsCreateCreated creates a TenancyContactsCreateCreated with default headers values +func NewTenancyContactsCreateCreated() *TenancyContactsCreateCreated { + return &TenancyContactsCreateCreated{} +} + +/* TenancyContactsCreateCreated describes a response with status code 201, with default header values. + +TenancyContactsCreateCreated tenancy contacts create created +*/ +type TenancyContactsCreateCreated struct { + Payload *models.Contact +} + +func (o *TenancyContactsCreateCreated) Error() string { + return fmt.Sprintf("[POST /tenancy/contacts/][%d] tenancyContactsCreateCreated %+v", 201, o.Payload) +} +func (o *TenancyContactsCreateCreated) GetPayload() *models.Contact { + return o.Payload +} + +func (o *TenancyContactsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Contact) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_delete_parameters.go b/netbox/client/tenancy/tenancy_contacts_delete_parameters.go new file mode 100644 index 000000000..f41fbb5df --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactsDeleteParams creates a new TenancyContactsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsDeleteParams() *TenancyContactsDeleteParams { + return &TenancyContactsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsDeleteParamsWithTimeout creates a new TenancyContactsDeleteParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsDeleteParamsWithTimeout(timeout time.Duration) *TenancyContactsDeleteParams { + return &TenancyContactsDeleteParams{ + timeout: timeout, + } +} + +// NewTenancyContactsDeleteParamsWithContext creates a new TenancyContactsDeleteParams object +// with the ability to set a context for a request. +func NewTenancyContactsDeleteParamsWithContext(ctx context.Context) *TenancyContactsDeleteParams { + return &TenancyContactsDeleteParams{ + Context: ctx, + } +} + +// NewTenancyContactsDeleteParamsWithHTTPClient creates a new TenancyContactsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsDeleteParamsWithHTTPClient(client *http.Client) *TenancyContactsDeleteParams { + return &TenancyContactsDeleteParams{ + HTTPClient: client, + } +} + +/* TenancyContactsDeleteParams contains all the parameters to send to the API endpoint + for the tenancy contacts delete operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsDeleteParams struct { + + /* ID. + + A unique integer value identifying this contact. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsDeleteParams) WithDefaults() *TenancyContactsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) WithTimeout(timeout time.Duration) *TenancyContactsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) WithContext(ctx context.Context) *TenancyContactsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) WithHTTPClient(client *http.Client) *TenancyContactsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) WithID(id int64) *TenancyContactsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contacts delete params +func (o *TenancyContactsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsDeleteParams) 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/netbox/client/tenancy/tenancy_contacts_delete_responses.go b/netbox/client/tenancy/tenancy_contacts_delete_responses.go new file mode 100644 index 000000000..4ae4acea6 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_delete_responses.go @@ -0,0 +1,68 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenancyContactsDeleteReader is a Reader for the TenancyContactsDelete structure. +type TenancyContactsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewTenancyContactsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsDeleteNoContent creates a TenancyContactsDeleteNoContent with default headers values +func NewTenancyContactsDeleteNoContent() *TenancyContactsDeleteNoContent { + return &TenancyContactsDeleteNoContent{} +} + +/* TenancyContactsDeleteNoContent describes a response with status code 204, with default header values. + +TenancyContactsDeleteNoContent tenancy contacts delete no content +*/ +type TenancyContactsDeleteNoContent struct { +} + +func (o *TenancyContactsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /tenancy/contacts/{id}/][%d] tenancyContactsDeleteNoContent ", 204) +} + +func (o *TenancyContactsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_list_parameters.go b/netbox/client/tenancy/tenancy_contacts_list_parameters.go new file mode 100644 index 000000000..cd691fa29 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_list_parameters.go @@ -0,0 +1,2660 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactsListParams creates a new TenancyContactsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsListParams() *TenancyContactsListParams { + return &TenancyContactsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsListParamsWithTimeout creates a new TenancyContactsListParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsListParamsWithTimeout(timeout time.Duration) *TenancyContactsListParams { + return &TenancyContactsListParams{ + timeout: timeout, + } +} + +// NewTenancyContactsListParamsWithContext creates a new TenancyContactsListParams object +// with the ability to set a context for a request. +func NewTenancyContactsListParamsWithContext(ctx context.Context) *TenancyContactsListParams { + return &TenancyContactsListParams{ + Context: ctx, + } +} + +// NewTenancyContactsListParamsWithHTTPClient creates a new TenancyContactsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsListParamsWithHTTPClient(client *http.Client) *TenancyContactsListParams { + return &TenancyContactsListParams{ + HTTPClient: client, + } +} + +/* TenancyContactsListParams contains all the parameters to send to the API endpoint + for the tenancy contacts list operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsListParams struct { + + // Address. + Address *string + + // AddressIc. + AddressIc *string + + // AddressIe. + AddressIe *string + + // AddressIew. + AddressIew *string + + // AddressIsw. + AddressIsw *string + + // Addressn. + Addressn *string + + // AddressNic. + AddressNic *string + + // AddressNie. + AddressNie *string + + // AddressNiew. + AddressNiew *string + + // AddressNisw. + AddressNisw *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Email. + Email *string + + // EmailIc. + EmailIc *string + + // EmailIe. + EmailIe *string + + // EmailIew. + EmailIew *string + + // EmailIsw. + EmailIsw *string + + // Emailn. + Emailn *string + + // EmailNic. + EmailNic *string + + // EmailNie. + EmailNie *string + + // EmailNiew. + EmailNiew *string + + // EmailNisw. + EmailNisw *string + + // Group. + Group *string + + // Groupn. + Groupn *string + + // GroupID. + GroupID *string + + // GroupIDn. + GroupIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Link. + Link *string + + // LinkIc. + LinkIc *string + + // LinkIe. + LinkIe *string + + // LinkIew. + LinkIew *string + + // LinkIsw. + LinkIsw *string + + // Linkn. + Linkn *string + + // LinkNic. + LinkNic *string + + // LinkNie. + LinkNie *string + + // LinkNiew. + LinkNiew *string + + // LinkNisw. + LinkNisw *string + + // Name. + Name *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Phone. + Phone *string + + // PhoneIc. + PhoneIc *string + + // PhoneIe. + PhoneIe *string + + // PhoneIew. + PhoneIew *string + + // PhoneIsw. + PhoneIsw *string + + // Phonen. + Phonen *string + + // PhoneNic. + PhoneNic *string + + // PhoneNie. + PhoneNie *string + + // PhoneNiew. + PhoneNiew *string + + // PhoneNisw. + PhoneNisw *string + + // Q. + Q *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // Title. + Title *string + + // TitleIc. + TitleIc *string + + // TitleIe. + TitleIe *string + + // TitleIew. + TitleIew *string + + // TitleIsw. + TitleIsw *string + + // Titlen. + Titlen *string + + // TitleNic. + TitleNic *string + + // TitleNie. + TitleNie *string + + // TitleNiew. + TitleNiew *string + + // TitleNisw. + TitleNisw *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsListParams) WithDefaults() *TenancyContactsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTimeout(timeout time.Duration) *TenancyContactsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts list params +func (o *TenancyContactsListParams) WithContext(ctx context.Context) *TenancyContactsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts list params +func (o *TenancyContactsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts list params +func (o *TenancyContactsListParams) WithHTTPClient(client *http.Client) *TenancyContactsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts list params +func (o *TenancyContactsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddress adds the address to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddress(address *string) *TenancyContactsListParams { + o.SetAddress(address) + return o +} + +// SetAddress adds the address to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddress(address *string) { + o.Address = address +} + +// WithAddressIc adds the addressIc to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressIc(addressIc *string) *TenancyContactsListParams { + o.SetAddressIc(addressIc) + return o +} + +// SetAddressIc adds the addressIc to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressIc(addressIc *string) { + o.AddressIc = addressIc +} + +// WithAddressIe adds the addressIe to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressIe(addressIe *string) *TenancyContactsListParams { + o.SetAddressIe(addressIe) + return o +} + +// SetAddressIe adds the addressIe to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressIe(addressIe *string) { + o.AddressIe = addressIe +} + +// WithAddressIew adds the addressIew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressIew(addressIew *string) *TenancyContactsListParams { + o.SetAddressIew(addressIew) + return o +} + +// SetAddressIew adds the addressIew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressIew(addressIew *string) { + o.AddressIew = addressIew +} + +// WithAddressIsw adds the addressIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressIsw(addressIsw *string) *TenancyContactsListParams { + o.SetAddressIsw(addressIsw) + return o +} + +// SetAddressIsw adds the addressIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressIsw(addressIsw *string) { + o.AddressIsw = addressIsw +} + +// WithAddressn adds the addressn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressn(addressn *string) *TenancyContactsListParams { + o.SetAddressn(addressn) + return o +} + +// SetAddressn adds the addressN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressn(addressn *string) { + o.Addressn = addressn +} + +// WithAddressNic adds the addressNic to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressNic(addressNic *string) *TenancyContactsListParams { + o.SetAddressNic(addressNic) + return o +} + +// SetAddressNic adds the addressNic to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressNic(addressNic *string) { + o.AddressNic = addressNic +} + +// WithAddressNie adds the addressNie to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressNie(addressNie *string) *TenancyContactsListParams { + o.SetAddressNie(addressNie) + return o +} + +// SetAddressNie adds the addressNie to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressNie(addressNie *string) { + o.AddressNie = addressNie +} + +// WithAddressNiew adds the addressNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressNiew(addressNiew *string) *TenancyContactsListParams { + o.SetAddressNiew(addressNiew) + return o +} + +// SetAddressNiew adds the addressNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressNiew(addressNiew *string) { + o.AddressNiew = addressNiew +} + +// WithAddressNisw adds the addressNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithAddressNisw(addressNisw *string) *TenancyContactsListParams { + o.SetAddressNisw(addressNisw) + return o +} + +// SetAddressNisw adds the addressNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetAddressNisw(addressNisw *string) { + o.AddressNisw = addressNisw +} + +// WithCreated adds the created to the tenancy contacts list params +func (o *TenancyContactsListParams) WithCreated(created *string) *TenancyContactsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the tenancy contacts list params +func (o *TenancyContactsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the tenancy contacts list params +func (o *TenancyContactsListParams) WithCreatedGte(createdGte *string) *TenancyContactsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the tenancy contacts list params +func (o *TenancyContactsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the tenancy contacts list params +func (o *TenancyContactsListParams) WithCreatedLte(createdLte *string) *TenancyContactsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the tenancy contacts list params +func (o *TenancyContactsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithEmail adds the email to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmail(email *string) *TenancyContactsListParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmail(email *string) { + o.Email = email +} + +// WithEmailIc adds the emailIc to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailIc(emailIc *string) *TenancyContactsListParams { + o.SetEmailIc(emailIc) + return o +} + +// SetEmailIc adds the emailIc to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailIc(emailIc *string) { + o.EmailIc = emailIc +} + +// WithEmailIe adds the emailIe to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailIe(emailIe *string) *TenancyContactsListParams { + o.SetEmailIe(emailIe) + return o +} + +// SetEmailIe adds the emailIe to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailIe(emailIe *string) { + o.EmailIe = emailIe +} + +// WithEmailIew adds the emailIew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailIew(emailIew *string) *TenancyContactsListParams { + o.SetEmailIew(emailIew) + return o +} + +// SetEmailIew adds the emailIew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailIew(emailIew *string) { + o.EmailIew = emailIew +} + +// WithEmailIsw adds the emailIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailIsw(emailIsw *string) *TenancyContactsListParams { + o.SetEmailIsw(emailIsw) + return o +} + +// SetEmailIsw adds the emailIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailIsw(emailIsw *string) { + o.EmailIsw = emailIsw +} + +// WithEmailn adds the emailn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailn(emailn *string) *TenancyContactsListParams { + o.SetEmailn(emailn) + return o +} + +// SetEmailn adds the emailN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailn(emailn *string) { + o.Emailn = emailn +} + +// WithEmailNic adds the emailNic to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailNic(emailNic *string) *TenancyContactsListParams { + o.SetEmailNic(emailNic) + return o +} + +// SetEmailNic adds the emailNic to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailNic(emailNic *string) { + o.EmailNic = emailNic +} + +// WithEmailNie adds the emailNie to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailNie(emailNie *string) *TenancyContactsListParams { + o.SetEmailNie(emailNie) + return o +} + +// SetEmailNie adds the emailNie to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailNie(emailNie *string) { + o.EmailNie = emailNie +} + +// WithEmailNiew adds the emailNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailNiew(emailNiew *string) *TenancyContactsListParams { + o.SetEmailNiew(emailNiew) + return o +} + +// SetEmailNiew adds the emailNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailNiew(emailNiew *string) { + o.EmailNiew = emailNiew +} + +// WithEmailNisw adds the emailNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithEmailNisw(emailNisw *string) *TenancyContactsListParams { + o.SetEmailNisw(emailNisw) + return o +} + +// SetEmailNisw adds the emailNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetEmailNisw(emailNisw *string) { + o.EmailNisw = emailNisw +} + +// WithGroup adds the group to the tenancy contacts list params +func (o *TenancyContactsListParams) WithGroup(group *string) *TenancyContactsListParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the tenancy contacts list params +func (o *TenancyContactsListParams) SetGroup(group *string) { + o.Group = group +} + +// WithGroupn adds the groupn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithGroupn(groupn *string) *TenancyContactsListParams { + o.SetGroupn(groupn) + return o +} + +// SetGroupn adds the groupN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetGroupn(groupn *string) { + o.Groupn = groupn +} + +// WithGroupID adds the groupID to the tenancy contacts list params +func (o *TenancyContactsListParams) WithGroupID(groupID *string) *TenancyContactsListParams { + o.SetGroupID(groupID) + return o +} + +// SetGroupID adds the groupId to the tenancy contacts list params +func (o *TenancyContactsListParams) SetGroupID(groupID *string) { + o.GroupID = groupID +} + +// WithGroupIDn adds the groupIDn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithGroupIDn(groupIDn *string) *TenancyContactsListParams { + o.SetGroupIDn(groupIDn) + return o +} + +// SetGroupIDn adds the groupIdN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetGroupIDn(groupIDn *string) { + o.GroupIDn = groupIDn +} + +// WithID adds the id to the tenancy contacts list params +func (o *TenancyContactsListParams) WithID(id *string) *TenancyContactsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contacts list params +func (o *TenancyContactsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the tenancy contacts list params +func (o *TenancyContactsListParams) WithIDGt(iDGt *string) *TenancyContactsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the tenancy contacts list params +func (o *TenancyContactsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the tenancy contacts list params +func (o *TenancyContactsListParams) WithIDGte(iDGte *string) *TenancyContactsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the tenancy contacts list params +func (o *TenancyContactsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the tenancy contacts list params +func (o *TenancyContactsListParams) WithIDLt(iDLt *string) *TenancyContactsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the tenancy contacts list params +func (o *TenancyContactsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the tenancy contacts list params +func (o *TenancyContactsListParams) WithIDLte(iDLte *string) *TenancyContactsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the tenancy contacts list params +func (o *TenancyContactsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithIDn(iDn *string) *TenancyContactsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLastUpdated(lastUpdated *string) *TenancyContactsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *TenancyContactsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *TenancyContactsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLimit(limit *int64) *TenancyContactsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithLink adds the link to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLink(link *string) *TenancyContactsListParams { + o.SetLink(link) + return o +} + +// SetLink adds the link to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLink(link *string) { + o.Link = link +} + +// WithLinkIc adds the linkIc to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkIc(linkIc *string) *TenancyContactsListParams { + o.SetLinkIc(linkIc) + return o +} + +// SetLinkIc adds the linkIc to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkIc(linkIc *string) { + o.LinkIc = linkIc +} + +// WithLinkIe adds the linkIe to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkIe(linkIe *string) *TenancyContactsListParams { + o.SetLinkIe(linkIe) + return o +} + +// SetLinkIe adds the linkIe to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkIe(linkIe *string) { + o.LinkIe = linkIe +} + +// WithLinkIew adds the linkIew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkIew(linkIew *string) *TenancyContactsListParams { + o.SetLinkIew(linkIew) + return o +} + +// SetLinkIew adds the linkIew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkIew(linkIew *string) { + o.LinkIew = linkIew +} + +// WithLinkIsw adds the linkIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkIsw(linkIsw *string) *TenancyContactsListParams { + o.SetLinkIsw(linkIsw) + return o +} + +// SetLinkIsw adds the linkIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkIsw(linkIsw *string) { + o.LinkIsw = linkIsw +} + +// WithLinkn adds the linkn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkn(linkn *string) *TenancyContactsListParams { + o.SetLinkn(linkn) + return o +} + +// SetLinkn adds the linkN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkn(linkn *string) { + o.Linkn = linkn +} + +// WithLinkNic adds the linkNic to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkNic(linkNic *string) *TenancyContactsListParams { + o.SetLinkNic(linkNic) + return o +} + +// SetLinkNic adds the linkNic to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkNic(linkNic *string) { + o.LinkNic = linkNic +} + +// WithLinkNie adds the linkNie to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkNie(linkNie *string) *TenancyContactsListParams { + o.SetLinkNie(linkNie) + return o +} + +// SetLinkNie adds the linkNie to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkNie(linkNie *string) { + o.LinkNie = linkNie +} + +// WithLinkNiew adds the linkNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkNiew(linkNiew *string) *TenancyContactsListParams { + o.SetLinkNiew(linkNiew) + return o +} + +// SetLinkNiew adds the linkNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkNiew(linkNiew *string) { + o.LinkNiew = linkNiew +} + +// WithLinkNisw adds the linkNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithLinkNisw(linkNisw *string) *TenancyContactsListParams { + o.SetLinkNisw(linkNisw) + return o +} + +// SetLinkNisw adds the linkNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetLinkNisw(linkNisw *string) { + o.LinkNisw = linkNisw +} + +// WithName adds the name to the tenancy contacts list params +func (o *TenancyContactsListParams) WithName(name *string) *TenancyContactsListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the tenancy contacts list params +func (o *TenancyContactsListParams) SetName(name *string) { + o.Name = name +} + +// WithNameIc adds the nameIc to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameIc(nameIc *string) *TenancyContactsListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameIe(nameIe *string) *TenancyContactsListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameIew(nameIew *string) *TenancyContactsListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameIsw(nameIsw *string) *TenancyContactsListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNamen(namen *string) *TenancyContactsListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameNic(nameNic *string) *TenancyContactsListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameNie(nameNie *string) *TenancyContactsListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameNiew(nameNiew *string) *TenancyContactsListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithNameNisw(nameNisw *string) *TenancyContactsListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the tenancy contacts list params +func (o *TenancyContactsListParams) WithOffset(offset *int64) *TenancyContactsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the tenancy contacts list params +func (o *TenancyContactsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPhone adds the phone to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhone(phone *string) *TenancyContactsListParams { + o.SetPhone(phone) + return o +} + +// SetPhone adds the phone to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhone(phone *string) { + o.Phone = phone +} + +// WithPhoneIc adds the phoneIc to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneIc(phoneIc *string) *TenancyContactsListParams { + o.SetPhoneIc(phoneIc) + return o +} + +// SetPhoneIc adds the phoneIc to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneIc(phoneIc *string) { + o.PhoneIc = phoneIc +} + +// WithPhoneIe adds the phoneIe to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneIe(phoneIe *string) *TenancyContactsListParams { + o.SetPhoneIe(phoneIe) + return o +} + +// SetPhoneIe adds the phoneIe to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneIe(phoneIe *string) { + o.PhoneIe = phoneIe +} + +// WithPhoneIew adds the phoneIew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneIew(phoneIew *string) *TenancyContactsListParams { + o.SetPhoneIew(phoneIew) + return o +} + +// SetPhoneIew adds the phoneIew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneIew(phoneIew *string) { + o.PhoneIew = phoneIew +} + +// WithPhoneIsw adds the phoneIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneIsw(phoneIsw *string) *TenancyContactsListParams { + o.SetPhoneIsw(phoneIsw) + return o +} + +// SetPhoneIsw adds the phoneIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneIsw(phoneIsw *string) { + o.PhoneIsw = phoneIsw +} + +// WithPhonen adds the phonen to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhonen(phonen *string) *TenancyContactsListParams { + o.SetPhonen(phonen) + return o +} + +// SetPhonen adds the phoneN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhonen(phonen *string) { + o.Phonen = phonen +} + +// WithPhoneNic adds the phoneNic to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneNic(phoneNic *string) *TenancyContactsListParams { + o.SetPhoneNic(phoneNic) + return o +} + +// SetPhoneNic adds the phoneNic to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneNic(phoneNic *string) { + o.PhoneNic = phoneNic +} + +// WithPhoneNie adds the phoneNie to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneNie(phoneNie *string) *TenancyContactsListParams { + o.SetPhoneNie(phoneNie) + return o +} + +// SetPhoneNie adds the phoneNie to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneNie(phoneNie *string) { + o.PhoneNie = phoneNie +} + +// WithPhoneNiew adds the phoneNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneNiew(phoneNiew *string) *TenancyContactsListParams { + o.SetPhoneNiew(phoneNiew) + return o +} + +// SetPhoneNiew adds the phoneNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneNiew(phoneNiew *string) { + o.PhoneNiew = phoneNiew +} + +// WithPhoneNisw adds the phoneNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithPhoneNisw(phoneNisw *string) *TenancyContactsListParams { + o.SetPhoneNisw(phoneNisw) + return o +} + +// SetPhoneNisw adds the phoneNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetPhoneNisw(phoneNisw *string) { + o.PhoneNisw = phoneNisw +} + +// WithQ adds the q to the tenancy contacts list params +func (o *TenancyContactsListParams) WithQ(q *string) *TenancyContactsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the tenancy contacts list params +func (o *TenancyContactsListParams) SetQ(q *string) { + o.Q = q +} + +// WithTag adds the tag to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTag(tag *string) *TenancyContactsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTagn(tagn *string) *TenancyContactsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithTitle adds the title to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitle(title *string) *TenancyContactsListParams { + o.SetTitle(title) + return o +} + +// SetTitle adds the title to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitle(title *string) { + o.Title = title +} + +// WithTitleIc adds the titleIc to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleIc(titleIc *string) *TenancyContactsListParams { + o.SetTitleIc(titleIc) + return o +} + +// SetTitleIc adds the titleIc to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleIc(titleIc *string) { + o.TitleIc = titleIc +} + +// WithTitleIe adds the titleIe to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleIe(titleIe *string) *TenancyContactsListParams { + o.SetTitleIe(titleIe) + return o +} + +// SetTitleIe adds the titleIe to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleIe(titleIe *string) { + o.TitleIe = titleIe +} + +// WithTitleIew adds the titleIew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleIew(titleIew *string) *TenancyContactsListParams { + o.SetTitleIew(titleIew) + return o +} + +// SetTitleIew adds the titleIew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleIew(titleIew *string) { + o.TitleIew = titleIew +} + +// WithTitleIsw adds the titleIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleIsw(titleIsw *string) *TenancyContactsListParams { + o.SetTitleIsw(titleIsw) + return o +} + +// SetTitleIsw adds the titleIsw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleIsw(titleIsw *string) { + o.TitleIsw = titleIsw +} + +// WithTitlen adds the titlen to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitlen(titlen *string) *TenancyContactsListParams { + o.SetTitlen(titlen) + return o +} + +// SetTitlen adds the titleN to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitlen(titlen *string) { + o.Titlen = titlen +} + +// WithTitleNic adds the titleNic to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleNic(titleNic *string) *TenancyContactsListParams { + o.SetTitleNic(titleNic) + return o +} + +// SetTitleNic adds the titleNic to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleNic(titleNic *string) { + o.TitleNic = titleNic +} + +// WithTitleNie adds the titleNie to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleNie(titleNie *string) *TenancyContactsListParams { + o.SetTitleNie(titleNie) + return o +} + +// SetTitleNie adds the titleNie to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleNie(titleNie *string) { + o.TitleNie = titleNie +} + +// WithTitleNiew adds the titleNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleNiew(titleNiew *string) *TenancyContactsListParams { + o.SetTitleNiew(titleNiew) + return o +} + +// SetTitleNiew adds the titleNiew to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleNiew(titleNiew *string) { + o.TitleNiew = titleNiew +} + +// WithTitleNisw adds the titleNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) WithTitleNisw(titleNisw *string) *TenancyContactsListParams { + o.SetTitleNisw(titleNisw) + return o +} + +// SetTitleNisw adds the titleNisw to the tenancy contacts list params +func (o *TenancyContactsListParams) SetTitleNisw(titleNisw *string) { + o.TitleNisw = titleNisw +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Address != nil { + + // query param address + var qrAddress string + + if o.Address != nil { + qrAddress = *o.Address + } + qAddress := qrAddress + if qAddress != "" { + + if err := r.SetQueryParam("address", qAddress); err != nil { + return err + } + } + } + + if o.AddressIc != nil { + + // query param address__ic + var qrAddressIc string + + if o.AddressIc != nil { + qrAddressIc = *o.AddressIc + } + qAddressIc := qrAddressIc + if qAddressIc != "" { + + if err := r.SetQueryParam("address__ic", qAddressIc); err != nil { + return err + } + } + } + + if o.AddressIe != nil { + + // query param address__ie + var qrAddressIe string + + if o.AddressIe != nil { + qrAddressIe = *o.AddressIe + } + qAddressIe := qrAddressIe + if qAddressIe != "" { + + if err := r.SetQueryParam("address__ie", qAddressIe); err != nil { + return err + } + } + } + + if o.AddressIew != nil { + + // query param address__iew + var qrAddressIew string + + if o.AddressIew != nil { + qrAddressIew = *o.AddressIew + } + qAddressIew := qrAddressIew + if qAddressIew != "" { + + if err := r.SetQueryParam("address__iew", qAddressIew); err != nil { + return err + } + } + } + + if o.AddressIsw != nil { + + // query param address__isw + var qrAddressIsw string + + if o.AddressIsw != nil { + qrAddressIsw = *o.AddressIsw + } + qAddressIsw := qrAddressIsw + if qAddressIsw != "" { + + if err := r.SetQueryParam("address__isw", qAddressIsw); err != nil { + return err + } + } + } + + if o.Addressn != nil { + + // query param address__n + var qrAddressn string + + if o.Addressn != nil { + qrAddressn = *o.Addressn + } + qAddressn := qrAddressn + if qAddressn != "" { + + if err := r.SetQueryParam("address__n", qAddressn); err != nil { + return err + } + } + } + + if o.AddressNic != nil { + + // query param address__nic + var qrAddressNic string + + if o.AddressNic != nil { + qrAddressNic = *o.AddressNic + } + qAddressNic := qrAddressNic + if qAddressNic != "" { + + if err := r.SetQueryParam("address__nic", qAddressNic); err != nil { + return err + } + } + } + + if o.AddressNie != nil { + + // query param address__nie + var qrAddressNie string + + if o.AddressNie != nil { + qrAddressNie = *o.AddressNie + } + qAddressNie := qrAddressNie + if qAddressNie != "" { + + if err := r.SetQueryParam("address__nie", qAddressNie); err != nil { + return err + } + } + } + + if o.AddressNiew != nil { + + // query param address__niew + var qrAddressNiew string + + if o.AddressNiew != nil { + qrAddressNiew = *o.AddressNiew + } + qAddressNiew := qrAddressNiew + if qAddressNiew != "" { + + if err := r.SetQueryParam("address__niew", qAddressNiew); err != nil { + return err + } + } + } + + if o.AddressNisw != nil { + + // query param address__nisw + var qrAddressNisw string + + if o.AddressNisw != nil { + qrAddressNisw = *o.AddressNisw + } + qAddressNisw := qrAddressNisw + if qAddressNisw != "" { + + if err := r.SetQueryParam("address__nisw", qAddressNisw); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Email != nil { + + // query param email + var qrEmail string + + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + } + + if o.EmailIc != nil { + + // query param email__ic + var qrEmailIc string + + if o.EmailIc != nil { + qrEmailIc = *o.EmailIc + } + qEmailIc := qrEmailIc + if qEmailIc != "" { + + if err := r.SetQueryParam("email__ic", qEmailIc); err != nil { + return err + } + } + } + + if o.EmailIe != nil { + + // query param email__ie + var qrEmailIe string + + if o.EmailIe != nil { + qrEmailIe = *o.EmailIe + } + qEmailIe := qrEmailIe + if qEmailIe != "" { + + if err := r.SetQueryParam("email__ie", qEmailIe); err != nil { + return err + } + } + } + + if o.EmailIew != nil { + + // query param email__iew + var qrEmailIew string + + if o.EmailIew != nil { + qrEmailIew = *o.EmailIew + } + qEmailIew := qrEmailIew + if qEmailIew != "" { + + if err := r.SetQueryParam("email__iew", qEmailIew); err != nil { + return err + } + } + } + + if o.EmailIsw != nil { + + // query param email__isw + var qrEmailIsw string + + if o.EmailIsw != nil { + qrEmailIsw = *o.EmailIsw + } + qEmailIsw := qrEmailIsw + if qEmailIsw != "" { + + if err := r.SetQueryParam("email__isw", qEmailIsw); err != nil { + return err + } + } + } + + if o.Emailn != nil { + + // query param email__n + var qrEmailn string + + if o.Emailn != nil { + qrEmailn = *o.Emailn + } + qEmailn := qrEmailn + if qEmailn != "" { + + if err := r.SetQueryParam("email__n", qEmailn); err != nil { + return err + } + } + } + + if o.EmailNic != nil { + + // query param email__nic + var qrEmailNic string + + if o.EmailNic != nil { + qrEmailNic = *o.EmailNic + } + qEmailNic := qrEmailNic + if qEmailNic != "" { + + if err := r.SetQueryParam("email__nic", qEmailNic); err != nil { + return err + } + } + } + + if o.EmailNie != nil { + + // query param email__nie + var qrEmailNie string + + if o.EmailNie != nil { + qrEmailNie = *o.EmailNie + } + qEmailNie := qrEmailNie + if qEmailNie != "" { + + if err := r.SetQueryParam("email__nie", qEmailNie); err != nil { + return err + } + } + } + + if o.EmailNiew != nil { + + // query param email__niew + var qrEmailNiew string + + if o.EmailNiew != nil { + qrEmailNiew = *o.EmailNiew + } + qEmailNiew := qrEmailNiew + if qEmailNiew != "" { + + if err := r.SetQueryParam("email__niew", qEmailNiew); err != nil { + return err + } + } + } + + if o.EmailNisw != nil { + + // query param email__nisw + var qrEmailNisw string + + if o.EmailNisw != nil { + qrEmailNisw = *o.EmailNisw + } + qEmailNisw := qrEmailNisw + if qEmailNisw != "" { + + if err := r.SetQueryParam("email__nisw", qEmailNisw); err != nil { + return err + } + } + } + + if o.Group != nil { + + // query param group + var qrGroup string + + if o.Group != nil { + qrGroup = *o.Group + } + qGroup := qrGroup + if qGroup != "" { + + if err := r.SetQueryParam("group", qGroup); err != nil { + return err + } + } + } + + if o.Groupn != nil { + + // query param group__n + var qrGroupn string + + if o.Groupn != nil { + qrGroupn = *o.Groupn + } + qGroupn := qrGroupn + if qGroupn != "" { + + if err := r.SetQueryParam("group__n", qGroupn); err != nil { + return err + } + } + } + + if o.GroupID != nil { + + // query param group_id + var qrGroupID string + + if o.GroupID != nil { + qrGroupID = *o.GroupID + } + qGroupID := qrGroupID + if qGroupID != "" { + + if err := r.SetQueryParam("group_id", qGroupID); err != nil { + return err + } + } + } + + if o.GroupIDn != nil { + + // query param group_id__n + var qrGroupIDn string + + if o.GroupIDn != nil { + qrGroupIDn = *o.GroupIDn + } + qGroupIDn := qrGroupIDn + if qGroupIDn != "" { + + if err := r.SetQueryParam("group_id__n", qGroupIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Link != nil { + + // query param link + var qrLink string + + if o.Link != nil { + qrLink = *o.Link + } + qLink := qrLink + if qLink != "" { + + if err := r.SetQueryParam("link", qLink); err != nil { + return err + } + } + } + + if o.LinkIc != nil { + + // query param link__ic + var qrLinkIc string + + if o.LinkIc != nil { + qrLinkIc = *o.LinkIc + } + qLinkIc := qrLinkIc + if qLinkIc != "" { + + if err := r.SetQueryParam("link__ic", qLinkIc); err != nil { + return err + } + } + } + + if o.LinkIe != nil { + + // query param link__ie + var qrLinkIe string + + if o.LinkIe != nil { + qrLinkIe = *o.LinkIe + } + qLinkIe := qrLinkIe + if qLinkIe != "" { + + if err := r.SetQueryParam("link__ie", qLinkIe); err != nil { + return err + } + } + } + + if o.LinkIew != nil { + + // query param link__iew + var qrLinkIew string + + if o.LinkIew != nil { + qrLinkIew = *o.LinkIew + } + qLinkIew := qrLinkIew + if qLinkIew != "" { + + if err := r.SetQueryParam("link__iew", qLinkIew); err != nil { + return err + } + } + } + + if o.LinkIsw != nil { + + // query param link__isw + var qrLinkIsw string + + if o.LinkIsw != nil { + qrLinkIsw = *o.LinkIsw + } + qLinkIsw := qrLinkIsw + if qLinkIsw != "" { + + if err := r.SetQueryParam("link__isw", qLinkIsw); err != nil { + return err + } + } + } + + if o.Linkn != nil { + + // query param link__n + var qrLinkn string + + if o.Linkn != nil { + qrLinkn = *o.Linkn + } + qLinkn := qrLinkn + if qLinkn != "" { + + if err := r.SetQueryParam("link__n", qLinkn); err != nil { + return err + } + } + } + + if o.LinkNic != nil { + + // query param link__nic + var qrLinkNic string + + if o.LinkNic != nil { + qrLinkNic = *o.LinkNic + } + qLinkNic := qrLinkNic + if qLinkNic != "" { + + if err := r.SetQueryParam("link__nic", qLinkNic); err != nil { + return err + } + } + } + + if o.LinkNie != nil { + + // query param link__nie + var qrLinkNie string + + if o.LinkNie != nil { + qrLinkNie = *o.LinkNie + } + qLinkNie := qrLinkNie + if qLinkNie != "" { + + if err := r.SetQueryParam("link__nie", qLinkNie); err != nil { + return err + } + } + } + + if o.LinkNiew != nil { + + // query param link__niew + var qrLinkNiew string + + if o.LinkNiew != nil { + qrLinkNiew = *o.LinkNiew + } + qLinkNiew := qrLinkNiew + if qLinkNiew != "" { + + if err := r.SetQueryParam("link__niew", qLinkNiew); err != nil { + return err + } + } + } + + if o.LinkNisw != nil { + + // query param link__nisw + var qrLinkNisw string + + if o.LinkNisw != nil { + qrLinkNisw = *o.LinkNisw + } + qLinkNisw := qrLinkNisw + if qLinkNisw != "" { + + if err := r.SetQueryParam("link__nisw", qLinkNisw); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Phone != nil { + + // query param phone + var qrPhone string + + if o.Phone != nil { + qrPhone = *o.Phone + } + qPhone := qrPhone + if qPhone != "" { + + if err := r.SetQueryParam("phone", qPhone); err != nil { + return err + } + } + } + + if o.PhoneIc != nil { + + // query param phone__ic + var qrPhoneIc string + + if o.PhoneIc != nil { + qrPhoneIc = *o.PhoneIc + } + qPhoneIc := qrPhoneIc + if qPhoneIc != "" { + + if err := r.SetQueryParam("phone__ic", qPhoneIc); err != nil { + return err + } + } + } + + if o.PhoneIe != nil { + + // query param phone__ie + var qrPhoneIe string + + if o.PhoneIe != nil { + qrPhoneIe = *o.PhoneIe + } + qPhoneIe := qrPhoneIe + if qPhoneIe != "" { + + if err := r.SetQueryParam("phone__ie", qPhoneIe); err != nil { + return err + } + } + } + + if o.PhoneIew != nil { + + // query param phone__iew + var qrPhoneIew string + + if o.PhoneIew != nil { + qrPhoneIew = *o.PhoneIew + } + qPhoneIew := qrPhoneIew + if qPhoneIew != "" { + + if err := r.SetQueryParam("phone__iew", qPhoneIew); err != nil { + return err + } + } + } + + if o.PhoneIsw != nil { + + // query param phone__isw + var qrPhoneIsw string + + if o.PhoneIsw != nil { + qrPhoneIsw = *o.PhoneIsw + } + qPhoneIsw := qrPhoneIsw + if qPhoneIsw != "" { + + if err := r.SetQueryParam("phone__isw", qPhoneIsw); err != nil { + return err + } + } + } + + if o.Phonen != nil { + + // query param phone__n + var qrPhonen string + + if o.Phonen != nil { + qrPhonen = *o.Phonen + } + qPhonen := qrPhonen + if qPhonen != "" { + + if err := r.SetQueryParam("phone__n", qPhonen); err != nil { + return err + } + } + } + + if o.PhoneNic != nil { + + // query param phone__nic + var qrPhoneNic string + + if o.PhoneNic != nil { + qrPhoneNic = *o.PhoneNic + } + qPhoneNic := qrPhoneNic + if qPhoneNic != "" { + + if err := r.SetQueryParam("phone__nic", qPhoneNic); err != nil { + return err + } + } + } + + if o.PhoneNie != nil { + + // query param phone__nie + var qrPhoneNie string + + if o.PhoneNie != nil { + qrPhoneNie = *o.PhoneNie + } + qPhoneNie := qrPhoneNie + if qPhoneNie != "" { + + if err := r.SetQueryParam("phone__nie", qPhoneNie); err != nil { + return err + } + } + } + + if o.PhoneNiew != nil { + + // query param phone__niew + var qrPhoneNiew string + + if o.PhoneNiew != nil { + qrPhoneNiew = *o.PhoneNiew + } + qPhoneNiew := qrPhoneNiew + if qPhoneNiew != "" { + + if err := r.SetQueryParam("phone__niew", qPhoneNiew); err != nil { + return err + } + } + } + + if o.PhoneNisw != nil { + + // query param phone__nisw + var qrPhoneNisw string + + if o.PhoneNisw != nil { + qrPhoneNisw = *o.PhoneNisw + } + qPhoneNisw := qrPhoneNisw + if qPhoneNisw != "" { + + if err := r.SetQueryParam("phone__nisw", qPhoneNisw); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + 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.Title != nil { + + // query param title + var qrTitle string + + if o.Title != nil { + qrTitle = *o.Title + } + qTitle := qrTitle + if qTitle != "" { + + if err := r.SetQueryParam("title", qTitle); err != nil { + return err + } + } + } + + if o.TitleIc != nil { + + // query param title__ic + var qrTitleIc string + + if o.TitleIc != nil { + qrTitleIc = *o.TitleIc + } + qTitleIc := qrTitleIc + if qTitleIc != "" { + + if err := r.SetQueryParam("title__ic", qTitleIc); err != nil { + return err + } + } + } + + if o.TitleIe != nil { + + // query param title__ie + var qrTitleIe string + + if o.TitleIe != nil { + qrTitleIe = *o.TitleIe + } + qTitleIe := qrTitleIe + if qTitleIe != "" { + + if err := r.SetQueryParam("title__ie", qTitleIe); err != nil { + return err + } + } + } + + if o.TitleIew != nil { + + // query param title__iew + var qrTitleIew string + + if o.TitleIew != nil { + qrTitleIew = *o.TitleIew + } + qTitleIew := qrTitleIew + if qTitleIew != "" { + + if err := r.SetQueryParam("title__iew", qTitleIew); err != nil { + return err + } + } + } + + if o.TitleIsw != nil { + + // query param title__isw + var qrTitleIsw string + + if o.TitleIsw != nil { + qrTitleIsw = *o.TitleIsw + } + qTitleIsw := qrTitleIsw + if qTitleIsw != "" { + + if err := r.SetQueryParam("title__isw", qTitleIsw); err != nil { + return err + } + } + } + + if o.Titlen != nil { + + // query param title__n + var qrTitlen string + + if o.Titlen != nil { + qrTitlen = *o.Titlen + } + qTitlen := qrTitlen + if qTitlen != "" { + + if err := r.SetQueryParam("title__n", qTitlen); err != nil { + return err + } + } + } + + if o.TitleNic != nil { + + // query param title__nic + var qrTitleNic string + + if o.TitleNic != nil { + qrTitleNic = *o.TitleNic + } + qTitleNic := qrTitleNic + if qTitleNic != "" { + + if err := r.SetQueryParam("title__nic", qTitleNic); err != nil { + return err + } + } + } + + if o.TitleNie != nil { + + // query param title__nie + var qrTitleNie string + + if o.TitleNie != nil { + qrTitleNie = *o.TitleNie + } + qTitleNie := qrTitleNie + if qTitleNie != "" { + + if err := r.SetQueryParam("title__nie", qTitleNie); err != nil { + return err + } + } + } + + if o.TitleNiew != nil { + + // query param title__niew + var qrTitleNiew string + + if o.TitleNiew != nil { + qrTitleNiew = *o.TitleNiew + } + qTitleNiew := qrTitleNiew + if qTitleNiew != "" { + + if err := r.SetQueryParam("title__niew", qTitleNiew); err != nil { + return err + } + } + } + + if o.TitleNisw != nil { + + // query param title__nisw + var qrTitleNisw string + + if o.TitleNisw != nil { + qrTitleNisw = *o.TitleNisw + } + qTitleNisw := qrTitleNisw + if qTitleNisw != "" { + + if err := r.SetQueryParam("title__nisw", qTitleNisw); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_list_responses.go b/netbox/client/tenancy/tenancy_contacts_list_responses.go new file mode 100644 index 000000000..af5a308b0 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_list_responses.go @@ -0,0 +1,247 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsListReader is a Reader for the TenancyContactsList structure. +type TenancyContactsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsListOK creates a TenancyContactsListOK with default headers values +func NewTenancyContactsListOK() *TenancyContactsListOK { + return &TenancyContactsListOK{} +} + +/* TenancyContactsListOK describes a response with status code 200, with default header values. + +TenancyContactsListOK tenancy contacts list o k +*/ +type TenancyContactsListOK struct { + Payload *TenancyContactsListOKBody +} + +func (o *TenancyContactsListOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contacts/][%d] tenancyContactsListOK %+v", 200, o.Payload) +} +func (o *TenancyContactsListOK) GetPayload() *TenancyContactsListOKBody { + return o.Payload +} + +func (o *TenancyContactsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(TenancyContactsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*TenancyContactsListOKBody tenancy contacts list o k body +swagger:model TenancyContactsListOKBody +*/ +type TenancyContactsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.Contact `json:"results"` +} + +// Validate validates this tenancy contacts list o k body +func (o *TenancyContactsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("tenancyContactsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *TenancyContactsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("tenancyContactsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this tenancy contacts list o k body based on the context it is used +func (o *TenancyContactsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *TenancyContactsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenancyContactsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyContactsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *TenancyContactsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *TenancyContactsListOKBody) UnmarshalBinary(b []byte) error { + var res TenancyContactsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_partial_update_parameters.go b/netbox/client/tenancy/tenancy_contacts_partial_update_parameters.go new file mode 100644 index 000000000..80bba433c --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactsPartialUpdateParams creates a new TenancyContactsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsPartialUpdateParams() *TenancyContactsPartialUpdateParams { + return &TenancyContactsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsPartialUpdateParamsWithTimeout creates a new TenancyContactsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsPartialUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactsPartialUpdateParams { + return &TenancyContactsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactsPartialUpdateParamsWithContext creates a new TenancyContactsPartialUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactsPartialUpdateParamsWithContext(ctx context.Context) *TenancyContactsPartialUpdateParams { + return &TenancyContactsPartialUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactsPartialUpdateParamsWithHTTPClient creates a new TenancyContactsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsPartialUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactsPartialUpdateParams { + return &TenancyContactsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactsPartialUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contacts partial update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsPartialUpdateParams struct { + + // Data. + Data *models.WritableContact + + /* ID. + + A unique integer value identifying this contact. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsPartialUpdateParams) WithDefaults() *TenancyContactsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) WithContext(ctx context.Context) *TenancyContactsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) WithData(data *models.WritableContact) *TenancyContactsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) SetData(data *models.WritableContact) { + o.Data = data +} + +// WithID adds the id to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) WithID(id int64) *TenancyContactsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contacts partial update params +func (o *TenancyContactsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contacts_partial_update_responses.go b/netbox/client/tenancy/tenancy_contacts_partial_update_responses.go new file mode 100644 index 000000000..2a99f6158 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsPartialUpdateReader is a Reader for the TenancyContactsPartialUpdate structure. +type TenancyContactsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsPartialUpdateOK creates a TenancyContactsPartialUpdateOK with default headers values +func NewTenancyContactsPartialUpdateOK() *TenancyContactsPartialUpdateOK { + return &TenancyContactsPartialUpdateOK{} +} + +/* TenancyContactsPartialUpdateOK describes a response with status code 200, with default header values. + +TenancyContactsPartialUpdateOK tenancy contacts partial update o k +*/ +type TenancyContactsPartialUpdateOK struct { + Payload *models.Contact +} + +func (o *TenancyContactsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /tenancy/contacts/{id}/][%d] tenancyContactsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactsPartialUpdateOK) GetPayload() *models.Contact { + return o.Payload +} + +func (o *TenancyContactsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Contact) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_read_parameters.go b/netbox/client/tenancy/tenancy_contacts_read_parameters.go new file mode 100644 index 000000000..934270df5 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_read_parameters.go @@ -0,0 +1,165 @@ +// 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 tenancy + +// 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" +) + +// NewTenancyContactsReadParams creates a new TenancyContactsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsReadParams() *TenancyContactsReadParams { + return &TenancyContactsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsReadParamsWithTimeout creates a new TenancyContactsReadParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsReadParamsWithTimeout(timeout time.Duration) *TenancyContactsReadParams { + return &TenancyContactsReadParams{ + timeout: timeout, + } +} + +// NewTenancyContactsReadParamsWithContext creates a new TenancyContactsReadParams object +// with the ability to set a context for a request. +func NewTenancyContactsReadParamsWithContext(ctx context.Context) *TenancyContactsReadParams { + return &TenancyContactsReadParams{ + Context: ctx, + } +} + +// NewTenancyContactsReadParamsWithHTTPClient creates a new TenancyContactsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsReadParamsWithHTTPClient(client *http.Client) *TenancyContactsReadParams { + return &TenancyContactsReadParams{ + HTTPClient: client, + } +} + +/* TenancyContactsReadParams contains all the parameters to send to the API endpoint + for the tenancy contacts read operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsReadParams struct { + + /* ID. + + A unique integer value identifying this contact. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsReadParams) WithDefaults() *TenancyContactsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts read params +func (o *TenancyContactsReadParams) WithTimeout(timeout time.Duration) *TenancyContactsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts read params +func (o *TenancyContactsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts read params +func (o *TenancyContactsReadParams) WithContext(ctx context.Context) *TenancyContactsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts read params +func (o *TenancyContactsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts read params +func (o *TenancyContactsReadParams) WithHTTPClient(client *http.Client) *TenancyContactsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts read params +func (o *TenancyContactsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the tenancy contacts read params +func (o *TenancyContactsReadParams) WithID(id int64) *TenancyContactsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contacts read params +func (o *TenancyContactsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsReadParams) 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/netbox/client/tenancy/tenancy_contacts_read_responses.go b/netbox/client/tenancy/tenancy_contacts_read_responses.go new file mode 100644 index 000000000..c72cc44e9 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_read_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsReadReader is a Reader for the TenancyContactsRead structure. +type TenancyContactsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsReadOK creates a TenancyContactsReadOK with default headers values +func NewTenancyContactsReadOK() *TenancyContactsReadOK { + return &TenancyContactsReadOK{} +} + +/* TenancyContactsReadOK describes a response with status code 200, with default header values. + +TenancyContactsReadOK tenancy contacts read o k +*/ +type TenancyContactsReadOK struct { + Payload *models.Contact +} + +func (o *TenancyContactsReadOK) Error() string { + return fmt.Sprintf("[GET /tenancy/contacts/{id}/][%d] tenancyContactsReadOK %+v", 200, o.Payload) +} +func (o *TenancyContactsReadOK) GetPayload() *models.Contact { + return o.Payload +} + +func (o *TenancyContactsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Contact) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_contacts_update_parameters.go b/netbox/client/tenancy/tenancy_contacts_update_parameters.go new file mode 100644 index 000000000..98151864a --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_update_parameters.go @@ -0,0 +1,186 @@ +// 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 tenancy + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewTenancyContactsUpdateParams creates a new TenancyContactsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewTenancyContactsUpdateParams() *TenancyContactsUpdateParams { + return &TenancyContactsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewTenancyContactsUpdateParamsWithTimeout creates a new TenancyContactsUpdateParams object +// with the ability to set a timeout on a request. +func NewTenancyContactsUpdateParamsWithTimeout(timeout time.Duration) *TenancyContactsUpdateParams { + return &TenancyContactsUpdateParams{ + timeout: timeout, + } +} + +// NewTenancyContactsUpdateParamsWithContext creates a new TenancyContactsUpdateParams object +// with the ability to set a context for a request. +func NewTenancyContactsUpdateParamsWithContext(ctx context.Context) *TenancyContactsUpdateParams { + return &TenancyContactsUpdateParams{ + Context: ctx, + } +} + +// NewTenancyContactsUpdateParamsWithHTTPClient creates a new TenancyContactsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewTenancyContactsUpdateParamsWithHTTPClient(client *http.Client) *TenancyContactsUpdateParams { + return &TenancyContactsUpdateParams{ + HTTPClient: client, + } +} + +/* TenancyContactsUpdateParams contains all the parameters to send to the API endpoint + for the tenancy contacts update operation. + + Typically these are written to a http.Request. +*/ +type TenancyContactsUpdateParams struct { + + // Data. + Data *models.WritableContact + + /* ID. + + A unique integer value identifying this contact. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the tenancy contacts update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsUpdateParams) WithDefaults() *TenancyContactsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the tenancy contacts update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *TenancyContactsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) WithTimeout(timeout time.Duration) *TenancyContactsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) WithContext(ctx context.Context) *TenancyContactsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) WithHTTPClient(client *http.Client) *TenancyContactsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) WithData(data *models.WritableContact) *TenancyContactsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) SetData(data *models.WritableContact) { + o.Data = data +} + +// WithID adds the id to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) WithID(id int64) *TenancyContactsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the tenancy contacts update params +func (o *TenancyContactsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *TenancyContactsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/tenancy/tenancy_contacts_update_responses.go b/netbox/client/tenancy/tenancy_contacts_update_responses.go new file mode 100644 index 000000000..038a693b2 --- /dev/null +++ b/netbox/client/tenancy/tenancy_contacts_update_responses.go @@ -0,0 +1,82 @@ +// 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 tenancy + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// TenancyContactsUpdateReader is a Reader for the TenancyContactsUpdate structure. +type TenancyContactsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenancyContactsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenancyContactsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewTenancyContactsUpdateOK creates a TenancyContactsUpdateOK with default headers values +func NewTenancyContactsUpdateOK() *TenancyContactsUpdateOK { + return &TenancyContactsUpdateOK{} +} + +/* TenancyContactsUpdateOK describes a response with status code 200, with default header values. + +TenancyContactsUpdateOK tenancy contacts update o k +*/ +type TenancyContactsUpdateOK struct { + Payload *models.Contact +} + +func (o *TenancyContactsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /tenancy/contacts/{id}/][%d] tenancyContactsUpdateOK %+v", 200, o.Payload) +} +func (o *TenancyContactsUpdateOK) GetPayload() *models.Contact { + return o.Payload +} + +func (o *TenancyContactsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Contact) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go b/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go index 76d6b80db..faae8fe44 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_list_parameters.go @@ -87,9 +87,6 @@ type TenancyTenantGroupsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +150,6 @@ type TenancyTenantGroupsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -207,9 +201,6 @@ type TenancyTenantGroupsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -237,6 +228,12 @@ type TenancyTenantGroupsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -334,17 +331,6 @@ func (o *TenancyTenantGroupsListParams) SetDescription(description *string) { o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the tenancy tenant groups list params -func (o *TenancyTenantGroupsListParams) WithDescriptionEmpty(descriptionEmpty *string) *TenancyTenantGroupsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the tenancy tenant groups list params -func (o *TenancyTenantGroupsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithDescriptionIc(descriptionIc *string) *TenancyTenantGroupsListParams { o.SetDescriptionIc(descriptionIc) @@ -565,17 +551,6 @@ func (o *TenancyTenantGroupsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the tenancy tenant groups list params -func (o *TenancyTenantGroupsListParams) WithNameEmpty(nameEmpty *string) *TenancyTenantGroupsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the tenancy tenant groups list params -func (o *TenancyTenantGroupsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithNameIc(nameIc *string) *TenancyTenantGroupsListParams { o.SetNameIc(nameIc) @@ -752,17 +727,6 @@ func (o *TenancyTenantGroupsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the tenancy tenant groups list params -func (o *TenancyTenantGroupsListParams) WithSlugEmpty(slugEmpty *string) *TenancyTenantGroupsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the tenancy tenant groups list params -func (o *TenancyTenantGroupsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the tenancy tenant groups list params func (o *TenancyTenantGroupsListParams) WithSlugIc(slugIc *string) *TenancyTenantGroupsListParams { o.SetSlugIc(slugIc) @@ -862,6 +826,28 @@ func (o *TenancyTenantGroupsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithTag(tag *string) *TenancyTenantGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) WithTagn(tagn *string) *TenancyTenantGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the tenancy tenant groups list params +func (o *TenancyTenantGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -938,23 +924,6 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1295,23 +1264,6 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1584,23 +1536,6 @@ func (o *TenancyTenantGroupsListParams) WriteToRequest(r runtime.ClientRequest, } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1754,6 +1689,40 @@ func (o *TenancyTenantGroupsListParams) 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 len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go b/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go index b7a22826f..d1a1299b1 100644 --- a/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go +++ b/netbox/client/tenancy/tenancy_tenant_groups_list_responses.go @@ -182,6 +182,8 @@ func (o *TenancyTenantGroupsListOKBody) validateResults(formats strfmt.Registry) if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenancyTenantGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyTenantGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *TenancyTenantGroupsListOKBody) contextValidateResults(ctx context.Conte if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenancyTenantGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyTenantGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/tenancy/tenancy_tenants_list_parameters.go b/netbox/client/tenancy/tenancy_tenants_list_parameters.go index 0741a4147..328dfb369 100644 --- a/netbox/client/tenancy/tenancy_tenants_list_parameters.go +++ b/netbox/client/tenancy/tenancy_tenants_list_parameters.go @@ -75,6 +75,18 @@ func NewTenancyTenantsListParamsWithHTTPClient(client *http.Client) *TenancyTena */ type TenancyTenantsListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -84,6 +96,36 @@ type TenancyTenantsListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Group. Group *string @@ -132,9 +174,6 @@ type TenancyTenantsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -174,9 +213,6 @@ type TenancyTenantsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -263,6 +299,50 @@ func (o *TenancyTenantsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithContact(contact *string) *TenancyTenantsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithContactn(contactn *string) *TenancyTenantsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithContactRole(contactRole *string) *TenancyTenantsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithContactRolen(contactRolen *string) *TenancyTenantsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the tenancy tenants list params func (o *TenancyTenantsListParams) WithCreated(created *string) *TenancyTenantsListParams { o.SetCreated(created) @@ -296,6 +376,116 @@ func (o *TenancyTenantsListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescription(description *string) *TenancyTenantsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionIc(descriptionIc *string) *TenancyTenantsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionIe(descriptionIe *string) *TenancyTenantsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionIew(descriptionIew *string) *TenancyTenantsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionIsw(descriptionIsw *string) *TenancyTenantsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionn(descriptionn *string) *TenancyTenantsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionNic(descriptionNic *string) *TenancyTenantsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionNie(descriptionNie *string) *TenancyTenantsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionNiew(descriptionNiew *string) *TenancyTenantsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the tenancy tenants list params +func (o *TenancyTenantsListParams) WithDescriptionNisw(descriptionNisw *string) *TenancyTenantsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the tenancy tenants list params +func (o *TenancyTenantsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithGroup adds the group to the tenancy tenants list params func (o *TenancyTenantsListParams) WithGroup(group *string) *TenancyTenantsListParams { o.SetGroup(group) @@ -461,17 +651,6 @@ func (o *TenancyTenantsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the tenancy tenants list params -func (o *TenancyTenantsListParams) WithNameEmpty(nameEmpty *string) *TenancyTenantsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the tenancy tenants list params -func (o *TenancyTenantsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the tenancy tenants list params func (o *TenancyTenantsListParams) WithNameIc(nameIc *string) *TenancyTenantsListParams { o.SetNameIc(nameIc) @@ -604,17 +783,6 @@ func (o *TenancyTenantsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the tenancy tenants list params -func (o *TenancyTenantsListParams) WithSlugEmpty(slugEmpty *string) *TenancyTenantsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the tenancy tenants list params -func (o *TenancyTenantsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the tenancy tenants list params func (o *TenancyTenantsListParams) WithSlugIc(slugIc *string) *TenancyTenantsListParams { o.SetSlugIc(slugIc) @@ -744,6 +912,74 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -795,6 +1031,176 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Group != nil { // query param group @@ -1050,23 +1456,6 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1271,23 +1660,6 @@ func (o *TenancyTenantsListParams) WriteToRequest(r runtime.ClientRequest, reg s } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic diff --git a/netbox/client/tenancy/tenancy_tenants_list_responses.go b/netbox/client/tenancy/tenancy_tenants_list_responses.go index 2b512a2ed..ea4010fdb 100644 --- a/netbox/client/tenancy/tenancy_tenants_list_responses.go +++ b/netbox/client/tenancy/tenancy_tenants_list_responses.go @@ -182,6 +182,8 @@ func (o *TenancyTenantsListOKBody) validateResults(formats strfmt.Registry) erro if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenancyTenantsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyTenantsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *TenancyTenantsListOKBody) contextValidateResults(ctx context.Context, f if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenancyTenantsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenancyTenantsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/users/users_client.go b/netbox/client/users/users_client.go index 66b13ee6c..0aa60e742 100644 --- a/netbox/client/users/users_client.go +++ b/netbox/client/users/users_client.go @@ -138,7 +138,7 @@ func (a *Client) UsersConfigList(params *UsersConfigListParams, authInfo runtime PathPattern: "/users/config/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersConfigListReader{formats: a.formats}, AuthInfo: authInfo, @@ -177,7 +177,7 @@ func (a *Client) UsersGroupsBulkDelete(params *UsersGroupsBulkDeleteParams, auth PathPattern: "/users/groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -216,7 +216,7 @@ func (a *Client) UsersGroupsBulkPartialUpdate(params *UsersGroupsBulkPartialUpda PathPattern: "/users/groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -255,7 +255,7 @@ func (a *Client) UsersGroupsBulkUpdate(params *UsersGroupsBulkUpdateParams, auth PathPattern: "/users/groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -294,7 +294,7 @@ func (a *Client) UsersGroupsCreate(params *UsersGroupsCreateParams, authInfo run PathPattern: "/users/groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -333,7 +333,7 @@ func (a *Client) UsersGroupsDelete(params *UsersGroupsDeleteParams, authInfo run PathPattern: "/users/groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -372,7 +372,7 @@ func (a *Client) UsersGroupsList(params *UsersGroupsListParams, authInfo runtime PathPattern: "/users/groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -411,7 +411,7 @@ func (a *Client) UsersGroupsPartialUpdate(params *UsersGroupsPartialUpdateParams PathPattern: "/users/groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -450,7 +450,7 @@ func (a *Client) UsersGroupsRead(params *UsersGroupsReadParams, authInfo runtime PathPattern: "/users/groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -489,7 +489,7 @@ func (a *Client) UsersGroupsUpdate(params *UsersGroupsUpdateParams, authInfo run PathPattern: "/users/groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -528,7 +528,7 @@ func (a *Client) UsersPermissionsBulkDelete(params *UsersPermissionsBulkDeletePa PathPattern: "/users/permissions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -567,7 +567,7 @@ func (a *Client) UsersPermissionsBulkPartialUpdate(params *UsersPermissionsBulkP PathPattern: "/users/permissions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -606,7 +606,7 @@ func (a *Client) UsersPermissionsBulkUpdate(params *UsersPermissionsBulkUpdatePa PathPattern: "/users/permissions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -645,7 +645,7 @@ func (a *Client) UsersPermissionsCreate(params *UsersPermissionsCreateParams, au PathPattern: "/users/permissions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -684,7 +684,7 @@ func (a *Client) UsersPermissionsDelete(params *UsersPermissionsDeleteParams, au PathPattern: "/users/permissions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -723,7 +723,7 @@ func (a *Client) UsersPermissionsList(params *UsersPermissionsListParams, authIn PathPattern: "/users/permissions/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -762,7 +762,7 @@ func (a *Client) UsersPermissionsPartialUpdate(params *UsersPermissionsPartialUp PathPattern: "/users/permissions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -801,7 +801,7 @@ func (a *Client) UsersPermissionsRead(params *UsersPermissionsReadParams, authIn PathPattern: "/users/permissions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -840,7 +840,7 @@ func (a *Client) UsersPermissionsUpdate(params *UsersPermissionsUpdateParams, au PathPattern: "/users/permissions/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersPermissionsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -879,7 +879,7 @@ func (a *Client) UsersTokensBulkDelete(params *UsersTokensBulkDeleteParams, auth PathPattern: "/users/tokens/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -918,7 +918,7 @@ func (a *Client) UsersTokensBulkPartialUpdate(params *UsersTokensBulkPartialUpda PathPattern: "/users/tokens/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -957,7 +957,7 @@ func (a *Client) UsersTokensBulkUpdate(params *UsersTokensBulkUpdateParams, auth PathPattern: "/users/tokens/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -996,7 +996,7 @@ func (a *Client) UsersTokensCreate(params *UsersTokensCreateParams, authInfo run PathPattern: "/users/tokens/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1035,7 +1035,7 @@ func (a *Client) UsersTokensDelete(params *UsersTokensDeleteParams, authInfo run PathPattern: "/users/tokens/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1074,7 +1074,7 @@ func (a *Client) UsersTokensList(params *UsersTokensListParams, authInfo runtime PathPattern: "/users/tokens/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1113,7 +1113,7 @@ func (a *Client) UsersTokensPartialUpdate(params *UsersTokensPartialUpdateParams PathPattern: "/users/tokens/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1152,7 +1152,7 @@ func (a *Client) UsersTokensProvisionCreate(params *UsersTokensProvisionCreatePa PathPattern: "/users/tokens/provision/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensProvisionCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1191,7 +1191,7 @@ func (a *Client) UsersTokensRead(params *UsersTokensReadParams, authInfo runtime PathPattern: "/users/tokens/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1230,7 +1230,7 @@ func (a *Client) UsersTokensUpdate(params *UsersTokensUpdateParams, authInfo run PathPattern: "/users/tokens/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersTokensUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1269,7 +1269,7 @@ func (a *Client) UsersUsersBulkDelete(params *UsersUsersBulkDeleteParams, authIn PathPattern: "/users/users/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1308,7 +1308,7 @@ func (a *Client) UsersUsersBulkPartialUpdate(params *UsersUsersBulkPartialUpdate PathPattern: "/users/users/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1347,7 +1347,7 @@ func (a *Client) UsersUsersBulkUpdate(params *UsersUsersBulkUpdateParams, authIn PathPattern: "/users/users/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1386,7 +1386,7 @@ func (a *Client) UsersUsersCreate(params *UsersUsersCreateParams, authInfo runti PathPattern: "/users/users/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1425,7 +1425,7 @@ func (a *Client) UsersUsersDelete(params *UsersUsersDeleteParams, authInfo runti PathPattern: "/users/users/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1464,7 +1464,7 @@ func (a *Client) UsersUsersList(params *UsersUsersListParams, authInfo runtime.C PathPattern: "/users/users/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1503,7 +1503,7 @@ func (a *Client) UsersUsersPartialUpdate(params *UsersUsersPartialUpdateParams, PathPattern: "/users/users/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1542,7 +1542,7 @@ func (a *Client) UsersUsersRead(params *UsersUsersReadParams, authInfo runtime.C PathPattern: "/users/users/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1581,7 +1581,7 @@ func (a *Client) UsersUsersUpdate(params *UsersUsersUpdateParams, authInfo runti PathPattern: "/users/users/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &UsersUsersUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/users/users_groups_list_responses.go b/netbox/client/users/users_groups_list_responses.go index d06821074..943b52cc9 100644 --- a/netbox/client/users/users_groups_list_responses.go +++ b/netbox/client/users/users_groups_list_responses.go @@ -182,6 +182,8 @@ func (o *UsersGroupsListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *UsersGroupsListOKBody) contextValidateResults(ctx context.Context, form if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/users/users_permissions_list_parameters.go b/netbox/client/users/users_permissions_list_parameters.go index 242f66196..585e07c19 100644 --- a/netbox/client/users/users_permissions_list_parameters.go +++ b/netbox/client/users/users_permissions_list_parameters.go @@ -75,6 +75,39 @@ func NewUsersPermissionsListParamsWithHTTPClient(client *http.Client) *UsersPerm */ type UsersPermissionsListParams struct { + // Description. + Description *string + + // DescriptionEmpty. + DescriptionEmpty *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Enabled. Enabled *string @@ -159,6 +192,9 @@ type UsersPermissionsListParams struct { */ Offset *int64 + // Q. + Q *string + // User. User *string @@ -224,6 +260,127 @@ func (o *UsersPermissionsListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithDescription adds the description to the users permissions list params +func (o *UsersPermissionsListParams) WithDescription(description *string) *UsersPermissionsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the users permissions list params +func (o *UsersPermissionsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionEmpty adds the descriptionEmpty to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionEmpty(descriptionEmpty *string) *UsersPermissionsListParams { + o.SetDescriptionEmpty(descriptionEmpty) + return o +} + +// SetDescriptionEmpty adds the descriptionEmpty to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionEmpty(descriptionEmpty *string) { + o.DescriptionEmpty = descriptionEmpty +} + +// WithDescriptionIc adds the descriptionIc to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionIc(descriptionIc *string) *UsersPermissionsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionIe(descriptionIe *string) *UsersPermissionsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionIew(descriptionIew *string) *UsersPermissionsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionIsw(descriptionIsw *string) *UsersPermissionsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionn(descriptionn *string) *UsersPermissionsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionNic(descriptionNic *string) *UsersPermissionsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionNie(descriptionNie *string) *UsersPermissionsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionNiew(descriptionNiew *string) *UsersPermissionsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the users permissions list params +func (o *UsersPermissionsListParams) WithDescriptionNisw(descriptionNisw *string) *UsersPermissionsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the users permissions list params +func (o *UsersPermissionsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithEnabled adds the enabled to the users permissions list params func (o *UsersPermissionsListParams) WithEnabled(enabled *string) *UsersPermissionsListParams { o.SetEnabled(enabled) @@ -510,6 +667,17 @@ func (o *UsersPermissionsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithQ adds the q to the users permissions list params +func (o *UsersPermissionsListParams) WithQ(q *string) *UsersPermissionsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the users permissions list params +func (o *UsersPermissionsListParams) SetQ(q *string) { + o.Q = q +} + // WithUser adds the user to the users permissions list params func (o *UsersPermissionsListParams) WithUser(user *string) *UsersPermissionsListParams { o.SetUser(user) @@ -562,6 +730,193 @@ func (o *UsersPermissionsListParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionEmpty != nil { + + // query param description__empty + var qrDescriptionEmpty string + + if o.DescriptionEmpty != nil { + qrDescriptionEmpty = *o.DescriptionEmpty + } + qDescriptionEmpty := qrDescriptionEmpty + if qDescriptionEmpty != "" { + + if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Enabled != nil { // query param enabled @@ -1004,6 +1359,23 @@ func (o *UsersPermissionsListParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + if o.User != nil { // query param user diff --git a/netbox/client/users/users_permissions_list_responses.go b/netbox/client/users/users_permissions_list_responses.go index 2d2045c68..bf92d224d 100644 --- a/netbox/client/users/users_permissions_list_responses.go +++ b/netbox/client/users/users_permissions_list_responses.go @@ -182,6 +182,8 @@ func (o *UsersPermissionsListOKBody) validateResults(formats strfmt.Registry) er if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersPermissionsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersPermissionsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *UsersPermissionsListOKBody) contextValidateResults(ctx context.Context, if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersPermissionsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersPermissionsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/users/users_tokens_list_parameters.go b/netbox/client/users/users_tokens_list_parameters.go index dc2ae9d35..eb84ec110 100644 --- a/netbox/client/users/users_tokens_list_parameters.go +++ b/netbox/client/users/users_tokens_list_parameters.go @@ -84,6 +84,39 @@ type UsersTokensListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionEmpty. + DescriptionEmpty *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Expires. Expires *string @@ -260,6 +293,127 @@ func (o *UsersTokensListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the users tokens list params +func (o *UsersTokensListParams) WithDescription(description *string) *UsersTokensListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the users tokens list params +func (o *UsersTokensListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionEmpty adds the descriptionEmpty to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionEmpty(descriptionEmpty *string) *UsersTokensListParams { + o.SetDescriptionEmpty(descriptionEmpty) + return o +} + +// SetDescriptionEmpty adds the descriptionEmpty to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionEmpty(descriptionEmpty *string) { + o.DescriptionEmpty = descriptionEmpty +} + +// WithDescriptionIc adds the descriptionIc to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionIc(descriptionIc *string) *UsersTokensListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionIe(descriptionIe *string) *UsersTokensListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionIew(descriptionIew *string) *UsersTokensListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionIsw(descriptionIsw *string) *UsersTokensListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionn(descriptionn *string) *UsersTokensListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionNic(descriptionNic *string) *UsersTokensListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionNie(descriptionNie *string) *UsersTokensListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionNiew(descriptionNiew *string) *UsersTokensListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the users tokens list params +func (o *UsersTokensListParams) WithDescriptionNisw(descriptionNisw *string) *UsersTokensListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the users tokens list params +func (o *UsersTokensListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithExpires adds the expires to the users tokens list params func (o *UsersTokensListParams) WithExpires(expires *string) *UsersTokensListParams { o.SetExpires(expires) @@ -627,6 +781,193 @@ func (o *UsersTokensListParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionEmpty != nil { + + // query param description__empty + var qrDescriptionEmpty string + + if o.DescriptionEmpty != nil { + qrDescriptionEmpty = *o.DescriptionEmpty + } + qDescriptionEmpty := qrDescriptionEmpty + if qDescriptionEmpty != "" { + + if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Expires != nil { // query param expires diff --git a/netbox/client/users/users_tokens_list_responses.go b/netbox/client/users/users_tokens_list_responses.go index a7a58a35a..10c319a93 100644 --- a/netbox/client/users/users_tokens_list_responses.go +++ b/netbox/client/users/users_tokens_list_responses.go @@ -182,6 +182,8 @@ func (o *UsersTokensListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersTokensListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersTokensListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *UsersTokensListOKBody) contextValidateResults(ctx context.Context, form if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersTokensListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersTokensListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/users/users_users_list_responses.go b/netbox/client/users/users_users_list_responses.go index d7e2a4dd5..d7c42905f 100644 --- a/netbox/client/users/users_users_list_responses.go +++ b/netbox/client/users/users_users_list_responses.go @@ -182,6 +182,8 @@ func (o *UsersUsersListOKBody) validateResults(formats strfmt.Registry) error { if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersUsersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersUsersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *UsersUsersListOKBody) contextValidateResults(ctx context.Context, forma if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usersUsersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("usersUsersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/virtualization/virtualization_client.go b/netbox/client/virtualization/virtualization_client.go index dd6a9c76a..9c3fe1f6a 100644 --- a/netbox/client/virtualization/virtualization_client.go +++ b/netbox/client/virtualization/virtualization_client.go @@ -152,7 +152,7 @@ func (a *Client) VirtualizationClusterGroupsBulkDelete(params *VirtualizationClu PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -191,7 +191,7 @@ func (a *Client) VirtualizationClusterGroupsBulkPartialUpdate(params *Virtualiza PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -230,7 +230,7 @@ func (a *Client) VirtualizationClusterGroupsBulkUpdate(params *VirtualizationClu PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -269,7 +269,7 @@ func (a *Client) VirtualizationClusterGroupsCreate(params *VirtualizationCluster PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -308,7 +308,7 @@ func (a *Client) VirtualizationClusterGroupsDelete(params *VirtualizationCluster PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -347,7 +347,7 @@ func (a *Client) VirtualizationClusterGroupsList(params *VirtualizationClusterGr PathPattern: "/virtualization/cluster-groups/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsListReader{formats: a.formats}, AuthInfo: authInfo, @@ -386,7 +386,7 @@ func (a *Client) VirtualizationClusterGroupsPartialUpdate(params *Virtualization PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -425,7 +425,7 @@ func (a *Client) VirtualizationClusterGroupsRead(params *VirtualizationClusterGr PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -464,7 +464,7 @@ func (a *Client) VirtualizationClusterGroupsUpdate(params *VirtualizationCluster PathPattern: "/virtualization/cluster-groups/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterGroupsUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -503,7 +503,7 @@ func (a *Client) VirtualizationClusterTypesBulkDelete(params *VirtualizationClus PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -542,7 +542,7 @@ func (a *Client) VirtualizationClusterTypesBulkPartialUpdate(params *Virtualizat PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -581,7 +581,7 @@ func (a *Client) VirtualizationClusterTypesBulkUpdate(params *VirtualizationClus PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -620,7 +620,7 @@ func (a *Client) VirtualizationClusterTypesCreate(params *VirtualizationClusterT PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -659,7 +659,7 @@ func (a *Client) VirtualizationClusterTypesDelete(params *VirtualizationClusterT PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -698,7 +698,7 @@ func (a *Client) VirtualizationClusterTypesList(params *VirtualizationClusterTyp PathPattern: "/virtualization/cluster-types/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -737,7 +737,7 @@ func (a *Client) VirtualizationClusterTypesPartialUpdate(params *VirtualizationC PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -776,7 +776,7 @@ func (a *Client) VirtualizationClusterTypesRead(params *VirtualizationClusterTyp PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -815,7 +815,7 @@ func (a *Client) VirtualizationClusterTypesUpdate(params *VirtualizationClusterT PathPattern: "/virtualization/cluster-types/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClusterTypesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -854,7 +854,7 @@ func (a *Client) VirtualizationClustersBulkDelete(params *VirtualizationClusters PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -893,7 +893,7 @@ func (a *Client) VirtualizationClustersBulkPartialUpdate(params *VirtualizationC PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -932,7 +932,7 @@ func (a *Client) VirtualizationClustersBulkUpdate(params *VirtualizationClusters PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -971,7 +971,7 @@ func (a *Client) VirtualizationClustersCreate(params *VirtualizationClustersCrea PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1010,7 +1010,7 @@ func (a *Client) VirtualizationClustersDelete(params *VirtualizationClustersDele PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1049,7 +1049,7 @@ func (a *Client) VirtualizationClustersList(params *VirtualizationClustersListPa PathPattern: "/virtualization/clusters/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1088,7 +1088,7 @@ func (a *Client) VirtualizationClustersPartialUpdate(params *VirtualizationClust PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1127,7 +1127,7 @@ func (a *Client) VirtualizationClustersRead(params *VirtualizationClustersReadPa PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1166,7 +1166,7 @@ func (a *Client) VirtualizationClustersUpdate(params *VirtualizationClustersUpda PathPattern: "/virtualization/clusters/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationClustersUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1205,7 +1205,7 @@ func (a *Client) VirtualizationInterfacesBulkDelete(params *VirtualizationInterf PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1244,7 +1244,7 @@ func (a *Client) VirtualizationInterfacesBulkPartialUpdate(params *Virtualizatio PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1283,7 +1283,7 @@ func (a *Client) VirtualizationInterfacesBulkUpdate(params *VirtualizationInterf PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1322,7 +1322,7 @@ func (a *Client) VirtualizationInterfacesCreate(params *VirtualizationInterfaces PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1361,7 +1361,7 @@ func (a *Client) VirtualizationInterfacesDelete(params *VirtualizationInterfaces PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1400,7 +1400,7 @@ func (a *Client) VirtualizationInterfacesList(params *VirtualizationInterfacesLi PathPattern: "/virtualization/interfaces/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1439,7 +1439,7 @@ func (a *Client) VirtualizationInterfacesPartialUpdate(params *VirtualizationInt PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1478,7 +1478,7 @@ func (a *Client) VirtualizationInterfacesRead(params *VirtualizationInterfacesRe PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1517,7 +1517,7 @@ func (a *Client) VirtualizationInterfacesUpdate(params *VirtualizationInterfaces PathPattern: "/virtualization/interfaces/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationInterfacesUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1556,7 +1556,7 @@ func (a *Client) VirtualizationVirtualMachinesBulkDelete(params *VirtualizationV PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesBulkDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1595,7 +1595,7 @@ func (a *Client) VirtualizationVirtualMachinesBulkPartialUpdate(params *Virtuali PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesBulkPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1634,7 +1634,7 @@ func (a *Client) VirtualizationVirtualMachinesBulkUpdate(params *VirtualizationV PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesBulkUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1673,7 +1673,7 @@ func (a *Client) VirtualizationVirtualMachinesCreate(params *VirtualizationVirtu PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesCreateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1712,7 +1712,7 @@ func (a *Client) VirtualizationVirtualMachinesDelete(params *VirtualizationVirtu PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesDeleteReader{formats: a.formats}, AuthInfo: authInfo, @@ -1751,7 +1751,7 @@ func (a *Client) VirtualizationVirtualMachinesList(params *VirtualizationVirtual PathPattern: "/virtualization/virtual-machines/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesListReader{formats: a.formats}, AuthInfo: authInfo, @@ -1790,7 +1790,7 @@ func (a *Client) VirtualizationVirtualMachinesPartialUpdate(params *Virtualizati PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesPartialUpdateReader{formats: a.formats}, AuthInfo: authInfo, @@ -1829,7 +1829,7 @@ func (a *Client) VirtualizationVirtualMachinesRead(params *VirtualizationVirtual PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesReadReader{formats: a.formats}, AuthInfo: authInfo, @@ -1868,7 +1868,7 @@ func (a *Client) VirtualizationVirtualMachinesUpdate(params *VirtualizationVirtu PathPattern: "/virtualization/virtual-machines/{id}/", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, + Schemes: []string{"https"}, Params: params, Reader: &VirtualizationVirtualMachinesUpdateReader{formats: a.formats}, AuthInfo: authInfo, diff --git a/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go index 178680742..f28bae944 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go @@ -75,6 +75,18 @@ func NewVirtualizationClusterGroupsListParamsWithHTTPClient(client *http.Client) */ type VirtualizationClusterGroupsListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -87,9 +99,6 @@ type VirtualizationClusterGroupsListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +162,6 @@ type VirtualizationClusterGroupsListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -195,9 +201,6 @@ type VirtualizationClusterGroupsListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -225,6 +228,12 @@ type VirtualizationClusterGroupsListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -278,6 +287,50 @@ func (o *VirtualizationClusterGroupsListParams) SetHTTPClient(client *http.Clien o.HTTPClient = client } +// WithContact adds the contact to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithContact(contact *string) *VirtualizationClusterGroupsListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithContactn(contactn *string) *VirtualizationClusterGroupsListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithContactRole(contactRole *string) *VirtualizationClusterGroupsListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithContactRolen(contactRolen *string) *VirtualizationClusterGroupsListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithCreated(created *string) *VirtualizationClusterGroupsListParams { o.SetCreated(created) @@ -322,17 +375,6 @@ func (o *VirtualizationClusterGroupsListParams) SetDescription(description *stri o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the virtualization cluster groups list params -func (o *VirtualizationClusterGroupsListParams) WithDescriptionEmpty(descriptionEmpty *string) *VirtualizationClusterGroupsListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the virtualization cluster groups list params -func (o *VirtualizationClusterGroupsListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithDescriptionIc(descriptionIc *string) *VirtualizationClusterGroupsListParams { o.SetDescriptionIc(descriptionIc) @@ -553,17 +595,6 @@ func (o *VirtualizationClusterGroupsListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the virtualization cluster groups list params -func (o *VirtualizationClusterGroupsListParams) WithNameEmpty(nameEmpty *string) *VirtualizationClusterGroupsListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the virtualization cluster groups list params -func (o *VirtualizationClusterGroupsListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithNameIc(nameIc *string) *VirtualizationClusterGroupsListParams { o.SetNameIc(nameIc) @@ -696,17 +727,6 @@ func (o *VirtualizationClusterGroupsListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the virtualization cluster groups list params -func (o *VirtualizationClusterGroupsListParams) WithSlugEmpty(slugEmpty *string) *VirtualizationClusterGroupsListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the virtualization cluster groups list params -func (o *VirtualizationClusterGroupsListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithSlugIc(slugIc *string) *VirtualizationClusterGroupsListParams { o.SetSlugIc(slugIc) @@ -806,6 +826,28 @@ func (o *VirtualizationClusterGroupsListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithTag(tag *string) *VirtualizationClusterGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithTagn(tagn *string) *VirtualizationClusterGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -814,6 +856,74 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -882,23 +992,6 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1239,23 +1332,6 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1460,23 +1536,6 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1630,6 +1689,40 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } } + 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/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go b/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go index 7bde05ec2..4cdef9c7a 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_list_responses.go @@ -182,6 +182,8 @@ func (o *VirtualizationClusterGroupsListOKBody) validateResults(formats strfmt.R if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationClusterGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationClusterGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *VirtualizationClusterGroupsListOKBody) contextValidateResults(ctx conte if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationClusterGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationClusterGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go index a5a22eb8c..0972a7461 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go @@ -87,9 +87,6 @@ type VirtualizationClusterTypesListParams struct { // Description. Description *string - // DescriptionEmpty. - DescriptionEmpty *string - // DescriptionIc. DescriptionIc *string @@ -153,9 +150,6 @@ type VirtualizationClusterTypesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -195,9 +189,6 @@ type VirtualizationClusterTypesListParams struct { // Slug. Slug *string - // SlugEmpty. - SlugEmpty *string - // SlugIc. SlugIc *string @@ -225,6 +216,12 @@ type VirtualizationClusterTypesListParams struct { // SlugNisw. SlugNisw *string + // Tag. + Tag *string + + // Tagn. + Tagn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -322,17 +319,6 @@ func (o *VirtualizationClusterTypesListParams) SetDescription(description *strin o.Description = description } -// WithDescriptionEmpty adds the descriptionEmpty to the virtualization cluster types list params -func (o *VirtualizationClusterTypesListParams) WithDescriptionEmpty(descriptionEmpty *string) *VirtualizationClusterTypesListParams { - o.SetDescriptionEmpty(descriptionEmpty) - return o -} - -// SetDescriptionEmpty adds the descriptionEmpty to the virtualization cluster types list params -func (o *VirtualizationClusterTypesListParams) SetDescriptionEmpty(descriptionEmpty *string) { - o.DescriptionEmpty = descriptionEmpty -} - // WithDescriptionIc adds the descriptionIc to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithDescriptionIc(descriptionIc *string) *VirtualizationClusterTypesListParams { o.SetDescriptionIc(descriptionIc) @@ -553,17 +539,6 @@ func (o *VirtualizationClusterTypesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the virtualization cluster types list params -func (o *VirtualizationClusterTypesListParams) WithNameEmpty(nameEmpty *string) *VirtualizationClusterTypesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the virtualization cluster types list params -func (o *VirtualizationClusterTypesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithNameIc(nameIc *string) *VirtualizationClusterTypesListParams { o.SetNameIc(nameIc) @@ -696,17 +671,6 @@ func (o *VirtualizationClusterTypesListParams) SetSlug(slug *string) { o.Slug = slug } -// WithSlugEmpty adds the slugEmpty to the virtualization cluster types list params -func (o *VirtualizationClusterTypesListParams) WithSlugEmpty(slugEmpty *string) *VirtualizationClusterTypesListParams { - o.SetSlugEmpty(slugEmpty) - return o -} - -// SetSlugEmpty adds the slugEmpty to the virtualization cluster types list params -func (o *VirtualizationClusterTypesListParams) SetSlugEmpty(slugEmpty *string) { - o.SlugEmpty = slugEmpty -} - // WithSlugIc adds the slugIc to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithSlugIc(slugIc *string) *VirtualizationClusterTypesListParams { o.SetSlugIc(slugIc) @@ -806,6 +770,28 @@ func (o *VirtualizationClusterTypesListParams) SetSlugNisw(slugNisw *string) { o.SlugNisw = slugNisw } +// WithTag adds the tag to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithTag(tag *string) *VirtualizationClusterTypesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithTagn(tagn *string) *VirtualizationClusterTypesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -882,23 +868,6 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } - if o.DescriptionEmpty != nil { - - // query param description__empty - var qrDescriptionEmpty string - - if o.DescriptionEmpty != nil { - qrDescriptionEmpty = *o.DescriptionEmpty - } - qDescriptionEmpty := qrDescriptionEmpty - if qDescriptionEmpty != "" { - - if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { - return err - } - } - } - if o.DescriptionIc != nil { // query param description__ic @@ -1239,23 +1208,6 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1460,23 +1412,6 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } - if o.SlugEmpty != nil { - - // query param slug__empty - var qrSlugEmpty string - - if o.SlugEmpty != nil { - qrSlugEmpty = *o.SlugEmpty - } - qSlugEmpty := qrSlugEmpty - if qSlugEmpty != "" { - - if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { - return err - } - } - } - if o.SlugIc != nil { // query param slug__ic @@ -1630,6 +1565,40 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } } + 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/netbox/client/virtualization/virtualization_cluster_types_list_responses.go b/netbox/client/virtualization/virtualization_cluster_types_list_responses.go index a3e20d7ae..810b3455a 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_list_responses.go +++ b/netbox/client/virtualization/virtualization_cluster_types_list_responses.go @@ -182,6 +182,8 @@ func (o *VirtualizationClusterTypesListOKBody) validateResults(formats strfmt.Re if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationClusterTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationClusterTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *VirtualizationClusterTypesListOKBody) contextValidateResults(ctx contex if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationClusterTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationClusterTypesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/virtualization/virtualization_clusters_list_parameters.go b/netbox/client/virtualization/virtualization_clusters_list_parameters.go index 761631eea..b79708ac5 100644 --- a/netbox/client/virtualization/virtualization_clusters_list_parameters.go +++ b/netbox/client/virtualization/virtualization_clusters_list_parameters.go @@ -75,6 +75,18 @@ func NewVirtualizationClustersListParamsWithHTTPClient(client *http.Client) *Vir */ type VirtualizationClustersListParams struct { + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -132,9 +144,6 @@ type VirtualizationClustersListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -302,6 +311,50 @@ func (o *VirtualizationClustersListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithContact adds the contact to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithContact(contact *string) *VirtualizationClustersListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithContactn(contactn *string) *VirtualizationClustersListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithContactRole(contactRole *string) *VirtualizationClustersListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the virtualization clusters list params +func (o *VirtualizationClustersListParams) WithContactRolen(contactRolen *string) *VirtualizationClustersListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the virtualization clusters list params +func (o *VirtualizationClustersListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithCreated(created *string) *VirtualizationClustersListParams { o.SetCreated(created) @@ -500,17 +553,6 @@ func (o *VirtualizationClustersListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the virtualization clusters list params -func (o *VirtualizationClustersListParams) WithNameEmpty(nameEmpty *string) *VirtualizationClustersListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the virtualization clusters list params -func (o *VirtualizationClustersListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the virtualization clusters list params func (o *VirtualizationClustersListParams) WithNameIc(nameIc *string) *VirtualizationClustersListParams { o.SetNameIc(nameIc) @@ -926,6 +968,74 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } var res []error + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -1232,23 +1342,6 @@ func (o *VirtualizationClustersListParams) WriteToRequest(r runtime.ClientReques } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/virtualization/virtualization_clusters_list_responses.go b/netbox/client/virtualization/virtualization_clusters_list_responses.go index da1e71200..333a9ee0c 100644 --- a/netbox/client/virtualization/virtualization_clusters_list_responses.go +++ b/netbox/client/virtualization/virtualization_clusters_list_responses.go @@ -182,6 +182,8 @@ func (o *VirtualizationClustersListOKBody) validateResults(formats strfmt.Regist if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationClustersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationClustersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *VirtualizationClustersListOKBody) contextValidateResults(ctx context.Co if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationClustersListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationClustersListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/virtualization/virtualization_interfaces_list_parameters.go b/netbox/client/virtualization/virtualization_interfaces_list_parameters.go index bb7d7c86a..3a4ac1a3b 100644 --- a/netbox/client/virtualization/virtualization_interfaces_list_parameters.go +++ b/netbox/client/virtualization/virtualization_interfaces_list_parameters.go @@ -75,6 +75,12 @@ func NewVirtualizationInterfacesListParamsWithHTTPClient(client *http.Client) *V */ type VirtualizationInterfacesListParams struct { + // BridgeID. + BridgeID *string + + // BridgeIDn. + BridgeIDn *string + // Cluster. Cluster *string @@ -96,6 +102,36 @@ type VirtualizationInterfacesListParams struct { // CreatedLte. CreatedLte *string + // Description. + Description *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + // Enabled. Enabled *string @@ -183,9 +219,6 @@ type VirtualizationInterfacesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -246,6 +279,18 @@ type VirtualizationInterfacesListParams struct { // VirtualMachineIDn. VirtualMachineIDn *string + // Vrf. + Vrf *string + + // Vrfn. + Vrfn *string + + // VrfID. + VrfID *string + + // VrfIDn. + VrfIDn *string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -299,6 +344,28 @@ func (o *VirtualizationInterfacesListParams) SetHTTPClient(client *http.Client) o.HTTPClient = client } +// WithBridgeID adds the bridgeID to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithBridgeID(bridgeID *string) *VirtualizationInterfacesListParams { + o.SetBridgeID(bridgeID) + return o +} + +// SetBridgeID adds the bridgeId to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetBridgeID(bridgeID *string) { + o.BridgeID = bridgeID +} + +// WithBridgeIDn adds the bridgeIDn to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithBridgeIDn(bridgeIDn *string) *VirtualizationInterfacesListParams { + o.SetBridgeIDn(bridgeIDn) + return o +} + +// SetBridgeIDn adds the bridgeIdN to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetBridgeIDn(bridgeIDn *string) { + o.BridgeIDn = bridgeIDn +} + // WithCluster adds the cluster to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithCluster(cluster *string) *VirtualizationInterfacesListParams { o.SetCluster(cluster) @@ -376,6 +443,116 @@ func (o *VirtualizationInterfacesListParams) SetCreatedLte(createdLte *string) { o.CreatedLte = createdLte } +// WithDescription adds the description to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescription(description *string) *VirtualizationInterfacesListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionIc adds the descriptionIc to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionIc(descriptionIc *string) *VirtualizationInterfacesListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionIe(descriptionIe *string) *VirtualizationInterfacesListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionIew(descriptionIew *string) *VirtualizationInterfacesListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionIsw(descriptionIsw *string) *VirtualizationInterfacesListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionn(descriptionn *string) *VirtualizationInterfacesListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionNic(descriptionNic *string) *VirtualizationInterfacesListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionNie(descriptionNie *string) *VirtualizationInterfacesListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionNiew(descriptionNiew *string) *VirtualizationInterfacesListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithDescriptionNisw(descriptionNisw *string) *VirtualizationInterfacesListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + // WithEnabled adds the enabled to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithEnabled(enabled *string) *VirtualizationInterfacesListParams { o.SetEnabled(enabled) @@ -684,17 +861,6 @@ func (o *VirtualizationInterfacesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the virtualization interfaces list params -func (o *VirtualizationInterfacesListParams) WithNameEmpty(nameEmpty *string) *VirtualizationInterfacesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the virtualization interfaces list params -func (o *VirtualizationInterfacesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the virtualization interfaces list params func (o *VirtualizationInterfacesListParams) WithNameIc(nameIc *string) *VirtualizationInterfacesListParams { o.SetNameIc(nameIc) @@ -904,6 +1070,50 @@ func (o *VirtualizationInterfacesListParams) SetVirtualMachineIDn(virtualMachine o.VirtualMachineIDn = virtualMachineIDn } +// WithVrf adds the vrf to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithVrf(vrf *string) *VirtualizationInterfacesListParams { + o.SetVrf(vrf) + return o +} + +// SetVrf adds the vrf to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetVrf(vrf *string) { + o.Vrf = vrf +} + +// WithVrfn adds the vrfn to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithVrfn(vrfn *string) *VirtualizationInterfacesListParams { + o.SetVrfn(vrfn) + return o +} + +// SetVrfn adds the vrfN to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetVrfn(vrfn *string) { + o.Vrfn = vrfn +} + +// WithVrfID adds the vrfID to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithVrfID(vrfID *string) *VirtualizationInterfacesListParams { + o.SetVrfID(vrfID) + return o +} + +// SetVrfID adds the vrfId to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetVrfID(vrfID *string) { + o.VrfID = vrfID +} + +// WithVrfIDn adds the vrfIDn to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) WithVrfIDn(vrfIDn *string) *VirtualizationInterfacesListParams { + o.SetVrfIDn(vrfIDn) + return o +} + +// SetVrfIDn adds the vrfIdN to the virtualization interfaces list params +func (o *VirtualizationInterfacesListParams) SetVrfIDn(vrfIDn *string) { + o.VrfIDn = vrfIDn +} + // WriteToRequest writes these params to a swagger request func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -912,6 +1122,40 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } var res []error + if o.BridgeID != nil { + + // query param bridge_id + var qrBridgeID string + + if o.BridgeID != nil { + qrBridgeID = *o.BridgeID + } + qBridgeID := qrBridgeID + if qBridgeID != "" { + + if err := r.SetQueryParam("bridge_id", qBridgeID); err != nil { + return err + } + } + } + + if o.BridgeIDn != nil { + + // query param bridge_id__n + var qrBridgeIDn string + + if o.BridgeIDn != nil { + qrBridgeIDn = *o.BridgeIDn + } + qBridgeIDn := qrBridgeIDn + if qBridgeIDn != "" { + + if err := r.SetQueryParam("bridge_id__n", qBridgeIDn); err != nil { + return err + } + } + } + if o.Cluster != nil { // query param cluster @@ -1031,6 +1275,176 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + if o.Enabled != nil { // query param enabled @@ -1507,23 +1921,6 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic @@ -1847,6 +2244,74 @@ func (o *VirtualizationInterfacesListParams) WriteToRequest(r runtime.ClientRequ } } + if o.Vrf != nil { + + // query param vrf + var qrVrf string + + if o.Vrf != nil { + qrVrf = *o.Vrf + } + qVrf := qrVrf + if qVrf != "" { + + if err := r.SetQueryParam("vrf", qVrf); err != nil { + return err + } + } + } + + if o.Vrfn != nil { + + // query param vrf__n + var qrVrfn string + + if o.Vrfn != nil { + qrVrfn = *o.Vrfn + } + qVrfn := qrVrfn + if qVrfn != "" { + + if err := r.SetQueryParam("vrf__n", qVrfn); err != nil { + return err + } + } + } + + if o.VrfID != nil { + + // query param vrf_id + var qrVrfID string + + if o.VrfID != nil { + qrVrfID = *o.VrfID + } + qVrfID := qrVrfID + if qVrfID != "" { + + if err := r.SetQueryParam("vrf_id", qVrfID); err != nil { + return err + } + } + } + + if o.VrfIDn != nil { + + // query param vrf_id__n + var qrVrfIDn string + + if o.VrfIDn != nil { + qrVrfIDn = *o.VrfIDn + } + qVrfIDn := qrVrfIDn + if qVrfIDn != "" { + + if err := r.SetQueryParam("vrf_id__n", qVrfIDn); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/virtualization/virtualization_interfaces_list_responses.go b/netbox/client/virtualization/virtualization_interfaces_list_responses.go index 006819142..3c8c02e7a 100644 --- a/netbox/client/virtualization/virtualization_interfaces_list_responses.go +++ b/netbox/client/virtualization/virtualization_interfaces_list_responses.go @@ -182,6 +182,8 @@ func (o *VirtualizationInterfacesListOKBody) validateResults(formats strfmt.Regi if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *VirtualizationInterfacesListOKBody) contextValidateResults(ctx context. if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationInterfacesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go b/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go index ff56b37fb..6d217bdb9 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_list_parameters.go @@ -111,6 +111,18 @@ type VirtualizationVirtualMachinesListParams struct { // ClusterTypeIDn. ClusterTypeIDn *string + // Contact. + Contact *string + + // Contactn. + Contactn *string + + // ContactRole. + ContactRole *string + + // ContactRolen. + ContactRolen *string + // Created. Created *string @@ -228,9 +240,6 @@ type VirtualizationVirtualMachinesListParams struct { // Name. Name *string - // NameEmpty. - NameEmpty *string - // NameIc. NameIc *string @@ -566,6 +575,50 @@ func (o *VirtualizationVirtualMachinesListParams) SetClusterTypeIDn(clusterTypeI o.ClusterTypeIDn = clusterTypeIDn } +// WithContact adds the contact to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithContact(contact *string) *VirtualizationVirtualMachinesListParams { + o.SetContact(contact) + return o +} + +// SetContact adds the contact to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetContact(contact *string) { + o.Contact = contact +} + +// WithContactn adds the contactn to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithContactn(contactn *string) *VirtualizationVirtualMachinesListParams { + o.SetContactn(contactn) + return o +} + +// SetContactn adds the contactN to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetContactn(contactn *string) { + o.Contactn = contactn +} + +// WithContactRole adds the contactRole to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithContactRole(contactRole *string) *VirtualizationVirtualMachinesListParams { + o.SetContactRole(contactRole) + return o +} + +// SetContactRole adds the contactRole to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetContactRole(contactRole *string) { + o.ContactRole = contactRole +} + +// WithContactRolen adds the contactRolen to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) WithContactRolen(contactRolen *string) *VirtualizationVirtualMachinesListParams { + o.SetContactRolen(contactRolen) + return o +} + +// SetContactRolen adds the contactRoleN to the virtualization virtual machines list params +func (o *VirtualizationVirtualMachinesListParams) SetContactRolen(contactRolen *string) { + o.ContactRolen = contactRolen +} + // WithCreated adds the created to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithCreated(created *string) *VirtualizationVirtualMachinesListParams { o.SetCreated(created) @@ -984,17 +1037,6 @@ func (o *VirtualizationVirtualMachinesListParams) SetName(name *string) { o.Name = name } -// WithNameEmpty adds the nameEmpty to the virtualization virtual machines list params -func (o *VirtualizationVirtualMachinesListParams) WithNameEmpty(nameEmpty *string) *VirtualizationVirtualMachinesListParams { - o.SetNameEmpty(nameEmpty) - return o -} - -// SetNameEmpty adds the nameEmpty to the virtualization virtual machines list params -func (o *VirtualizationVirtualMachinesListParams) SetNameEmpty(nameEmpty *string) { - o.NameEmpty = nameEmpty -} - // WithNameIc adds the nameIc to the virtualization virtual machines list params func (o *VirtualizationVirtualMachinesListParams) WithNameIc(nameIc *string) *VirtualizationVirtualMachinesListParams { o.SetNameIc(nameIc) @@ -1746,6 +1788,74 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } + if o.Contact != nil { + + // query param contact + var qrContact string + + if o.Contact != nil { + qrContact = *o.Contact + } + qContact := qrContact + if qContact != "" { + + if err := r.SetQueryParam("contact", qContact); err != nil { + return err + } + } + } + + if o.Contactn != nil { + + // query param contact__n + var qrContactn string + + if o.Contactn != nil { + qrContactn = *o.Contactn + } + qContactn := qrContactn + if qContactn != "" { + + if err := r.SetQueryParam("contact__n", qContactn); err != nil { + return err + } + } + } + + if o.ContactRole != nil { + + // query param contact_role + var qrContactRole string + + if o.ContactRole != nil { + qrContactRole = *o.ContactRole + } + qContactRole := qrContactRole + if qContactRole != "" { + + if err := r.SetQueryParam("contact_role", qContactRole); err != nil { + return err + } + } + } + + if o.ContactRolen != nil { + + // query param contact_role__n + var qrContactRolen string + + if o.ContactRolen != nil { + qrContactRolen = *o.ContactRolen + } + qContactRolen := qrContactRolen + if qContactRolen != "" { + + if err := r.SetQueryParam("contact_role__n", qContactRolen); err != nil { + return err + } + } + } + if o.Created != nil { // query param created @@ -2392,23 +2502,6 @@ func (o *VirtualizationVirtualMachinesListParams) WriteToRequest(r runtime.Clien } } - if o.NameEmpty != nil { - - // query param name__empty - var qrNameEmpty string - - if o.NameEmpty != nil { - qrNameEmpty = *o.NameEmpty - } - qNameEmpty := qrNameEmpty - if qNameEmpty != "" { - - if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { - return err - } - } - } - if o.NameIc != nil { // query param name__ic diff --git a/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go b/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go index c479b3549..162e2b6fa 100644 --- a/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go +++ b/netbox/client/virtualization/virtualization_virtual_machines_list_responses.go @@ -182,6 +182,8 @@ func (o *VirtualizationVirtualMachinesListOKBody) validateResults(formats strfmt if err := o.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationVirtualMachinesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationVirtualMachinesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } @@ -214,6 +216,8 @@ func (o *VirtualizationVirtualMachinesListOKBody) contextValidateResults(ctx con if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualizationVirtualMachinesListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualizationVirtualMachinesListOK" + "." + "results" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/client/wireless/wireless_client.go b/netbox/client/wireless/wireless_client.go new file mode 100644 index 000000000..080fb90b5 --- /dev/null +++ b/netbox/client/wireless/wireless_client.go @@ -0,0 +1,1161 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new wireless API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for wireless API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + WirelessWirelessLanGroupsBulkDelete(params *WirelessWirelessLanGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsBulkDeleteNoContent, error) + + WirelessWirelessLanGroupsBulkPartialUpdate(params *WirelessWirelessLanGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsBulkPartialUpdateOK, error) + + WirelessWirelessLanGroupsBulkUpdate(params *WirelessWirelessLanGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsBulkUpdateOK, error) + + WirelessWirelessLanGroupsCreate(params *WirelessWirelessLanGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsCreateCreated, error) + + WirelessWirelessLanGroupsDelete(params *WirelessWirelessLanGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsDeleteNoContent, error) + + WirelessWirelessLanGroupsList(params *WirelessWirelessLanGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsListOK, error) + + WirelessWirelessLanGroupsPartialUpdate(params *WirelessWirelessLanGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsPartialUpdateOK, error) + + WirelessWirelessLanGroupsRead(params *WirelessWirelessLanGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsReadOK, error) + + WirelessWirelessLanGroupsUpdate(params *WirelessWirelessLanGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsUpdateOK, error) + + WirelessWirelessLansBulkDelete(params *WirelessWirelessLansBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansBulkDeleteNoContent, error) + + WirelessWirelessLansBulkPartialUpdate(params *WirelessWirelessLansBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansBulkPartialUpdateOK, error) + + WirelessWirelessLansBulkUpdate(params *WirelessWirelessLansBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansBulkUpdateOK, error) + + WirelessWirelessLansCreate(params *WirelessWirelessLansCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansCreateCreated, error) + + WirelessWirelessLansDelete(params *WirelessWirelessLansDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansDeleteNoContent, error) + + WirelessWirelessLansList(params *WirelessWirelessLansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansListOK, error) + + WirelessWirelessLansPartialUpdate(params *WirelessWirelessLansPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansPartialUpdateOK, error) + + WirelessWirelessLansRead(params *WirelessWirelessLansReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansReadOK, error) + + WirelessWirelessLansUpdate(params *WirelessWirelessLansUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansUpdateOK, error) + + WirelessWirelessLinksBulkDelete(params *WirelessWirelessLinksBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksBulkDeleteNoContent, error) + + WirelessWirelessLinksBulkPartialUpdate(params *WirelessWirelessLinksBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksBulkPartialUpdateOK, error) + + WirelessWirelessLinksBulkUpdate(params *WirelessWirelessLinksBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksBulkUpdateOK, error) + + WirelessWirelessLinksCreate(params *WirelessWirelessLinksCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksCreateCreated, error) + + WirelessWirelessLinksDelete(params *WirelessWirelessLinksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksDeleteNoContent, error) + + WirelessWirelessLinksList(params *WirelessWirelessLinksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksListOK, error) + + WirelessWirelessLinksPartialUpdate(params *WirelessWirelessLinksPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksPartialUpdateOK, error) + + WirelessWirelessLinksRead(params *WirelessWirelessLinksReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksReadOK, error) + + WirelessWirelessLinksUpdate(params *WirelessWirelessLinksUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksUpdateOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + WirelessWirelessLanGroupsBulkDelete wireless wireless lan groups bulk delete API +*/ +func (a *Client) WirelessWirelessLanGroupsBulkDelete(params *WirelessWirelessLanGroupsBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_bulk_delete", + Method: "DELETE", + PathPattern: "/wireless/wireless-lan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsBulkDeleteNoContent) + 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 wireless_wireless-lan-groups_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsBulkPartialUpdate wireless wireless lan groups bulk partial update API +*/ +func (a *Client) WirelessWirelessLanGroupsBulkPartialUpdate(params *WirelessWirelessLanGroupsBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_bulk_partial_update", + Method: "PATCH", + PathPattern: "/wireless/wireless-lan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsBulkPartialUpdateOK) + 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 wireless_wireless-lan-groups_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsBulkUpdate wireless wireless lan groups bulk update API +*/ +func (a *Client) WirelessWirelessLanGroupsBulkUpdate(params *WirelessWirelessLanGroupsBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_bulk_update", + Method: "PUT", + PathPattern: "/wireless/wireless-lan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsBulkUpdateOK) + 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 wireless_wireless-lan-groups_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsCreate wireless wireless lan groups create API +*/ +func (a *Client) WirelessWirelessLanGroupsCreate(params *WirelessWirelessLanGroupsCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsCreateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_create", + Method: "POST", + PathPattern: "/wireless/wireless-lan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsCreateCreated) + 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 wireless_wireless-lan-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsDelete wireless wireless lan groups delete API +*/ +func (a *Client) WirelessWirelessLanGroupsDelete(params *WirelessWirelessLanGroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_delete", + Method: "DELETE", + PathPattern: "/wireless/wireless-lan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsDeleteNoContent) + 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 wireless_wireless-lan-groups_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) WirelessWirelessLanGroupsList(params *WirelessWirelessLanGroupsListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsListParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_list", + Method: "GET", + PathPattern: "/wireless/wireless-lan-groups/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsListOK) + 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 wireless_wireless-lan-groups_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsPartialUpdate wireless wireless lan groups partial update API +*/ +func (a *Client) WirelessWirelessLanGroupsPartialUpdate(params *WirelessWirelessLanGroupsPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_partial_update", + Method: "PATCH", + PathPattern: "/wireless/wireless-lan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsPartialUpdateOK) + 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 wireless_wireless-lan-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsRead wireless wireless lan groups read API +*/ +func (a *Client) WirelessWirelessLanGroupsRead(params *WirelessWirelessLanGroupsReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsReadParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_read", + Method: "GET", + PathPattern: "/wireless/wireless-lan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsReadOK) + 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 wireless_wireless-lan-groups_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLanGroupsUpdate wireless wireless lan groups update API +*/ +func (a *Client) WirelessWirelessLanGroupsUpdate(params *WirelessWirelessLanGroupsUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLanGroupsUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLanGroupsUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lan-groups_update", + Method: "PUT", + PathPattern: "/wireless/wireless-lan-groups/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLanGroupsUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLanGroupsUpdateOK) + 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 wireless_wireless-lan-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansBulkDelete wireless wireless lans bulk delete API +*/ +func (a *Client) WirelessWirelessLansBulkDelete(params *WirelessWirelessLansBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_bulk_delete", + Method: "DELETE", + PathPattern: "/wireless/wireless-lans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansBulkDeleteNoContent) + 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 wireless_wireless-lans_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansBulkPartialUpdate wireless wireless lans bulk partial update API +*/ +func (a *Client) WirelessWirelessLansBulkPartialUpdate(params *WirelessWirelessLansBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_bulk_partial_update", + Method: "PATCH", + PathPattern: "/wireless/wireless-lans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansBulkPartialUpdateOK) + 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 wireless_wireless-lans_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansBulkUpdate wireless wireless lans bulk update API +*/ +func (a *Client) WirelessWirelessLansBulkUpdate(params *WirelessWirelessLansBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_bulk_update", + Method: "PUT", + PathPattern: "/wireless/wireless-lans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansBulkUpdateOK) + 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 wireless_wireless-lans_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansCreate wireless wireless lans create API +*/ +func (a *Client) WirelessWirelessLansCreate(params *WirelessWirelessLansCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansCreateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_create", + Method: "POST", + PathPattern: "/wireless/wireless-lans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansCreateCreated) + 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 wireless_wireless-lans_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansDelete wireless wireless lans delete API +*/ +func (a *Client) WirelessWirelessLansDelete(params *WirelessWirelessLansDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_delete", + Method: "DELETE", + PathPattern: "/wireless/wireless-lans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansDeleteNoContent) + 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 wireless_wireless-lans_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) WirelessWirelessLansList(params *WirelessWirelessLansListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansListParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_list", + Method: "GET", + PathPattern: "/wireless/wireless-lans/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansListOK) + 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 wireless_wireless-lans_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansPartialUpdate wireless wireless lans partial update API +*/ +func (a *Client) WirelessWirelessLansPartialUpdate(params *WirelessWirelessLansPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_partial_update", + Method: "PATCH", + PathPattern: "/wireless/wireless-lans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansPartialUpdateOK) + 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 wireless_wireless-lans_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansRead wireless wireless lans read API +*/ +func (a *Client) WirelessWirelessLansRead(params *WirelessWirelessLansReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansReadParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_read", + Method: "GET", + PathPattern: "/wireless/wireless-lans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansReadOK) + 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 wireless_wireless-lans_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLansUpdate wireless wireless lans update API +*/ +func (a *Client) WirelessWirelessLansUpdate(params *WirelessWirelessLansUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLansUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLansUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-lans_update", + Method: "PUT", + PathPattern: "/wireless/wireless-lans/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLansUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLansUpdateOK) + 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 wireless_wireless-lans_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksBulkDelete wireless wireless links bulk delete API +*/ +func (a *Client) WirelessWirelessLinksBulkDelete(params *WirelessWirelessLinksBulkDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksBulkDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksBulkDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_bulk_delete", + Method: "DELETE", + PathPattern: "/wireless/wireless-links/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksBulkDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksBulkDeleteNoContent) + 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 wireless_wireless-links_bulk_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksBulkPartialUpdate wireless wireless links bulk partial update API +*/ +func (a *Client) WirelessWirelessLinksBulkPartialUpdate(params *WirelessWirelessLinksBulkPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksBulkPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksBulkPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_bulk_partial_update", + Method: "PATCH", + PathPattern: "/wireless/wireless-links/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksBulkPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksBulkPartialUpdateOK) + 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 wireless_wireless-links_bulk_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksBulkUpdate wireless wireless links bulk update API +*/ +func (a *Client) WirelessWirelessLinksBulkUpdate(params *WirelessWirelessLinksBulkUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksBulkUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksBulkUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_bulk_update", + Method: "PUT", + PathPattern: "/wireless/wireless-links/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksBulkUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksBulkUpdateOK) + 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 wireless_wireless-links_bulk_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksCreate wireless wireless links create API +*/ +func (a *Client) WirelessWirelessLinksCreate(params *WirelessWirelessLinksCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksCreateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_create", + Method: "POST", + PathPattern: "/wireless/wireless-links/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksCreateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksCreateCreated) + 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 wireless_wireless-links_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksDelete wireless wireless links delete API +*/ +func (a *Client) WirelessWirelessLinksDelete(params *WirelessWirelessLinksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksDeleteParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_delete", + Method: "DELETE", + PathPattern: "/wireless/wireless-links/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksDeleteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksDeleteNoContent) + 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 wireless_wireless-links_delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksList Overrides ListModelMixin to allow processing ExportTemplates. +*/ +func (a *Client) WirelessWirelessLinksList(params *WirelessWirelessLinksListParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksListParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_list", + Method: "GET", + PathPattern: "/wireless/wireless-links/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksListOK) + 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 wireless_wireless-links_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksPartialUpdate wireless wireless links partial update API +*/ +func (a *Client) WirelessWirelessLinksPartialUpdate(params *WirelessWirelessLinksPartialUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksPartialUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksPartialUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_partial_update", + Method: "PATCH", + PathPattern: "/wireless/wireless-links/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksPartialUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksPartialUpdateOK) + 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 wireless_wireless-links_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksRead wireless wireless links read API +*/ +func (a *Client) WirelessWirelessLinksRead(params *WirelessWirelessLinksReadParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksReadParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_read", + Method: "GET", + PathPattern: "/wireless/wireless-links/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksReadOK) + 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 wireless_wireless-links_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + WirelessWirelessLinksUpdate wireless wireless links update API +*/ +func (a *Client) WirelessWirelessLinksUpdate(params *WirelessWirelessLinksUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WirelessWirelessLinksUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewWirelessWirelessLinksUpdateParams() + } + op := &runtime.ClientOperation{ + ID: "wireless_wireless-links_update", + Method: "PUT", + PathPattern: "/wireless/wireless-links/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &WirelessWirelessLinksUpdateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*WirelessWirelessLinksUpdateOK) + 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 wireless_wireless-links_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_parameters.go new file mode 100644 index 000000000..0dd4a3ef8 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLanGroupsBulkDeleteParams creates a new WirelessWirelessLanGroupsBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsBulkDeleteParams() *WirelessWirelessLanGroupsBulkDeleteParams { + return &WirelessWirelessLanGroupsBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsBulkDeleteParamsWithTimeout creates a new WirelessWirelessLanGroupsBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsBulkDeleteParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsBulkDeleteParams { + return &WirelessWirelessLanGroupsBulkDeleteParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsBulkDeleteParamsWithContext creates a new WirelessWirelessLanGroupsBulkDeleteParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsBulkDeleteParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsBulkDeleteParams { + return &WirelessWirelessLanGroupsBulkDeleteParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsBulkDeleteParamsWithHTTPClient creates a new WirelessWirelessLanGroupsBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsBulkDeleteParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsBulkDeleteParams { + return &WirelessWirelessLanGroupsBulkDeleteParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsBulkDeleteParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups bulk delete operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsBulkDeleteParams) WithDefaults() *WirelessWirelessLanGroupsBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups bulk delete params +func (o *WirelessWirelessLanGroupsBulkDeleteParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups bulk delete params +func (o *WirelessWirelessLanGroupsBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups bulk delete params +func (o *WirelessWirelessLanGroupsBulkDeleteParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups bulk delete params +func (o *WirelessWirelessLanGroupsBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups bulk delete params +func (o *WirelessWirelessLanGroupsBulkDeleteParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups bulk delete params +func (o *WirelessWirelessLanGroupsBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsBulkDeleteParams) 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/netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_responses.go new file mode 100644 index 000000000..dc55a5c88 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// WirelessWirelessLanGroupsBulkDeleteReader is a Reader for the WirelessWirelessLanGroupsBulkDelete structure. +type WirelessWirelessLanGroupsBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewWirelessWirelessLanGroupsBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsBulkDeleteNoContent creates a WirelessWirelessLanGroupsBulkDeleteNoContent with default headers values +func NewWirelessWirelessLanGroupsBulkDeleteNoContent() *WirelessWirelessLanGroupsBulkDeleteNoContent { + return &WirelessWirelessLanGroupsBulkDeleteNoContent{} +} + +/* WirelessWirelessLanGroupsBulkDeleteNoContent describes a response with status code 204, with default header values. + +WirelessWirelessLanGroupsBulkDeleteNoContent wireless wireless lan groups bulk delete no content +*/ +type WirelessWirelessLanGroupsBulkDeleteNoContent struct { +} + +func (o *WirelessWirelessLanGroupsBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /wireless/wireless-lan-groups/][%d] wirelessWirelessLanGroupsBulkDeleteNoContent ", 204) +} + +func (o *WirelessWirelessLanGroupsBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_parameters.go new file mode 100644 index 000000000..a59802b93 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLanGroupsBulkPartialUpdateParams creates a new WirelessWirelessLanGroupsBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsBulkPartialUpdateParams() *WirelessWirelessLanGroupsBulkPartialUpdateParams { + return &WirelessWirelessLanGroupsBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsBulkPartialUpdateParamsWithTimeout creates a new WirelessWirelessLanGroupsBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + return &WirelessWirelessLanGroupsBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsBulkPartialUpdateParamsWithContext creates a new WirelessWirelessLanGroupsBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsBulkPartialUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + return &WirelessWirelessLanGroupsBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsBulkPartialUpdateParamsWithHTTPClient creates a new WirelessWirelessLanGroupsBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + return &WirelessWirelessLanGroupsBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableWirelessLANGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) WithDefaults() *WirelessWirelessLanGroupsBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) WithData(data *models.WritableWirelessLANGroup) *WirelessWirelessLanGroupsBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lan groups bulk partial update params +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) SetData(data *models.WritableWirelessLANGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_responses.go new file mode 100644 index 000000000..4e66d2a87 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsBulkPartialUpdateReader is a Reader for the WirelessWirelessLanGroupsBulkPartialUpdate structure. +type WirelessWirelessLanGroupsBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLanGroupsBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsBulkPartialUpdateOK creates a WirelessWirelessLanGroupsBulkPartialUpdateOK with default headers values +func NewWirelessWirelessLanGroupsBulkPartialUpdateOK() *WirelessWirelessLanGroupsBulkPartialUpdateOK { + return &WirelessWirelessLanGroupsBulkPartialUpdateOK{} +} + +/* WirelessWirelessLanGroupsBulkPartialUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLanGroupsBulkPartialUpdateOK wireless wireless lan groups bulk partial update o k +*/ +type WirelessWirelessLanGroupsBulkPartialUpdateOK struct { + Payload *models.WirelessLANGroup +} + +func (o *WirelessWirelessLanGroupsBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /wireless/wireless-lan-groups/][%d] wirelessWirelessLanGroupsBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLanGroupsBulkPartialUpdateOK) GetPayload() *models.WirelessLANGroup { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLANGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_parameters.go new file mode 100644 index 000000000..c393dfbd7 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLanGroupsBulkUpdateParams creates a new WirelessWirelessLanGroupsBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsBulkUpdateParams() *WirelessWirelessLanGroupsBulkUpdateParams { + return &WirelessWirelessLanGroupsBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsBulkUpdateParamsWithTimeout creates a new WirelessWirelessLanGroupsBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsBulkUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsBulkUpdateParams { + return &WirelessWirelessLanGroupsBulkUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsBulkUpdateParamsWithContext creates a new WirelessWirelessLanGroupsBulkUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsBulkUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsBulkUpdateParams { + return &WirelessWirelessLanGroupsBulkUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsBulkUpdateParamsWithHTTPClient creates a new WirelessWirelessLanGroupsBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsBulkUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsBulkUpdateParams { + return &WirelessWirelessLanGroupsBulkUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsBulkUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups bulk update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsBulkUpdateParams struct { + + // Data. + Data *models.WritableWirelessLANGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsBulkUpdateParams) WithDefaults() *WirelessWirelessLanGroupsBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) WithData(data *models.WritableWirelessLANGroup) *WirelessWirelessLanGroupsBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lan groups bulk update params +func (o *WirelessWirelessLanGroupsBulkUpdateParams) SetData(data *models.WritableWirelessLANGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_responses.go new file mode 100644 index 000000000..b6dc26e27 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsBulkUpdateReader is a Reader for the WirelessWirelessLanGroupsBulkUpdate structure. +type WirelessWirelessLanGroupsBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLanGroupsBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsBulkUpdateOK creates a WirelessWirelessLanGroupsBulkUpdateOK with default headers values +func NewWirelessWirelessLanGroupsBulkUpdateOK() *WirelessWirelessLanGroupsBulkUpdateOK { + return &WirelessWirelessLanGroupsBulkUpdateOK{} +} + +/* WirelessWirelessLanGroupsBulkUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLanGroupsBulkUpdateOK wireless wireless lan groups bulk update o k +*/ +type WirelessWirelessLanGroupsBulkUpdateOK struct { + Payload *models.WirelessLANGroup +} + +func (o *WirelessWirelessLanGroupsBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /wireless/wireless-lan-groups/][%d] wirelessWirelessLanGroupsBulkUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLanGroupsBulkUpdateOK) GetPayload() *models.WirelessLANGroup { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLANGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_create_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_create_parameters.go new file mode 100644 index 000000000..ff000fce0 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_create_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLanGroupsCreateParams creates a new WirelessWirelessLanGroupsCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsCreateParams() *WirelessWirelessLanGroupsCreateParams { + return &WirelessWirelessLanGroupsCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsCreateParamsWithTimeout creates a new WirelessWirelessLanGroupsCreateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsCreateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsCreateParams { + return &WirelessWirelessLanGroupsCreateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsCreateParamsWithContext creates a new WirelessWirelessLanGroupsCreateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsCreateParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsCreateParams { + return &WirelessWirelessLanGroupsCreateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsCreateParamsWithHTTPClient creates a new WirelessWirelessLanGroupsCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsCreateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsCreateParams { + return &WirelessWirelessLanGroupsCreateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsCreateParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups create operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsCreateParams struct { + + // Data. + Data *models.WritableWirelessLANGroup + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsCreateParams) WithDefaults() *WirelessWirelessLanGroupsCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) WithData(data *models.WritableWirelessLANGroup) *WirelessWirelessLanGroupsCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lan groups create params +func (o *WirelessWirelessLanGroupsCreateParams) SetData(data *models.WritableWirelessLANGroup) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_create_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_create_responses.go new file mode 100644 index 000000000..8b6033e6e --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_create_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsCreateReader is a Reader for the WirelessWirelessLanGroupsCreate structure. +type WirelessWirelessLanGroupsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewWirelessWirelessLanGroupsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsCreateCreated creates a WirelessWirelessLanGroupsCreateCreated with default headers values +func NewWirelessWirelessLanGroupsCreateCreated() *WirelessWirelessLanGroupsCreateCreated { + return &WirelessWirelessLanGroupsCreateCreated{} +} + +/* WirelessWirelessLanGroupsCreateCreated describes a response with status code 201, with default header values. + +WirelessWirelessLanGroupsCreateCreated wireless wireless lan groups create created +*/ +type WirelessWirelessLanGroupsCreateCreated struct { + Payload *models.WirelessLANGroup +} + +func (o *WirelessWirelessLanGroupsCreateCreated) Error() string { + return fmt.Sprintf("[POST /wireless/wireless-lan-groups/][%d] wirelessWirelessLanGroupsCreateCreated %+v", 201, o.Payload) +} +func (o *WirelessWirelessLanGroupsCreateCreated) GetPayload() *models.WirelessLANGroup { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLANGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_delete_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_delete_parameters.go new file mode 100644 index 000000000..3a10bc76a --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLanGroupsDeleteParams creates a new WirelessWirelessLanGroupsDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsDeleteParams() *WirelessWirelessLanGroupsDeleteParams { + return &WirelessWirelessLanGroupsDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsDeleteParamsWithTimeout creates a new WirelessWirelessLanGroupsDeleteParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsDeleteParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsDeleteParams { + return &WirelessWirelessLanGroupsDeleteParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsDeleteParamsWithContext creates a new WirelessWirelessLanGroupsDeleteParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsDeleteParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsDeleteParams { + return &WirelessWirelessLanGroupsDeleteParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsDeleteParamsWithHTTPClient creates a new WirelessWirelessLanGroupsDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsDeleteParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsDeleteParams { + return &WirelessWirelessLanGroupsDeleteParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsDeleteParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups delete operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsDeleteParams struct { + + /* ID. + + A unique integer value identifying this Wireless LAN Group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsDeleteParams) WithDefaults() *WirelessWirelessLanGroupsDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) WithID(id int64) *WirelessWirelessLanGroupsDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lan groups delete params +func (o *WirelessWirelessLanGroupsDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsDeleteParams) 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/netbox/client/wireless/wireless_wireless_lan_groups_delete_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_delete_responses.go new file mode 100644 index 000000000..a70878d18 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_delete_responses.go @@ -0,0 +1,68 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// WirelessWirelessLanGroupsDeleteReader is a Reader for the WirelessWirelessLanGroupsDelete structure. +type WirelessWirelessLanGroupsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewWirelessWirelessLanGroupsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsDeleteNoContent creates a WirelessWirelessLanGroupsDeleteNoContent with default headers values +func NewWirelessWirelessLanGroupsDeleteNoContent() *WirelessWirelessLanGroupsDeleteNoContent { + return &WirelessWirelessLanGroupsDeleteNoContent{} +} + +/* WirelessWirelessLanGroupsDeleteNoContent describes a response with status code 204, with default header values. + +WirelessWirelessLanGroupsDeleteNoContent wireless wireless lan groups delete no content +*/ +type WirelessWirelessLanGroupsDeleteNoContent struct { +} + +func (o *WirelessWirelessLanGroupsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /wireless/wireless-lan-groups/{id}/][%d] wirelessWirelessLanGroupsDeleteNoContent ", 204) +} + +func (o *WirelessWirelessLanGroupsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go new file mode 100644 index 000000000..e4f907a8b --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_list_parameters.go @@ -0,0 +1,1823 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLanGroupsListParams creates a new WirelessWirelessLanGroupsListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsListParams() *WirelessWirelessLanGroupsListParams { + return &WirelessWirelessLanGroupsListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsListParamsWithTimeout creates a new WirelessWirelessLanGroupsListParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsListParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsListParams { + return &WirelessWirelessLanGroupsListParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsListParamsWithContext creates a new WirelessWirelessLanGroupsListParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsListParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsListParams { + return &WirelessWirelessLanGroupsListParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsListParamsWithHTTPClient creates a new WirelessWirelessLanGroupsListParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsListParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsListParams { + return &WirelessWirelessLanGroupsListParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsListParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups list operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsListParams struct { + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionEmpty. + DescriptionEmpty *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + // Name. + Name *string + + // NameEmpty. + NameEmpty *string + + // NameIc. + NameIc *string + + // NameIe. + NameIe *string + + // NameIew. + NameIew *string + + // NameIsw. + NameIsw *string + + // Namen. + Namen *string + + // NameNic. + NameNic *string + + // NameNie. + NameNie *string + + // NameNiew. + NameNiew *string + + // NameNisw. + NameNisw *string + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Parent. + Parent *string + + // Parentn. + Parentn *string + + // ParentID. + ParentID *string + + // ParentIDn. + ParentIDn *string + + // Q. + Q *string + + // Slug. + Slug *string + + // SlugEmpty. + SlugEmpty *string + + // SlugIc. + SlugIc *string + + // SlugIe. + SlugIe *string + + // SlugIew. + SlugIew *string + + // SlugIsw. + SlugIsw *string + + // Slugn. + Slugn *string + + // SlugNic. + SlugNic *string + + // SlugNie. + SlugNie *string + + // SlugNiew. + SlugNiew *string + + // SlugNisw. + SlugNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsListParams) WithDefaults() *WirelessWirelessLanGroupsListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCreated adds the created to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithCreated(created *string) *WirelessWirelessLanGroupsListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithCreatedGte(createdGte *string) *WirelessWirelessLanGroupsListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithCreatedLte(createdLte *string) *WirelessWirelessLanGroupsListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescription(description *string) *WirelessWirelessLanGroupsListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionEmpty adds the descriptionEmpty to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionEmpty(descriptionEmpty *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionEmpty(descriptionEmpty) + return o +} + +// SetDescriptionEmpty adds the descriptionEmpty to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionEmpty(descriptionEmpty *string) { + o.DescriptionEmpty = descriptionEmpty +} + +// WithDescriptionIc adds the descriptionIc to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionIc(descriptionIc *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionIe(descriptionIe *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionIew(descriptionIew *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionIsw(descriptionIsw *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionn(descriptionn *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionNic(descriptionNic *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionNie(descriptionNie *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionNiew(descriptionNiew *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithDescriptionNisw(descriptionNisw *string) *WirelessWirelessLanGroupsListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithID adds the id to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithID(id *string) *WirelessWirelessLanGroupsListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithIDGt(iDGt *string) *WirelessWirelessLanGroupsListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithIDGte(iDGte *string) *WirelessWirelessLanGroupsListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithIDLt(iDLt *string) *WirelessWirelessLanGroupsListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithIDLte(iDLte *string) *WirelessWirelessLanGroupsListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithIDn(iDn *string) *WirelessWirelessLanGroupsListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLastUpdated(lastUpdated *string) *WirelessWirelessLanGroupsListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedGte(lastUpdatedGte *string) *WirelessWirelessLanGroupsListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLastUpdatedLte(lastUpdatedLte *string) *WirelessWirelessLanGroupsListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithLimit(limit *int64) *WirelessWirelessLanGroupsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithName(name *string) *WirelessWirelessLanGroupsListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetName(name *string) { + o.Name = name +} + +// WithNameEmpty adds the nameEmpty to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameEmpty(nameEmpty *string) *WirelessWirelessLanGroupsListParams { + o.SetNameEmpty(nameEmpty) + return o +} + +// SetNameEmpty adds the nameEmpty to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameEmpty(nameEmpty *string) { + o.NameEmpty = nameEmpty +} + +// WithNameIc adds the nameIc to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameIc(nameIc *string) *WirelessWirelessLanGroupsListParams { + o.SetNameIc(nameIc) + return o +} + +// SetNameIc adds the nameIc to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameIc(nameIc *string) { + o.NameIc = nameIc +} + +// WithNameIe adds the nameIe to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameIe(nameIe *string) *WirelessWirelessLanGroupsListParams { + o.SetNameIe(nameIe) + return o +} + +// SetNameIe adds the nameIe to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameIe(nameIe *string) { + o.NameIe = nameIe +} + +// WithNameIew adds the nameIew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameIew(nameIew *string) *WirelessWirelessLanGroupsListParams { + o.SetNameIew(nameIew) + return o +} + +// SetNameIew adds the nameIew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameIew(nameIew *string) { + o.NameIew = nameIew +} + +// WithNameIsw adds the nameIsw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameIsw(nameIsw *string) *WirelessWirelessLanGroupsListParams { + o.SetNameIsw(nameIsw) + return o +} + +// SetNameIsw adds the nameIsw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameIsw(nameIsw *string) { + o.NameIsw = nameIsw +} + +// WithNamen adds the namen to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNamen(namen *string) *WirelessWirelessLanGroupsListParams { + o.SetNamen(namen) + return o +} + +// SetNamen adds the nameN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNamen(namen *string) { + o.Namen = namen +} + +// WithNameNic adds the nameNic to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameNic(nameNic *string) *WirelessWirelessLanGroupsListParams { + o.SetNameNic(nameNic) + return o +} + +// SetNameNic adds the nameNic to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameNic(nameNic *string) { + o.NameNic = nameNic +} + +// WithNameNie adds the nameNie to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameNie(nameNie *string) *WirelessWirelessLanGroupsListParams { + o.SetNameNie(nameNie) + return o +} + +// SetNameNie adds the nameNie to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameNie(nameNie *string) { + o.NameNie = nameNie +} + +// WithNameNiew adds the nameNiew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameNiew(nameNiew *string) *WirelessWirelessLanGroupsListParams { + o.SetNameNiew(nameNiew) + return o +} + +// SetNameNiew adds the nameNiew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameNiew(nameNiew *string) { + o.NameNiew = nameNiew +} + +// WithNameNisw adds the nameNisw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithNameNisw(nameNisw *string) *WirelessWirelessLanGroupsListParams { + o.SetNameNisw(nameNisw) + return o +} + +// SetNameNisw adds the nameNisw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetNameNisw(nameNisw *string) { + o.NameNisw = nameNisw +} + +// WithOffset adds the offset to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithOffset(offset *int64) *WirelessWirelessLanGroupsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithParent adds the parent to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithParent(parent *string) *WirelessWirelessLanGroupsListParams { + o.SetParent(parent) + return o +} + +// SetParent adds the parent to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetParent(parent *string) { + o.Parent = parent +} + +// WithParentn adds the parentn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithParentn(parentn *string) *WirelessWirelessLanGroupsListParams { + o.SetParentn(parentn) + return o +} + +// SetParentn adds the parentN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetParentn(parentn *string) { + o.Parentn = parentn +} + +// WithParentID adds the parentID to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithParentID(parentID *string) *WirelessWirelessLanGroupsListParams { + o.SetParentID(parentID) + return o +} + +// SetParentID adds the parentId to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetParentID(parentID *string) { + o.ParentID = parentID +} + +// WithParentIDn adds the parentIDn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithParentIDn(parentIDn *string) *WirelessWirelessLanGroupsListParams { + o.SetParentIDn(parentIDn) + return o +} + +// SetParentIDn adds the parentIdN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetParentIDn(parentIDn *string) { + o.ParentIDn = parentIDn +} + +// WithQ adds the q to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithQ(q *string) *WirelessWirelessLanGroupsListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetQ(q *string) { + o.Q = q +} + +// WithSlug adds the slug to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlug(slug *string) *WirelessWirelessLanGroupsListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlug(slug *string) { + o.Slug = slug +} + +// WithSlugEmpty adds the slugEmpty to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugEmpty(slugEmpty *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugEmpty(slugEmpty) + return o +} + +// SetSlugEmpty adds the slugEmpty to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugEmpty(slugEmpty *string) { + o.SlugEmpty = slugEmpty +} + +// WithSlugIc adds the slugIc to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugIc(slugIc *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugIc(slugIc) + return o +} + +// SetSlugIc adds the slugIc to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugIc(slugIc *string) { + o.SlugIc = slugIc +} + +// WithSlugIe adds the slugIe to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugIe(slugIe *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugIe(slugIe) + return o +} + +// SetSlugIe adds the slugIe to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugIe(slugIe *string) { + o.SlugIe = slugIe +} + +// WithSlugIew adds the slugIew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugIew(slugIew *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugIew(slugIew) + return o +} + +// SetSlugIew adds the slugIew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugIew(slugIew *string) { + o.SlugIew = slugIew +} + +// WithSlugIsw adds the slugIsw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugIsw(slugIsw *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugIsw(slugIsw) + return o +} + +// SetSlugIsw adds the slugIsw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugIsw(slugIsw *string) { + o.SlugIsw = slugIsw +} + +// WithSlugn adds the slugn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugn(slugn *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugn(slugn) + return o +} + +// SetSlugn adds the slugN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugn(slugn *string) { + o.Slugn = slugn +} + +// WithSlugNic adds the slugNic to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugNic(slugNic *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugNic(slugNic) + return o +} + +// SetSlugNic adds the slugNic to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugNic(slugNic *string) { + o.SlugNic = slugNic +} + +// WithSlugNie adds the slugNie to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugNie(slugNie *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugNie(slugNie) + return o +} + +// SetSlugNie adds the slugNie to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugNie(slugNie *string) { + o.SlugNie = slugNie +} + +// WithSlugNiew adds the slugNiew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugNiew(slugNiew *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugNiew(slugNiew) + return o +} + +// SetSlugNiew adds the slugNiew to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugNiew(slugNiew *string) { + o.SlugNiew = slugNiew +} + +// WithSlugNisw adds the slugNisw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithSlugNisw(slugNisw *string) *WirelessWirelessLanGroupsListParams { + o.SetSlugNisw(slugNisw) + return o +} + +// SetSlugNisw adds the slugNisw to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetSlugNisw(slugNisw *string) { + o.SlugNisw = slugNisw +} + +// WithTag adds the tag to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithTag(tag *string) *WirelessWirelessLanGroupsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) WithTagn(tagn *string) *WirelessWirelessLanGroupsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the wireless wireless lan groups list params +func (o *WirelessWirelessLanGroupsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionEmpty != nil { + + // query param description__empty + var qrDescriptionEmpty string + + if o.DescriptionEmpty != nil { + qrDescriptionEmpty = *o.DescriptionEmpty + } + qDescriptionEmpty := qrDescriptionEmpty + if qDescriptionEmpty != "" { + + if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.NameEmpty != nil { + + // query param name__empty + var qrNameEmpty string + + if o.NameEmpty != nil { + qrNameEmpty = *o.NameEmpty + } + qNameEmpty := qrNameEmpty + if qNameEmpty != "" { + + if err := r.SetQueryParam("name__empty", qNameEmpty); err != nil { + return err + } + } + } + + if o.NameIc != nil { + + // query param name__ic + var qrNameIc string + + if o.NameIc != nil { + qrNameIc = *o.NameIc + } + qNameIc := qrNameIc + if qNameIc != "" { + + if err := r.SetQueryParam("name__ic", qNameIc); err != nil { + return err + } + } + } + + if o.NameIe != nil { + + // query param name__ie + var qrNameIe string + + if o.NameIe != nil { + qrNameIe = *o.NameIe + } + qNameIe := qrNameIe + if qNameIe != "" { + + if err := r.SetQueryParam("name__ie", qNameIe); err != nil { + return err + } + } + } + + if o.NameIew != nil { + + // query param name__iew + var qrNameIew string + + if o.NameIew != nil { + qrNameIew = *o.NameIew + } + qNameIew := qrNameIew + if qNameIew != "" { + + if err := r.SetQueryParam("name__iew", qNameIew); err != nil { + return err + } + } + } + + if o.NameIsw != nil { + + // query param name__isw + var qrNameIsw string + + if o.NameIsw != nil { + qrNameIsw = *o.NameIsw + } + qNameIsw := qrNameIsw + if qNameIsw != "" { + + if err := r.SetQueryParam("name__isw", qNameIsw); err != nil { + return err + } + } + } + + if o.Namen != nil { + + // query param name__n + var qrNamen string + + if o.Namen != nil { + qrNamen = *o.Namen + } + qNamen := qrNamen + if qNamen != "" { + + if err := r.SetQueryParam("name__n", qNamen); err != nil { + return err + } + } + } + + if o.NameNic != nil { + + // query param name__nic + var qrNameNic string + + if o.NameNic != nil { + qrNameNic = *o.NameNic + } + qNameNic := qrNameNic + if qNameNic != "" { + + if err := r.SetQueryParam("name__nic", qNameNic); err != nil { + return err + } + } + } + + if o.NameNie != nil { + + // query param name__nie + var qrNameNie string + + if o.NameNie != nil { + qrNameNie = *o.NameNie + } + qNameNie := qrNameNie + if qNameNie != "" { + + if err := r.SetQueryParam("name__nie", qNameNie); err != nil { + return err + } + } + } + + if o.NameNiew != nil { + + // query param name__niew + var qrNameNiew string + + if o.NameNiew != nil { + qrNameNiew = *o.NameNiew + } + qNameNiew := qrNameNiew + if qNameNiew != "" { + + if err := r.SetQueryParam("name__niew", qNameNiew); err != nil { + return err + } + } + } + + if o.NameNisw != nil { + + // query param name__nisw + var qrNameNisw string + + if o.NameNisw != nil { + qrNameNisw = *o.NameNisw + } + qNameNisw := qrNameNisw + if qNameNisw != "" { + + if err := r.SetQueryParam("name__nisw", qNameNisw); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Parent != nil { + + // query param parent + var qrParent string + + if o.Parent != nil { + qrParent = *o.Parent + } + qParent := qrParent + if qParent != "" { + + if err := r.SetQueryParam("parent", qParent); err != nil { + return err + } + } + } + + if o.Parentn != nil { + + // query param parent__n + var qrParentn string + + if o.Parentn != nil { + qrParentn = *o.Parentn + } + qParentn := qrParentn + if qParentn != "" { + + if err := r.SetQueryParam("parent__n", qParentn); err != nil { + return err + } + } + } + + if o.ParentID != nil { + + // query param parent_id + var qrParentID string + + if o.ParentID != nil { + qrParentID = *o.ParentID + } + qParentID := qrParentID + if qParentID != "" { + + if err := r.SetQueryParam("parent_id", qParentID); err != nil { + return err + } + } + } + + if o.ParentIDn != nil { + + // query param parent_id__n + var qrParentIDn string + + if o.ParentIDn != nil { + qrParentIDn = *o.ParentIDn + } + qParentIDn := qrParentIDn + if qParentIDn != "" { + + if err := r.SetQueryParam("parent_id__n", qParentIDn); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Slug != nil { + + // query param slug + var qrSlug string + + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + } + + if o.SlugEmpty != nil { + + // query param slug__empty + var qrSlugEmpty string + + if o.SlugEmpty != nil { + qrSlugEmpty = *o.SlugEmpty + } + qSlugEmpty := qrSlugEmpty + if qSlugEmpty != "" { + + if err := r.SetQueryParam("slug__empty", qSlugEmpty); err != nil { + return err + } + } + } + + if o.SlugIc != nil { + + // query param slug__ic + var qrSlugIc string + + if o.SlugIc != nil { + qrSlugIc = *o.SlugIc + } + qSlugIc := qrSlugIc + if qSlugIc != "" { + + if err := r.SetQueryParam("slug__ic", qSlugIc); err != nil { + return err + } + } + } + + if o.SlugIe != nil { + + // query param slug__ie + var qrSlugIe string + + if o.SlugIe != nil { + qrSlugIe = *o.SlugIe + } + qSlugIe := qrSlugIe + if qSlugIe != "" { + + if err := r.SetQueryParam("slug__ie", qSlugIe); err != nil { + return err + } + } + } + + if o.SlugIew != nil { + + // query param slug__iew + var qrSlugIew string + + if o.SlugIew != nil { + qrSlugIew = *o.SlugIew + } + qSlugIew := qrSlugIew + if qSlugIew != "" { + + if err := r.SetQueryParam("slug__iew", qSlugIew); err != nil { + return err + } + } + } + + if o.SlugIsw != nil { + + // query param slug__isw + var qrSlugIsw string + + if o.SlugIsw != nil { + qrSlugIsw = *o.SlugIsw + } + qSlugIsw := qrSlugIsw + if qSlugIsw != "" { + + if err := r.SetQueryParam("slug__isw", qSlugIsw); err != nil { + return err + } + } + } + + if o.Slugn != nil { + + // query param slug__n + var qrSlugn string + + if o.Slugn != nil { + qrSlugn = *o.Slugn + } + qSlugn := qrSlugn + if qSlugn != "" { + + if err := r.SetQueryParam("slug__n", qSlugn); err != nil { + return err + } + } + } + + if o.SlugNic != nil { + + // query param slug__nic + var qrSlugNic string + + if o.SlugNic != nil { + qrSlugNic = *o.SlugNic + } + qSlugNic := qrSlugNic + if qSlugNic != "" { + + if err := r.SetQueryParam("slug__nic", qSlugNic); err != nil { + return err + } + } + } + + if o.SlugNie != nil { + + // query param slug__nie + var qrSlugNie string + + if o.SlugNie != nil { + qrSlugNie = *o.SlugNie + } + qSlugNie := qrSlugNie + if qSlugNie != "" { + + if err := r.SetQueryParam("slug__nie", qSlugNie); err != nil { + return err + } + } + } + + if o.SlugNiew != nil { + + // query param slug__niew + var qrSlugNiew string + + if o.SlugNiew != nil { + qrSlugNiew = *o.SlugNiew + } + qSlugNiew := qrSlugNiew + if qSlugNiew != "" { + + if err := r.SetQueryParam("slug__niew", qSlugNiew); err != nil { + return err + } + } + } + + if o.SlugNisw != nil { + + // query param slug__nisw + var qrSlugNisw string + + if o.SlugNisw != nil { + qrSlugNisw = *o.SlugNisw + } + qSlugNisw := qrSlugNisw + if qSlugNisw != "" { + + if err := r.SetQueryParam("slug__nisw", qSlugNisw); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_list_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_list_responses.go new file mode 100644 index 000000000..e350e353a --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_list_responses.go @@ -0,0 +1,247 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsListReader is a Reader for the WirelessWirelessLanGroupsList structure. +type WirelessWirelessLanGroupsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLanGroupsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsListOK creates a WirelessWirelessLanGroupsListOK with default headers values +func NewWirelessWirelessLanGroupsListOK() *WirelessWirelessLanGroupsListOK { + return &WirelessWirelessLanGroupsListOK{} +} + +/* WirelessWirelessLanGroupsListOK describes a response with status code 200, with default header values. + +WirelessWirelessLanGroupsListOK wireless wireless lan groups list o k +*/ +type WirelessWirelessLanGroupsListOK struct { + Payload *WirelessWirelessLanGroupsListOKBody +} + +func (o *WirelessWirelessLanGroupsListOK) Error() string { + return fmt.Sprintf("[GET /wireless/wireless-lan-groups/][%d] wirelessWirelessLanGroupsListOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLanGroupsListOK) GetPayload() *WirelessWirelessLanGroupsListOKBody { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(WirelessWirelessLanGroupsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*WirelessWirelessLanGroupsListOKBody wireless wireless lan groups list o k body +swagger:model WirelessWirelessLanGroupsListOKBody +*/ +type WirelessWirelessLanGroupsListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.WirelessLANGroup `json:"results"` +} + +// Validate validates this wireless wireless lan groups list o k body +func (o *WirelessWirelessLanGroupsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *WirelessWirelessLanGroupsListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("wirelessWirelessLanGroupsListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLanGroupsListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("wirelessWirelessLanGroupsListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLanGroupsListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("wirelessWirelessLanGroupsListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLanGroupsListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("wirelessWirelessLanGroupsListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wirelessWirelessLanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wirelessWirelessLanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this wireless wireless lan groups list o k body based on the context it is used +func (o *WirelessWirelessLanGroupsListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *WirelessWirelessLanGroupsListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wirelessWirelessLanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wirelessWirelessLanGroupsListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *WirelessWirelessLanGroupsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *WirelessWirelessLanGroupsListOKBody) UnmarshalBinary(b []byte) error { + var res WirelessWirelessLanGroupsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_partial_update_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_partial_update_parameters.go new file mode 100644 index 000000000..b385b5a67 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 wireless + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLanGroupsPartialUpdateParams creates a new WirelessWirelessLanGroupsPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsPartialUpdateParams() *WirelessWirelessLanGroupsPartialUpdateParams { + return &WirelessWirelessLanGroupsPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsPartialUpdateParamsWithTimeout creates a new WirelessWirelessLanGroupsPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsPartialUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsPartialUpdateParams { + return &WirelessWirelessLanGroupsPartialUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsPartialUpdateParamsWithContext creates a new WirelessWirelessLanGroupsPartialUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsPartialUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsPartialUpdateParams { + return &WirelessWirelessLanGroupsPartialUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsPartialUpdateParamsWithHTTPClient creates a new WirelessWirelessLanGroupsPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsPartialUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsPartialUpdateParams { + return &WirelessWirelessLanGroupsPartialUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsPartialUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups partial update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsPartialUpdateParams struct { + + // Data. + Data *models.WritableWirelessLANGroup + + /* ID. + + A unique integer value identifying this Wireless LAN Group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WithDefaults() *WirelessWirelessLanGroupsPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WithData(data *models.WritableWirelessLANGroup) *WirelessWirelessLanGroupsPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) SetData(data *models.WritableWirelessLANGroup) { + o.Data = data +} + +// WithID adds the id to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WithID(id int64) *WirelessWirelessLanGroupsPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lan groups partial update params +func (o *WirelessWirelessLanGroupsPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/wireless/wireless_wireless_lan_groups_partial_update_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_partial_update_responses.go new file mode 100644 index 000000000..260cd7d08 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsPartialUpdateReader is a Reader for the WirelessWirelessLanGroupsPartialUpdate structure. +type WirelessWirelessLanGroupsPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLanGroupsPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsPartialUpdateOK creates a WirelessWirelessLanGroupsPartialUpdateOK with default headers values +func NewWirelessWirelessLanGroupsPartialUpdateOK() *WirelessWirelessLanGroupsPartialUpdateOK { + return &WirelessWirelessLanGroupsPartialUpdateOK{} +} + +/* WirelessWirelessLanGroupsPartialUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLanGroupsPartialUpdateOK wireless wireless lan groups partial update o k +*/ +type WirelessWirelessLanGroupsPartialUpdateOK struct { + Payload *models.WirelessLANGroup +} + +func (o *WirelessWirelessLanGroupsPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /wireless/wireless-lan-groups/{id}/][%d] wirelessWirelessLanGroupsPartialUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLanGroupsPartialUpdateOK) GetPayload() *models.WirelessLANGroup { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLANGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_read_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_read_parameters.go new file mode 100644 index 000000000..d72538638 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_read_parameters.go @@ -0,0 +1,165 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLanGroupsReadParams creates a new WirelessWirelessLanGroupsReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsReadParams() *WirelessWirelessLanGroupsReadParams { + return &WirelessWirelessLanGroupsReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsReadParamsWithTimeout creates a new WirelessWirelessLanGroupsReadParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsReadParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsReadParams { + return &WirelessWirelessLanGroupsReadParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsReadParamsWithContext creates a new WirelessWirelessLanGroupsReadParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsReadParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsReadParams { + return &WirelessWirelessLanGroupsReadParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsReadParamsWithHTTPClient creates a new WirelessWirelessLanGroupsReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsReadParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsReadParams { + return &WirelessWirelessLanGroupsReadParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsReadParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups read operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsReadParams struct { + + /* ID. + + A unique integer value identifying this Wireless LAN Group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsReadParams) WithDefaults() *WirelessWirelessLanGroupsReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) WithID(id int64) *WirelessWirelessLanGroupsReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lan groups read params +func (o *WirelessWirelessLanGroupsReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsReadParams) 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/netbox/client/wireless/wireless_wireless_lan_groups_read_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_read_responses.go new file mode 100644 index 000000000..9a0ce2e8d --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_read_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsReadReader is a Reader for the WirelessWirelessLanGroupsRead structure. +type WirelessWirelessLanGroupsReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLanGroupsReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsReadOK creates a WirelessWirelessLanGroupsReadOK with default headers values +func NewWirelessWirelessLanGroupsReadOK() *WirelessWirelessLanGroupsReadOK { + return &WirelessWirelessLanGroupsReadOK{} +} + +/* WirelessWirelessLanGroupsReadOK describes a response with status code 200, with default header values. + +WirelessWirelessLanGroupsReadOK wireless wireless lan groups read o k +*/ +type WirelessWirelessLanGroupsReadOK struct { + Payload *models.WirelessLANGroup +} + +func (o *WirelessWirelessLanGroupsReadOK) Error() string { + return fmt.Sprintf("[GET /wireless/wireless-lan-groups/{id}/][%d] wirelessWirelessLanGroupsReadOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLanGroupsReadOK) GetPayload() *models.WirelessLANGroup { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLANGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lan_groups_update_parameters.go b/netbox/client/wireless/wireless_wireless_lan_groups_update_parameters.go new file mode 100644 index 000000000..1e7cb8f60 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_update_parameters.go @@ -0,0 +1,186 @@ +// 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 wireless + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLanGroupsUpdateParams creates a new WirelessWirelessLanGroupsUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLanGroupsUpdateParams() *WirelessWirelessLanGroupsUpdateParams { + return &WirelessWirelessLanGroupsUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLanGroupsUpdateParamsWithTimeout creates a new WirelessWirelessLanGroupsUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLanGroupsUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsUpdateParams { + return &WirelessWirelessLanGroupsUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLanGroupsUpdateParamsWithContext creates a new WirelessWirelessLanGroupsUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLanGroupsUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLanGroupsUpdateParams { + return &WirelessWirelessLanGroupsUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLanGroupsUpdateParamsWithHTTPClient creates a new WirelessWirelessLanGroupsUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLanGroupsUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsUpdateParams { + return &WirelessWirelessLanGroupsUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLanGroupsUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lan groups update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLanGroupsUpdateParams struct { + + // Data. + Data *models.WritableWirelessLANGroup + + /* ID. + + A unique integer value identifying this Wireless LAN Group. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lan groups update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsUpdateParams) WithDefaults() *WirelessWirelessLanGroupsUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lan groups update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLanGroupsUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLanGroupsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLanGroupsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLanGroupsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) WithData(data *models.WritableWirelessLANGroup) *WirelessWirelessLanGroupsUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) SetData(data *models.WritableWirelessLANGroup) { + o.Data = data +} + +// WithID adds the id to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) WithID(id int64) *WirelessWirelessLanGroupsUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lan groups update params +func (o *WirelessWirelessLanGroupsUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLanGroupsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/wireless/wireless_wireless_lan_groups_update_responses.go b/netbox/client/wireless/wireless_wireless_lan_groups_update_responses.go new file mode 100644 index 000000000..46a77f045 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lan_groups_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLanGroupsUpdateReader is a Reader for the WirelessWirelessLanGroupsUpdate structure. +type WirelessWirelessLanGroupsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLanGroupsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLanGroupsUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLanGroupsUpdateOK creates a WirelessWirelessLanGroupsUpdateOK with default headers values +func NewWirelessWirelessLanGroupsUpdateOK() *WirelessWirelessLanGroupsUpdateOK { + return &WirelessWirelessLanGroupsUpdateOK{} +} + +/* WirelessWirelessLanGroupsUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLanGroupsUpdateOK wireless wireless lan groups update o k +*/ +type WirelessWirelessLanGroupsUpdateOK struct { + Payload *models.WirelessLANGroup +} + +func (o *WirelessWirelessLanGroupsUpdateOK) Error() string { + return fmt.Sprintf("[PUT /wireless/wireless-lan-groups/{id}/][%d] wirelessWirelessLanGroupsUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLanGroupsUpdateOK) GetPayload() *models.WirelessLANGroup { + return o.Payload +} + +func (o *WirelessWirelessLanGroupsUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLANGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_bulk_delete_parameters.go b/netbox/client/wireless/wireless_wireless_lans_bulk_delete_parameters.go new file mode 100644 index 000000000..0e0ab1565 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLansBulkDeleteParams creates a new WirelessWirelessLansBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansBulkDeleteParams() *WirelessWirelessLansBulkDeleteParams { + return &WirelessWirelessLansBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansBulkDeleteParamsWithTimeout creates a new WirelessWirelessLansBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansBulkDeleteParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansBulkDeleteParams { + return &WirelessWirelessLansBulkDeleteParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansBulkDeleteParamsWithContext creates a new WirelessWirelessLansBulkDeleteParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansBulkDeleteParamsWithContext(ctx context.Context) *WirelessWirelessLansBulkDeleteParams { + return &WirelessWirelessLansBulkDeleteParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansBulkDeleteParamsWithHTTPClient creates a new WirelessWirelessLansBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansBulkDeleteParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansBulkDeleteParams { + return &WirelessWirelessLansBulkDeleteParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansBulkDeleteParams contains all the parameters to send to the API endpoint + for the wireless wireless lans bulk delete operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansBulkDeleteParams) WithDefaults() *WirelessWirelessLansBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans bulk delete params +func (o *WirelessWirelessLansBulkDeleteParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans bulk delete params +func (o *WirelessWirelessLansBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans bulk delete params +func (o *WirelessWirelessLansBulkDeleteParams) WithContext(ctx context.Context) *WirelessWirelessLansBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans bulk delete params +func (o *WirelessWirelessLansBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans bulk delete params +func (o *WirelessWirelessLansBulkDeleteParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans bulk delete params +func (o *WirelessWirelessLansBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansBulkDeleteParams) 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/netbox/client/wireless/wireless_wireless_lans_bulk_delete_responses.go b/netbox/client/wireless/wireless_wireless_lans_bulk_delete_responses.go new file mode 100644 index 000000000..809835e30 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// WirelessWirelessLansBulkDeleteReader is a Reader for the WirelessWirelessLansBulkDelete structure. +type WirelessWirelessLansBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewWirelessWirelessLansBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansBulkDeleteNoContent creates a WirelessWirelessLansBulkDeleteNoContent with default headers values +func NewWirelessWirelessLansBulkDeleteNoContent() *WirelessWirelessLansBulkDeleteNoContent { + return &WirelessWirelessLansBulkDeleteNoContent{} +} + +/* WirelessWirelessLansBulkDeleteNoContent describes a response with status code 204, with default header values. + +WirelessWirelessLansBulkDeleteNoContent wireless wireless lans bulk delete no content +*/ +type WirelessWirelessLansBulkDeleteNoContent struct { +} + +func (o *WirelessWirelessLansBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /wireless/wireless-lans/][%d] wirelessWirelessLansBulkDeleteNoContent ", 204) +} + +func (o *WirelessWirelessLansBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_parameters.go b/netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_parameters.go new file mode 100644 index 000000000..3694d867a --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLansBulkPartialUpdateParams creates a new WirelessWirelessLansBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansBulkPartialUpdateParams() *WirelessWirelessLansBulkPartialUpdateParams { + return &WirelessWirelessLansBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansBulkPartialUpdateParamsWithTimeout creates a new WirelessWirelessLansBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansBulkPartialUpdateParams { + return &WirelessWirelessLansBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansBulkPartialUpdateParamsWithContext creates a new WirelessWirelessLansBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansBulkPartialUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLansBulkPartialUpdateParams { + return &WirelessWirelessLansBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansBulkPartialUpdateParamsWithHTTPClient creates a new WirelessWirelessLansBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansBulkPartialUpdateParams { + return &WirelessWirelessLansBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lans bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableWirelessLAN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansBulkPartialUpdateParams) WithDefaults() *WirelessWirelessLansBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLansBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) WithData(data *models.WritableWirelessLAN) *WirelessWirelessLansBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lans bulk partial update params +func (o *WirelessWirelessLansBulkPartialUpdateParams) SetData(data *models.WritableWirelessLAN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_responses.go b/netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_responses.go new file mode 100644 index 000000000..783632d82 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansBulkPartialUpdateReader is a Reader for the WirelessWirelessLansBulkPartialUpdate structure. +type WirelessWirelessLansBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLansBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansBulkPartialUpdateOK creates a WirelessWirelessLansBulkPartialUpdateOK with default headers values +func NewWirelessWirelessLansBulkPartialUpdateOK() *WirelessWirelessLansBulkPartialUpdateOK { + return &WirelessWirelessLansBulkPartialUpdateOK{} +} + +/* WirelessWirelessLansBulkPartialUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLansBulkPartialUpdateOK wireless wireless lans bulk partial update o k +*/ +type WirelessWirelessLansBulkPartialUpdateOK struct { + Payload *models.WirelessLAN +} + +func (o *WirelessWirelessLansBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /wireless/wireless-lans/][%d] wirelessWirelessLansBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLansBulkPartialUpdateOK) GetPayload() *models.WirelessLAN { + return o.Payload +} + +func (o *WirelessWirelessLansBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLAN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_bulk_update_parameters.go b/netbox/client/wireless/wireless_wireless_lans_bulk_update_parameters.go new file mode 100644 index 000000000..b09a19078 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLansBulkUpdateParams creates a new WirelessWirelessLansBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansBulkUpdateParams() *WirelessWirelessLansBulkUpdateParams { + return &WirelessWirelessLansBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansBulkUpdateParamsWithTimeout creates a new WirelessWirelessLansBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansBulkUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansBulkUpdateParams { + return &WirelessWirelessLansBulkUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansBulkUpdateParamsWithContext creates a new WirelessWirelessLansBulkUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansBulkUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLansBulkUpdateParams { + return &WirelessWirelessLansBulkUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansBulkUpdateParamsWithHTTPClient creates a new WirelessWirelessLansBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansBulkUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansBulkUpdateParams { + return &WirelessWirelessLansBulkUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansBulkUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lans bulk update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansBulkUpdateParams struct { + + // Data. + Data *models.WritableWirelessLAN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansBulkUpdateParams) WithDefaults() *WirelessWirelessLansBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLansBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) WithData(data *models.WritableWirelessLAN) *WirelessWirelessLansBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lans bulk update params +func (o *WirelessWirelessLansBulkUpdateParams) SetData(data *models.WritableWirelessLAN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_bulk_update_responses.go b/netbox/client/wireless/wireless_wireless_lans_bulk_update_responses.go new file mode 100644 index 000000000..27d7dbe92 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansBulkUpdateReader is a Reader for the WirelessWirelessLansBulkUpdate structure. +type WirelessWirelessLansBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLansBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansBulkUpdateOK creates a WirelessWirelessLansBulkUpdateOK with default headers values +func NewWirelessWirelessLansBulkUpdateOK() *WirelessWirelessLansBulkUpdateOK { + return &WirelessWirelessLansBulkUpdateOK{} +} + +/* WirelessWirelessLansBulkUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLansBulkUpdateOK wireless wireless lans bulk update o k +*/ +type WirelessWirelessLansBulkUpdateOK struct { + Payload *models.WirelessLAN +} + +func (o *WirelessWirelessLansBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /wireless/wireless-lans/][%d] wirelessWirelessLansBulkUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLansBulkUpdateOK) GetPayload() *models.WirelessLAN { + return o.Payload +} + +func (o *WirelessWirelessLansBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLAN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_create_parameters.go b/netbox/client/wireless/wireless_wireless_lans_create_parameters.go new file mode 100644 index 000000000..c42aab4eb --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_create_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLansCreateParams creates a new WirelessWirelessLansCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansCreateParams() *WirelessWirelessLansCreateParams { + return &WirelessWirelessLansCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansCreateParamsWithTimeout creates a new WirelessWirelessLansCreateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansCreateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansCreateParams { + return &WirelessWirelessLansCreateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansCreateParamsWithContext creates a new WirelessWirelessLansCreateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansCreateParamsWithContext(ctx context.Context) *WirelessWirelessLansCreateParams { + return &WirelessWirelessLansCreateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansCreateParamsWithHTTPClient creates a new WirelessWirelessLansCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansCreateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansCreateParams { + return &WirelessWirelessLansCreateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansCreateParams contains all the parameters to send to the API endpoint + for the wireless wireless lans create operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansCreateParams struct { + + // Data. + Data *models.WritableWirelessLAN + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansCreateParams) WithDefaults() *WirelessWirelessLansCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) WithContext(ctx context.Context) *WirelessWirelessLansCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) WithData(data *models.WritableWirelessLAN) *WirelessWirelessLansCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lans create params +func (o *WirelessWirelessLansCreateParams) SetData(data *models.WritableWirelessLAN) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_create_responses.go b/netbox/client/wireless/wireless_wireless_lans_create_responses.go new file mode 100644 index 000000000..259b41b9e --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_create_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansCreateReader is a Reader for the WirelessWirelessLansCreate structure. +type WirelessWirelessLansCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewWirelessWirelessLansCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansCreateCreated creates a WirelessWirelessLansCreateCreated with default headers values +func NewWirelessWirelessLansCreateCreated() *WirelessWirelessLansCreateCreated { + return &WirelessWirelessLansCreateCreated{} +} + +/* WirelessWirelessLansCreateCreated describes a response with status code 201, with default header values. + +WirelessWirelessLansCreateCreated wireless wireless lans create created +*/ +type WirelessWirelessLansCreateCreated struct { + Payload *models.WirelessLAN +} + +func (o *WirelessWirelessLansCreateCreated) Error() string { + return fmt.Sprintf("[POST /wireless/wireless-lans/][%d] wirelessWirelessLansCreateCreated %+v", 201, o.Payload) +} +func (o *WirelessWirelessLansCreateCreated) GetPayload() *models.WirelessLAN { + return o.Payload +} + +func (o *WirelessWirelessLansCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLAN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_delete_parameters.go b/netbox/client/wireless/wireless_wireless_lans_delete_parameters.go new file mode 100644 index 000000000..4783780d6 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLansDeleteParams creates a new WirelessWirelessLansDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansDeleteParams() *WirelessWirelessLansDeleteParams { + return &WirelessWirelessLansDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansDeleteParamsWithTimeout creates a new WirelessWirelessLansDeleteParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansDeleteParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansDeleteParams { + return &WirelessWirelessLansDeleteParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansDeleteParamsWithContext creates a new WirelessWirelessLansDeleteParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansDeleteParamsWithContext(ctx context.Context) *WirelessWirelessLansDeleteParams { + return &WirelessWirelessLansDeleteParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansDeleteParamsWithHTTPClient creates a new WirelessWirelessLansDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansDeleteParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansDeleteParams { + return &WirelessWirelessLansDeleteParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansDeleteParams contains all the parameters to send to the API endpoint + for the wireless wireless lans delete operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansDeleteParams struct { + + /* ID. + + A unique integer value identifying this Wireless LAN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansDeleteParams) WithDefaults() *WirelessWirelessLansDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) WithContext(ctx context.Context) *WirelessWirelessLansDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) WithID(id int64) *WirelessWirelessLansDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lans delete params +func (o *WirelessWirelessLansDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansDeleteParams) 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/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go b/netbox/client/wireless/wireless_wireless_lans_delete_responses.go similarity index 51% rename from netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go rename to netbox/client/wireless/wireless_wireless_lans_delete_responses.go index 89aff9163..85ee88827 100644 --- a/netbox/client/plugins/plugins_nextbox_ui_savedtopologies_delete_responses.go +++ b/netbox/client/wireless/wireless_wireless_lans_delete_responses.go @@ -15,7 +15,7 @@ // limitations under the License. // -package plugins +package wireless // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -27,16 +27,16 @@ import ( "github.com/go-openapi/strfmt" ) -// PluginsNextboxUISavedtopologiesDeleteReader is a Reader for the PluginsNextboxUISavedtopologiesDelete structure. -type PluginsNextboxUISavedtopologiesDeleteReader struct { +// WirelessWirelessLansDeleteReader is a Reader for the WirelessWirelessLansDelete structure. +type WirelessWirelessLansDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *PluginsNextboxUISavedtopologiesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *WirelessWirelessLansDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 204: - result := NewPluginsNextboxUISavedtopologiesDeleteNoContent() + result := NewWirelessWirelessLansDeleteNoContent() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -46,23 +46,23 @@ func (o *PluginsNextboxUISavedtopologiesDeleteReader) ReadResponse(response runt } } -// NewPluginsNextboxUISavedtopologiesDeleteNoContent creates a PluginsNextboxUISavedtopologiesDeleteNoContent with default headers values -func NewPluginsNextboxUISavedtopologiesDeleteNoContent() *PluginsNextboxUISavedtopologiesDeleteNoContent { - return &PluginsNextboxUISavedtopologiesDeleteNoContent{} +// NewWirelessWirelessLansDeleteNoContent creates a WirelessWirelessLansDeleteNoContent with default headers values +func NewWirelessWirelessLansDeleteNoContent() *WirelessWirelessLansDeleteNoContent { + return &WirelessWirelessLansDeleteNoContent{} } -/* PluginsNextboxUISavedtopologiesDeleteNoContent describes a response with status code 204, with default header values. +/* WirelessWirelessLansDeleteNoContent describes a response with status code 204, with default header values. -PluginsNextboxUISavedtopologiesDeleteNoContent plugins nextbox Ui savedtopologies delete no content +WirelessWirelessLansDeleteNoContent wireless wireless lans delete no content */ -type PluginsNextboxUISavedtopologiesDeleteNoContent struct { +type WirelessWirelessLansDeleteNoContent struct { } -func (o *PluginsNextboxUISavedtopologiesDeleteNoContent) Error() string { - return fmt.Sprintf("[DELETE /plugins/nextbox-ui/savedtopologies/{id}/][%d] pluginsNextboxUiSavedtopologiesDeleteNoContent ", 204) +func (o *WirelessWirelessLansDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /wireless/wireless-lans/{id}/][%d] wirelessWirelessLansDeleteNoContent ", 204) } -func (o *PluginsNextboxUISavedtopologiesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *WirelessWirelessLansDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } diff --git a/netbox/client/wireless/wireless_wireless_lans_list_parameters.go b/netbox/client/wireless/wireless_wireless_lans_list_parameters.go new file mode 100644 index 000000000..89710c342 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_list_parameters.go @@ -0,0 +1,2009 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLansListParams creates a new WirelessWirelessLansListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansListParams() *WirelessWirelessLansListParams { + return &WirelessWirelessLansListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansListParamsWithTimeout creates a new WirelessWirelessLansListParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansListParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansListParams { + return &WirelessWirelessLansListParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansListParamsWithContext creates a new WirelessWirelessLansListParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansListParamsWithContext(ctx context.Context) *WirelessWirelessLansListParams { + return &WirelessWirelessLansListParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansListParamsWithHTTPClient creates a new WirelessWirelessLansListParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansListParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansListParams { + return &WirelessWirelessLansListParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansListParams contains all the parameters to send to the API endpoint + for the wireless wireless lans list operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansListParams struct { + + // AuthCipher. + AuthCipher *string + + // AuthCiphern. + AuthCiphern *string + + // AuthPsk. + AuthPsk *string + + // AuthPskEmpty. + AuthPskEmpty *string + + // AuthPskIc. + AuthPskIc *string + + // AuthPskIe. + AuthPskIe *string + + // AuthPskIew. + AuthPskIew *string + + // AuthPskIsw. + AuthPskIsw *string + + // AuthPskn. + AuthPskn *string + + // AuthPskNic. + AuthPskNic *string + + // AuthPskNie. + AuthPskNie *string + + // AuthPskNiew. + AuthPskNiew *string + + // AuthPskNisw. + AuthPskNisw *string + + // AuthType. + AuthType *string + + // AuthTypen. + AuthTypen *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionEmpty. + DescriptionEmpty *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // Group. + Group *string + + // Groupn. + Groupn *string + + // GroupID. + GroupID *string + + // GroupIDn. + GroupIDn *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Ssid. + Ssid *string + + // SsidEmpty. + SsidEmpty *string + + // SsidIc. + SsidIc *string + + // SsidIe. + SsidIe *string + + // SsidIew. + SsidIew *string + + // SsidIsw. + SsidIsw *string + + // Ssidn. + Ssidn *string + + // SsidNic. + SsidNic *string + + // SsidNie. + SsidNie *string + + // SsidNiew. + SsidNiew *string + + // SsidNisw. + SsidNisw *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + // VlanID. + VlanID *string + + // VlanIDn. + VlanIDn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansListParams) WithDefaults() *WirelessWirelessLansListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithContext(ctx context.Context) *WirelessWirelessLansListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthCipher adds the authCipher to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthCipher(authCipher *string) *WirelessWirelessLansListParams { + o.SetAuthCipher(authCipher) + return o +} + +// SetAuthCipher adds the authCipher to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthCipher(authCipher *string) { + o.AuthCipher = authCipher +} + +// WithAuthCiphern adds the authCiphern to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthCiphern(authCiphern *string) *WirelessWirelessLansListParams { + o.SetAuthCiphern(authCiphern) + return o +} + +// SetAuthCiphern adds the authCipherN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthCiphern(authCiphern *string) { + o.AuthCiphern = authCiphern +} + +// WithAuthPsk adds the authPsk to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPsk(authPsk *string) *WirelessWirelessLansListParams { + o.SetAuthPsk(authPsk) + return o +} + +// SetAuthPsk adds the authPsk to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPsk(authPsk *string) { + o.AuthPsk = authPsk +} + +// WithAuthPskEmpty adds the authPskEmpty to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskEmpty(authPskEmpty *string) *WirelessWirelessLansListParams { + o.SetAuthPskEmpty(authPskEmpty) + return o +} + +// SetAuthPskEmpty adds the authPskEmpty to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskEmpty(authPskEmpty *string) { + o.AuthPskEmpty = authPskEmpty +} + +// WithAuthPskIc adds the authPskIc to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskIc(authPskIc *string) *WirelessWirelessLansListParams { + o.SetAuthPskIc(authPskIc) + return o +} + +// SetAuthPskIc adds the authPskIc to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskIc(authPskIc *string) { + o.AuthPskIc = authPskIc +} + +// WithAuthPskIe adds the authPskIe to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskIe(authPskIe *string) *WirelessWirelessLansListParams { + o.SetAuthPskIe(authPskIe) + return o +} + +// SetAuthPskIe adds the authPskIe to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskIe(authPskIe *string) { + o.AuthPskIe = authPskIe +} + +// WithAuthPskIew adds the authPskIew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskIew(authPskIew *string) *WirelessWirelessLansListParams { + o.SetAuthPskIew(authPskIew) + return o +} + +// SetAuthPskIew adds the authPskIew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskIew(authPskIew *string) { + o.AuthPskIew = authPskIew +} + +// WithAuthPskIsw adds the authPskIsw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskIsw(authPskIsw *string) *WirelessWirelessLansListParams { + o.SetAuthPskIsw(authPskIsw) + return o +} + +// SetAuthPskIsw adds the authPskIsw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskIsw(authPskIsw *string) { + o.AuthPskIsw = authPskIsw +} + +// WithAuthPskn adds the authPskn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskn(authPskn *string) *WirelessWirelessLansListParams { + o.SetAuthPskn(authPskn) + return o +} + +// SetAuthPskn adds the authPskN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskn(authPskn *string) { + o.AuthPskn = authPskn +} + +// WithAuthPskNic adds the authPskNic to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskNic(authPskNic *string) *WirelessWirelessLansListParams { + o.SetAuthPskNic(authPskNic) + return o +} + +// SetAuthPskNic adds the authPskNic to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskNic(authPskNic *string) { + o.AuthPskNic = authPskNic +} + +// WithAuthPskNie adds the authPskNie to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskNie(authPskNie *string) *WirelessWirelessLansListParams { + o.SetAuthPskNie(authPskNie) + return o +} + +// SetAuthPskNie adds the authPskNie to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskNie(authPskNie *string) { + o.AuthPskNie = authPskNie +} + +// WithAuthPskNiew adds the authPskNiew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskNiew(authPskNiew *string) *WirelessWirelessLansListParams { + o.SetAuthPskNiew(authPskNiew) + return o +} + +// SetAuthPskNiew adds the authPskNiew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskNiew(authPskNiew *string) { + o.AuthPskNiew = authPskNiew +} + +// WithAuthPskNisw adds the authPskNisw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthPskNisw(authPskNisw *string) *WirelessWirelessLansListParams { + o.SetAuthPskNisw(authPskNisw) + return o +} + +// SetAuthPskNisw adds the authPskNisw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthPskNisw(authPskNisw *string) { + o.AuthPskNisw = authPskNisw +} + +// WithAuthType adds the authType to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthType(authType *string) *WirelessWirelessLansListParams { + o.SetAuthType(authType) + return o +} + +// SetAuthType adds the authType to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthType(authType *string) { + o.AuthType = authType +} + +// WithAuthTypen adds the authTypen to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithAuthTypen(authTypen *string) *WirelessWirelessLansListParams { + o.SetAuthTypen(authTypen) + return o +} + +// SetAuthTypen adds the authTypeN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetAuthTypen(authTypen *string) { + o.AuthTypen = authTypen +} + +// WithCreated adds the created to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithCreated(created *string) *WirelessWirelessLansListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithCreatedGte(createdGte *string) *WirelessWirelessLansListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithCreatedLte(createdLte *string) *WirelessWirelessLansListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescription(description *string) *WirelessWirelessLansListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionEmpty adds the descriptionEmpty to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionEmpty(descriptionEmpty *string) *WirelessWirelessLansListParams { + o.SetDescriptionEmpty(descriptionEmpty) + return o +} + +// SetDescriptionEmpty adds the descriptionEmpty to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionEmpty(descriptionEmpty *string) { + o.DescriptionEmpty = descriptionEmpty +} + +// WithDescriptionIc adds the descriptionIc to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionIc(descriptionIc *string) *WirelessWirelessLansListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionIe(descriptionIe *string) *WirelessWirelessLansListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionIew(descriptionIew *string) *WirelessWirelessLansListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionIsw(descriptionIsw *string) *WirelessWirelessLansListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionn(descriptionn *string) *WirelessWirelessLansListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionNic(descriptionNic *string) *WirelessWirelessLansListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionNie(descriptionNie *string) *WirelessWirelessLansListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionNiew(descriptionNiew *string) *WirelessWirelessLansListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithDescriptionNisw(descriptionNisw *string) *WirelessWirelessLansListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithGroup adds the group to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithGroup(group *string) *WirelessWirelessLansListParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetGroup(group *string) { + o.Group = group +} + +// WithGroupn adds the groupn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithGroupn(groupn *string) *WirelessWirelessLansListParams { + o.SetGroupn(groupn) + return o +} + +// SetGroupn adds the groupN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetGroupn(groupn *string) { + o.Groupn = groupn +} + +// WithGroupID adds the groupID to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithGroupID(groupID *string) *WirelessWirelessLansListParams { + o.SetGroupID(groupID) + return o +} + +// SetGroupID adds the groupId to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetGroupID(groupID *string) { + o.GroupID = groupID +} + +// WithGroupIDn adds the groupIDn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithGroupIDn(groupIDn *string) *WirelessWirelessLansListParams { + o.SetGroupIDn(groupIDn) + return o +} + +// SetGroupIDn adds the groupIdN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetGroupIDn(groupIDn *string) { + o.GroupIDn = groupIDn +} + +// WithID adds the id to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithID(id *string) *WirelessWirelessLansListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithIDGt(iDGt *string) *WirelessWirelessLansListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithIDGte(iDGte *string) *WirelessWirelessLansListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithIDLt(iDLt *string) *WirelessWirelessLansListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithIDLte(iDLte *string) *WirelessWirelessLansListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithIDn(iDn *string) *WirelessWirelessLansListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithLastUpdated adds the lastUpdated to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLastUpdated(lastUpdated *string) *WirelessWirelessLansListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLastUpdatedGte(lastUpdatedGte *string) *WirelessWirelessLansListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLastUpdatedLte(lastUpdatedLte *string) *WirelessWirelessLansListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithLimit(limit *int64) *WirelessWirelessLansListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithOffset(offset *int64) *WirelessWirelessLansListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithQ(q *string) *WirelessWirelessLansListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetQ(q *string) { + o.Q = q +} + +// WithSsid adds the ssid to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsid(ssid *string) *WirelessWirelessLansListParams { + o.SetSsid(ssid) + return o +} + +// SetSsid adds the ssid to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsid(ssid *string) { + o.Ssid = ssid +} + +// WithSsidEmpty adds the ssidEmpty to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidEmpty(ssidEmpty *string) *WirelessWirelessLansListParams { + o.SetSsidEmpty(ssidEmpty) + return o +} + +// SetSsidEmpty adds the ssidEmpty to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidEmpty(ssidEmpty *string) { + o.SsidEmpty = ssidEmpty +} + +// WithSsidIc adds the ssidIc to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidIc(ssidIc *string) *WirelessWirelessLansListParams { + o.SetSsidIc(ssidIc) + return o +} + +// SetSsidIc adds the ssidIc to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidIc(ssidIc *string) { + o.SsidIc = ssidIc +} + +// WithSsidIe adds the ssidIe to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidIe(ssidIe *string) *WirelessWirelessLansListParams { + o.SetSsidIe(ssidIe) + return o +} + +// SetSsidIe adds the ssidIe to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidIe(ssidIe *string) { + o.SsidIe = ssidIe +} + +// WithSsidIew adds the ssidIew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidIew(ssidIew *string) *WirelessWirelessLansListParams { + o.SetSsidIew(ssidIew) + return o +} + +// SetSsidIew adds the ssidIew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidIew(ssidIew *string) { + o.SsidIew = ssidIew +} + +// WithSsidIsw adds the ssidIsw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidIsw(ssidIsw *string) *WirelessWirelessLansListParams { + o.SetSsidIsw(ssidIsw) + return o +} + +// SetSsidIsw adds the ssidIsw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidIsw(ssidIsw *string) { + o.SsidIsw = ssidIsw +} + +// WithSsidn adds the ssidn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidn(ssidn *string) *WirelessWirelessLansListParams { + o.SetSsidn(ssidn) + return o +} + +// SetSsidn adds the ssidN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidn(ssidn *string) { + o.Ssidn = ssidn +} + +// WithSsidNic adds the ssidNic to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidNic(ssidNic *string) *WirelessWirelessLansListParams { + o.SetSsidNic(ssidNic) + return o +} + +// SetSsidNic adds the ssidNic to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidNic(ssidNic *string) { + o.SsidNic = ssidNic +} + +// WithSsidNie adds the ssidNie to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidNie(ssidNie *string) *WirelessWirelessLansListParams { + o.SetSsidNie(ssidNie) + return o +} + +// SetSsidNie adds the ssidNie to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidNie(ssidNie *string) { + o.SsidNie = ssidNie +} + +// WithSsidNiew adds the ssidNiew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidNiew(ssidNiew *string) *WirelessWirelessLansListParams { + o.SetSsidNiew(ssidNiew) + return o +} + +// SetSsidNiew adds the ssidNiew to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidNiew(ssidNiew *string) { + o.SsidNiew = ssidNiew +} + +// WithSsidNisw adds the ssidNisw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithSsidNisw(ssidNisw *string) *WirelessWirelessLansListParams { + o.SetSsidNisw(ssidNisw) + return o +} + +// SetSsidNisw adds the ssidNisw to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetSsidNisw(ssidNisw *string) { + o.SsidNisw = ssidNisw +} + +// WithTag adds the tag to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTag(tag *string) *WirelessWirelessLansListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithTagn(tagn *string) *WirelessWirelessLansListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WithVlanID adds the vlanID to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithVlanID(vlanID *string) *WirelessWirelessLansListParams { + o.SetVlanID(vlanID) + return o +} + +// SetVlanID adds the vlanId to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetVlanID(vlanID *string) { + o.VlanID = vlanID +} + +// WithVlanIDn adds the vlanIDn to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) WithVlanIDn(vlanIDn *string) *WirelessWirelessLansListParams { + o.SetVlanIDn(vlanIDn) + return o +} + +// SetVlanIDn adds the vlanIdN to the wireless wireless lans list params +func (o *WirelessWirelessLansListParams) SetVlanIDn(vlanIDn *string) { + o.VlanIDn = vlanIDn +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AuthCipher != nil { + + // query param auth_cipher + var qrAuthCipher string + + if o.AuthCipher != nil { + qrAuthCipher = *o.AuthCipher + } + qAuthCipher := qrAuthCipher + if qAuthCipher != "" { + + if err := r.SetQueryParam("auth_cipher", qAuthCipher); err != nil { + return err + } + } + } + + if o.AuthCiphern != nil { + + // query param auth_cipher__n + var qrAuthCiphern string + + if o.AuthCiphern != nil { + qrAuthCiphern = *o.AuthCiphern + } + qAuthCiphern := qrAuthCiphern + if qAuthCiphern != "" { + + if err := r.SetQueryParam("auth_cipher__n", qAuthCiphern); err != nil { + return err + } + } + } + + if o.AuthPsk != nil { + + // query param auth_psk + var qrAuthPsk string + + if o.AuthPsk != nil { + qrAuthPsk = *o.AuthPsk + } + qAuthPsk := qrAuthPsk + if qAuthPsk != "" { + + if err := r.SetQueryParam("auth_psk", qAuthPsk); err != nil { + return err + } + } + } + + if o.AuthPskEmpty != nil { + + // query param auth_psk__empty + var qrAuthPskEmpty string + + if o.AuthPskEmpty != nil { + qrAuthPskEmpty = *o.AuthPskEmpty + } + qAuthPskEmpty := qrAuthPskEmpty + if qAuthPskEmpty != "" { + + if err := r.SetQueryParam("auth_psk__empty", qAuthPskEmpty); err != nil { + return err + } + } + } + + if o.AuthPskIc != nil { + + // query param auth_psk__ic + var qrAuthPskIc string + + if o.AuthPskIc != nil { + qrAuthPskIc = *o.AuthPskIc + } + qAuthPskIc := qrAuthPskIc + if qAuthPskIc != "" { + + if err := r.SetQueryParam("auth_psk__ic", qAuthPskIc); err != nil { + return err + } + } + } + + if o.AuthPskIe != nil { + + // query param auth_psk__ie + var qrAuthPskIe string + + if o.AuthPskIe != nil { + qrAuthPskIe = *o.AuthPskIe + } + qAuthPskIe := qrAuthPskIe + if qAuthPskIe != "" { + + if err := r.SetQueryParam("auth_psk__ie", qAuthPskIe); err != nil { + return err + } + } + } + + if o.AuthPskIew != nil { + + // query param auth_psk__iew + var qrAuthPskIew string + + if o.AuthPskIew != nil { + qrAuthPskIew = *o.AuthPskIew + } + qAuthPskIew := qrAuthPskIew + if qAuthPskIew != "" { + + if err := r.SetQueryParam("auth_psk__iew", qAuthPskIew); err != nil { + return err + } + } + } + + if o.AuthPskIsw != nil { + + // query param auth_psk__isw + var qrAuthPskIsw string + + if o.AuthPskIsw != nil { + qrAuthPskIsw = *o.AuthPskIsw + } + qAuthPskIsw := qrAuthPskIsw + if qAuthPskIsw != "" { + + if err := r.SetQueryParam("auth_psk__isw", qAuthPskIsw); err != nil { + return err + } + } + } + + if o.AuthPskn != nil { + + // query param auth_psk__n + var qrAuthPskn string + + if o.AuthPskn != nil { + qrAuthPskn = *o.AuthPskn + } + qAuthPskn := qrAuthPskn + if qAuthPskn != "" { + + if err := r.SetQueryParam("auth_psk__n", qAuthPskn); err != nil { + return err + } + } + } + + if o.AuthPskNic != nil { + + // query param auth_psk__nic + var qrAuthPskNic string + + if o.AuthPskNic != nil { + qrAuthPskNic = *o.AuthPskNic + } + qAuthPskNic := qrAuthPskNic + if qAuthPskNic != "" { + + if err := r.SetQueryParam("auth_psk__nic", qAuthPskNic); err != nil { + return err + } + } + } + + if o.AuthPskNie != nil { + + // query param auth_psk__nie + var qrAuthPskNie string + + if o.AuthPskNie != nil { + qrAuthPskNie = *o.AuthPskNie + } + qAuthPskNie := qrAuthPskNie + if qAuthPskNie != "" { + + if err := r.SetQueryParam("auth_psk__nie", qAuthPskNie); err != nil { + return err + } + } + } + + if o.AuthPskNiew != nil { + + // query param auth_psk__niew + var qrAuthPskNiew string + + if o.AuthPskNiew != nil { + qrAuthPskNiew = *o.AuthPskNiew + } + qAuthPskNiew := qrAuthPskNiew + if qAuthPskNiew != "" { + + if err := r.SetQueryParam("auth_psk__niew", qAuthPskNiew); err != nil { + return err + } + } + } + + if o.AuthPskNisw != nil { + + // query param auth_psk__nisw + var qrAuthPskNisw string + + if o.AuthPskNisw != nil { + qrAuthPskNisw = *o.AuthPskNisw + } + qAuthPskNisw := qrAuthPskNisw + if qAuthPskNisw != "" { + + if err := r.SetQueryParam("auth_psk__nisw", qAuthPskNisw); err != nil { + return err + } + } + } + + if o.AuthType != nil { + + // query param auth_type + var qrAuthType string + + if o.AuthType != nil { + qrAuthType = *o.AuthType + } + qAuthType := qrAuthType + if qAuthType != "" { + + if err := r.SetQueryParam("auth_type", qAuthType); err != nil { + return err + } + } + } + + if o.AuthTypen != nil { + + // query param auth_type__n + var qrAuthTypen string + + if o.AuthTypen != nil { + qrAuthTypen = *o.AuthTypen + } + qAuthTypen := qrAuthTypen + if qAuthTypen != "" { + + if err := r.SetQueryParam("auth_type__n", qAuthTypen); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionEmpty != nil { + + // query param description__empty + var qrDescriptionEmpty string + + if o.DescriptionEmpty != nil { + qrDescriptionEmpty = *o.DescriptionEmpty + } + qDescriptionEmpty := qrDescriptionEmpty + if qDescriptionEmpty != "" { + + if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.Group != nil { + + // query param group + var qrGroup string + + if o.Group != nil { + qrGroup = *o.Group + } + qGroup := qrGroup + if qGroup != "" { + + if err := r.SetQueryParam("group", qGroup); err != nil { + return err + } + } + } + + if o.Groupn != nil { + + // query param group__n + var qrGroupn string + + if o.Groupn != nil { + qrGroupn = *o.Groupn + } + qGroupn := qrGroupn + if qGroupn != "" { + + if err := r.SetQueryParam("group__n", qGroupn); err != nil { + return err + } + } + } + + if o.GroupID != nil { + + // query param group_id + var qrGroupID string + + if o.GroupID != nil { + qrGroupID = *o.GroupID + } + qGroupID := qrGroupID + if qGroupID != "" { + + if err := r.SetQueryParam("group_id", qGroupID); err != nil { + return err + } + } + } + + if o.GroupIDn != nil { + + // query param group_id__n + var qrGroupIDn string + + if o.GroupIDn != nil { + qrGroupIDn = *o.GroupIDn + } + qGroupIDn := qrGroupIDn + if qGroupIDn != "" { + + if err := r.SetQueryParam("group_id__n", qGroupIDn); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Ssid != nil { + + // query param ssid + var qrSsid string + + if o.Ssid != nil { + qrSsid = *o.Ssid + } + qSsid := qrSsid + if qSsid != "" { + + if err := r.SetQueryParam("ssid", qSsid); err != nil { + return err + } + } + } + + if o.SsidEmpty != nil { + + // query param ssid__empty + var qrSsidEmpty string + + if o.SsidEmpty != nil { + qrSsidEmpty = *o.SsidEmpty + } + qSsidEmpty := qrSsidEmpty + if qSsidEmpty != "" { + + if err := r.SetQueryParam("ssid__empty", qSsidEmpty); err != nil { + return err + } + } + } + + if o.SsidIc != nil { + + // query param ssid__ic + var qrSsidIc string + + if o.SsidIc != nil { + qrSsidIc = *o.SsidIc + } + qSsidIc := qrSsidIc + if qSsidIc != "" { + + if err := r.SetQueryParam("ssid__ic", qSsidIc); err != nil { + return err + } + } + } + + if o.SsidIe != nil { + + // query param ssid__ie + var qrSsidIe string + + if o.SsidIe != nil { + qrSsidIe = *o.SsidIe + } + qSsidIe := qrSsidIe + if qSsidIe != "" { + + if err := r.SetQueryParam("ssid__ie", qSsidIe); err != nil { + return err + } + } + } + + if o.SsidIew != nil { + + // query param ssid__iew + var qrSsidIew string + + if o.SsidIew != nil { + qrSsidIew = *o.SsidIew + } + qSsidIew := qrSsidIew + if qSsidIew != "" { + + if err := r.SetQueryParam("ssid__iew", qSsidIew); err != nil { + return err + } + } + } + + if o.SsidIsw != nil { + + // query param ssid__isw + var qrSsidIsw string + + if o.SsidIsw != nil { + qrSsidIsw = *o.SsidIsw + } + qSsidIsw := qrSsidIsw + if qSsidIsw != "" { + + if err := r.SetQueryParam("ssid__isw", qSsidIsw); err != nil { + return err + } + } + } + + if o.Ssidn != nil { + + // query param ssid__n + var qrSsidn string + + if o.Ssidn != nil { + qrSsidn = *o.Ssidn + } + qSsidn := qrSsidn + if qSsidn != "" { + + if err := r.SetQueryParam("ssid__n", qSsidn); err != nil { + return err + } + } + } + + if o.SsidNic != nil { + + // query param ssid__nic + var qrSsidNic string + + if o.SsidNic != nil { + qrSsidNic = *o.SsidNic + } + qSsidNic := qrSsidNic + if qSsidNic != "" { + + if err := r.SetQueryParam("ssid__nic", qSsidNic); err != nil { + return err + } + } + } + + if o.SsidNie != nil { + + // query param ssid__nie + var qrSsidNie string + + if o.SsidNie != nil { + qrSsidNie = *o.SsidNie + } + qSsidNie := qrSsidNie + if qSsidNie != "" { + + if err := r.SetQueryParam("ssid__nie", qSsidNie); err != nil { + return err + } + } + } + + if o.SsidNiew != nil { + + // query param ssid__niew + var qrSsidNiew string + + if o.SsidNiew != nil { + qrSsidNiew = *o.SsidNiew + } + qSsidNiew := qrSsidNiew + if qSsidNiew != "" { + + if err := r.SetQueryParam("ssid__niew", qSsidNiew); err != nil { + return err + } + } + } + + if o.SsidNisw != nil { + + // query param ssid__nisw + var qrSsidNisw string + + if o.SsidNisw != nil { + qrSsidNisw = *o.SsidNisw + } + qSsidNisw := qrSsidNisw + if qSsidNisw != "" { + + if err := r.SetQueryParam("ssid__nisw", qSsidNisw); err != nil { + return err + } + } + } + + 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.VlanID != nil { + + // query param vlan_id + var qrVlanID string + + if o.VlanID != nil { + qrVlanID = *o.VlanID + } + qVlanID := qrVlanID + if qVlanID != "" { + + if err := r.SetQueryParam("vlan_id", qVlanID); err != nil { + return err + } + } + } + + if o.VlanIDn != nil { + + // query param vlan_id__n + var qrVlanIDn string + + if o.VlanIDn != nil { + qrVlanIDn = *o.VlanIDn + } + qVlanIDn := qrVlanIDn + if qVlanIDn != "" { + + if err := r.SetQueryParam("vlan_id__n", qVlanIDn); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_list_responses.go b/netbox/client/wireless/wireless_wireless_lans_list_responses.go new file mode 100644 index 000000000..0c6351a34 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_list_responses.go @@ -0,0 +1,247 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansListReader is a Reader for the WirelessWirelessLansList structure. +type WirelessWirelessLansListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLansListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansListOK creates a WirelessWirelessLansListOK with default headers values +func NewWirelessWirelessLansListOK() *WirelessWirelessLansListOK { + return &WirelessWirelessLansListOK{} +} + +/* WirelessWirelessLansListOK describes a response with status code 200, with default header values. + +WirelessWirelessLansListOK wireless wireless lans list o k +*/ +type WirelessWirelessLansListOK struct { + Payload *WirelessWirelessLansListOKBody +} + +func (o *WirelessWirelessLansListOK) Error() string { + return fmt.Sprintf("[GET /wireless/wireless-lans/][%d] wirelessWirelessLansListOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLansListOK) GetPayload() *WirelessWirelessLansListOKBody { + return o.Payload +} + +func (o *WirelessWirelessLansListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(WirelessWirelessLansListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*WirelessWirelessLansListOKBody wireless wireless lans list o k body +swagger:model WirelessWirelessLansListOKBody +*/ +type WirelessWirelessLansListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.WirelessLAN `json:"results"` +} + +// Validate validates this wireless wireless lans list o k body +func (o *WirelessWirelessLansListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *WirelessWirelessLansListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("wirelessWirelessLansListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLansListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("wirelessWirelessLansListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLansListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("wirelessWirelessLansListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLansListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("wirelessWirelessLansListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wirelessWirelessLansListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wirelessWirelessLansListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this wireless wireless lans list o k body based on the context it is used +func (o *WirelessWirelessLansListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *WirelessWirelessLansListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wirelessWirelessLansListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wirelessWirelessLansListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *WirelessWirelessLansListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *WirelessWirelessLansListOKBody) UnmarshalBinary(b []byte) error { + var res WirelessWirelessLansListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_partial_update_parameters.go b/netbox/client/wireless/wireless_wireless_lans_partial_update_parameters.go new file mode 100644 index 000000000..2c1cbee90 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 wireless + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLansPartialUpdateParams creates a new WirelessWirelessLansPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansPartialUpdateParams() *WirelessWirelessLansPartialUpdateParams { + return &WirelessWirelessLansPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansPartialUpdateParamsWithTimeout creates a new WirelessWirelessLansPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansPartialUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansPartialUpdateParams { + return &WirelessWirelessLansPartialUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansPartialUpdateParamsWithContext creates a new WirelessWirelessLansPartialUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansPartialUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLansPartialUpdateParams { + return &WirelessWirelessLansPartialUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansPartialUpdateParamsWithHTTPClient creates a new WirelessWirelessLansPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansPartialUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansPartialUpdateParams { + return &WirelessWirelessLansPartialUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansPartialUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lans partial update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansPartialUpdateParams struct { + + // Data. + Data *models.WritableWirelessLAN + + /* ID. + + A unique integer value identifying this Wireless LAN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansPartialUpdateParams) WithDefaults() *WirelessWirelessLansPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLansPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) WithData(data *models.WritableWirelessLAN) *WirelessWirelessLansPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) SetData(data *models.WritableWirelessLAN) { + o.Data = data +} + +// WithID adds the id to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) WithID(id int64) *WirelessWirelessLansPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lans partial update params +func (o *WirelessWirelessLansPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/wireless/wireless_wireless_lans_partial_update_responses.go b/netbox/client/wireless/wireless_wireless_lans_partial_update_responses.go new file mode 100644 index 000000000..336426bfd --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansPartialUpdateReader is a Reader for the WirelessWirelessLansPartialUpdate structure. +type WirelessWirelessLansPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLansPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansPartialUpdateOK creates a WirelessWirelessLansPartialUpdateOK with default headers values +func NewWirelessWirelessLansPartialUpdateOK() *WirelessWirelessLansPartialUpdateOK { + return &WirelessWirelessLansPartialUpdateOK{} +} + +/* WirelessWirelessLansPartialUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLansPartialUpdateOK wireless wireless lans partial update o k +*/ +type WirelessWirelessLansPartialUpdateOK struct { + Payload *models.WirelessLAN +} + +func (o *WirelessWirelessLansPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /wireless/wireless-lans/{id}/][%d] wirelessWirelessLansPartialUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLansPartialUpdateOK) GetPayload() *models.WirelessLAN { + return o.Payload +} + +func (o *WirelessWirelessLansPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLAN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_read_parameters.go b/netbox/client/wireless/wireless_wireless_lans_read_parameters.go new file mode 100644 index 000000000..439ae6821 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_read_parameters.go @@ -0,0 +1,165 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLansReadParams creates a new WirelessWirelessLansReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansReadParams() *WirelessWirelessLansReadParams { + return &WirelessWirelessLansReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansReadParamsWithTimeout creates a new WirelessWirelessLansReadParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansReadParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansReadParams { + return &WirelessWirelessLansReadParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansReadParamsWithContext creates a new WirelessWirelessLansReadParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansReadParamsWithContext(ctx context.Context) *WirelessWirelessLansReadParams { + return &WirelessWirelessLansReadParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansReadParamsWithHTTPClient creates a new WirelessWirelessLansReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansReadParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansReadParams { + return &WirelessWirelessLansReadParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansReadParams contains all the parameters to send to the API endpoint + for the wireless wireless lans read operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansReadParams struct { + + /* ID. + + A unique integer value identifying this Wireless LAN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansReadParams) WithDefaults() *WirelessWirelessLansReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) WithContext(ctx context.Context) *WirelessWirelessLansReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) WithID(id int64) *WirelessWirelessLansReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lans read params +func (o *WirelessWirelessLansReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansReadParams) 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/netbox/client/wireless/wireless_wireless_lans_read_responses.go b/netbox/client/wireless/wireless_wireless_lans_read_responses.go new file mode 100644 index 000000000..3cb9b0531 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_read_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansReadReader is a Reader for the WirelessWirelessLansRead structure. +type WirelessWirelessLansReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLansReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansReadOK creates a WirelessWirelessLansReadOK with default headers values +func NewWirelessWirelessLansReadOK() *WirelessWirelessLansReadOK { + return &WirelessWirelessLansReadOK{} +} + +/* WirelessWirelessLansReadOK describes a response with status code 200, with default header values. + +WirelessWirelessLansReadOK wireless wireless lans read o k +*/ +type WirelessWirelessLansReadOK struct { + Payload *models.WirelessLAN +} + +func (o *WirelessWirelessLansReadOK) Error() string { + return fmt.Sprintf("[GET /wireless/wireless-lans/{id}/][%d] wirelessWirelessLansReadOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLansReadOK) GetPayload() *models.WirelessLAN { + return o.Payload +} + +func (o *WirelessWirelessLansReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLAN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_lans_update_parameters.go b/netbox/client/wireless/wireless_wireless_lans_update_parameters.go new file mode 100644 index 000000000..1509b44a8 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_update_parameters.go @@ -0,0 +1,186 @@ +// 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 wireless + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLansUpdateParams creates a new WirelessWirelessLansUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLansUpdateParams() *WirelessWirelessLansUpdateParams { + return &WirelessWirelessLansUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLansUpdateParamsWithTimeout creates a new WirelessWirelessLansUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLansUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLansUpdateParams { + return &WirelessWirelessLansUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLansUpdateParamsWithContext creates a new WirelessWirelessLansUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLansUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLansUpdateParams { + return &WirelessWirelessLansUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLansUpdateParamsWithHTTPClient creates a new WirelessWirelessLansUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLansUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLansUpdateParams { + return &WirelessWirelessLansUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLansUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless lans update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLansUpdateParams struct { + + // Data. + Data *models.WritableWirelessLAN + + /* ID. + + A unique integer value identifying this Wireless LAN. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless lans update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansUpdateParams) WithDefaults() *WirelessWirelessLansUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless lans update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLansUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLansUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLansUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLansUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) WithData(data *models.WritableWirelessLAN) *WirelessWirelessLansUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) SetData(data *models.WritableWirelessLAN) { + o.Data = data +} + +// WithID adds the id to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) WithID(id int64) *WirelessWirelessLansUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless lans update params +func (o *WirelessWirelessLansUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLansUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/wireless/wireless_wireless_lans_update_responses.go b/netbox/client/wireless/wireless_wireless_lans_update_responses.go new file mode 100644 index 000000000..fe4fbb250 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_lans_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLansUpdateReader is a Reader for the WirelessWirelessLansUpdate structure. +type WirelessWirelessLansUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLansUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLansUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLansUpdateOK creates a WirelessWirelessLansUpdateOK with default headers values +func NewWirelessWirelessLansUpdateOK() *WirelessWirelessLansUpdateOK { + return &WirelessWirelessLansUpdateOK{} +} + +/* WirelessWirelessLansUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLansUpdateOK wireless wireless lans update o k +*/ +type WirelessWirelessLansUpdateOK struct { + Payload *models.WirelessLAN +} + +func (o *WirelessWirelessLansUpdateOK) Error() string { + return fmt.Sprintf("[PUT /wireless/wireless-lans/{id}/][%d] wirelessWirelessLansUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLansUpdateOK) GetPayload() *models.WirelessLAN { + return o.Payload +} + +func (o *WirelessWirelessLansUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLAN) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_bulk_delete_parameters.go b/netbox/client/wireless/wireless_wireless_links_bulk_delete_parameters.go new file mode 100644 index 000000000..c710d9b7c --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_bulk_delete_parameters.go @@ -0,0 +1,141 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLinksBulkDeleteParams creates a new WirelessWirelessLinksBulkDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksBulkDeleteParams() *WirelessWirelessLinksBulkDeleteParams { + return &WirelessWirelessLinksBulkDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksBulkDeleteParamsWithTimeout creates a new WirelessWirelessLinksBulkDeleteParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksBulkDeleteParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksBulkDeleteParams { + return &WirelessWirelessLinksBulkDeleteParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksBulkDeleteParamsWithContext creates a new WirelessWirelessLinksBulkDeleteParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksBulkDeleteParamsWithContext(ctx context.Context) *WirelessWirelessLinksBulkDeleteParams { + return &WirelessWirelessLinksBulkDeleteParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksBulkDeleteParamsWithHTTPClient creates a new WirelessWirelessLinksBulkDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksBulkDeleteParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksBulkDeleteParams { + return &WirelessWirelessLinksBulkDeleteParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksBulkDeleteParams contains all the parameters to send to the API endpoint + for the wireless wireless links bulk delete operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksBulkDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksBulkDeleteParams) WithDefaults() *WirelessWirelessLinksBulkDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links bulk delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksBulkDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links bulk delete params +func (o *WirelessWirelessLinksBulkDeleteParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links bulk delete params +func (o *WirelessWirelessLinksBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links bulk delete params +func (o *WirelessWirelessLinksBulkDeleteParams) WithContext(ctx context.Context) *WirelessWirelessLinksBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links bulk delete params +func (o *WirelessWirelessLinksBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links bulk delete params +func (o *WirelessWirelessLinksBulkDeleteParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links bulk delete params +func (o *WirelessWirelessLinksBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksBulkDeleteParams) 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/netbox/client/wireless/wireless_wireless_links_bulk_delete_responses.go b/netbox/client/wireless/wireless_wireless_links_bulk_delete_responses.go new file mode 100644 index 000000000..e1bfb2158 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_bulk_delete_responses.go @@ -0,0 +1,68 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// WirelessWirelessLinksBulkDeleteReader is a Reader for the WirelessWirelessLinksBulkDelete structure. +type WirelessWirelessLinksBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewWirelessWirelessLinksBulkDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksBulkDeleteNoContent creates a WirelessWirelessLinksBulkDeleteNoContent with default headers values +func NewWirelessWirelessLinksBulkDeleteNoContent() *WirelessWirelessLinksBulkDeleteNoContent { + return &WirelessWirelessLinksBulkDeleteNoContent{} +} + +/* WirelessWirelessLinksBulkDeleteNoContent describes a response with status code 204, with default header values. + +WirelessWirelessLinksBulkDeleteNoContent wireless wireless links bulk delete no content +*/ +type WirelessWirelessLinksBulkDeleteNoContent struct { +} + +func (o *WirelessWirelessLinksBulkDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /wireless/wireless-links/][%d] wirelessWirelessLinksBulkDeleteNoContent ", 204) +} + +func (o *WirelessWirelessLinksBulkDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_bulk_partial_update_parameters.go b/netbox/client/wireless/wireless_wireless_links_bulk_partial_update_parameters.go new file mode 100644 index 000000000..93a61c22f --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_bulk_partial_update_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLinksBulkPartialUpdateParams creates a new WirelessWirelessLinksBulkPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksBulkPartialUpdateParams() *WirelessWirelessLinksBulkPartialUpdateParams { + return &WirelessWirelessLinksBulkPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksBulkPartialUpdateParamsWithTimeout creates a new WirelessWirelessLinksBulkPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksBulkPartialUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksBulkPartialUpdateParams { + return &WirelessWirelessLinksBulkPartialUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksBulkPartialUpdateParamsWithContext creates a new WirelessWirelessLinksBulkPartialUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksBulkPartialUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLinksBulkPartialUpdateParams { + return &WirelessWirelessLinksBulkPartialUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksBulkPartialUpdateParamsWithHTTPClient creates a new WirelessWirelessLinksBulkPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksBulkPartialUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksBulkPartialUpdateParams { + return &WirelessWirelessLinksBulkPartialUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksBulkPartialUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless links bulk partial update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksBulkPartialUpdateParams struct { + + // Data. + Data *models.WritableWirelessLink + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksBulkPartialUpdateParams) WithDefaults() *WirelessWirelessLinksBulkPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links bulk partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksBulkPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksBulkPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLinksBulkPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksBulkPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) WithData(data *models.WritableWirelessLink) *WirelessWirelessLinksBulkPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless links bulk partial update params +func (o *WirelessWirelessLinksBulkPartialUpdateParams) SetData(data *models.WritableWirelessLink) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksBulkPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_bulk_partial_update_responses.go b/netbox/client/wireless/wireless_wireless_links_bulk_partial_update_responses.go new file mode 100644 index 000000000..95112888c --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_bulk_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksBulkPartialUpdateReader is a Reader for the WirelessWirelessLinksBulkPartialUpdate structure. +type WirelessWirelessLinksBulkPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksBulkPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLinksBulkPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksBulkPartialUpdateOK creates a WirelessWirelessLinksBulkPartialUpdateOK with default headers values +func NewWirelessWirelessLinksBulkPartialUpdateOK() *WirelessWirelessLinksBulkPartialUpdateOK { + return &WirelessWirelessLinksBulkPartialUpdateOK{} +} + +/* WirelessWirelessLinksBulkPartialUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLinksBulkPartialUpdateOK wireless wireless links bulk partial update o k +*/ +type WirelessWirelessLinksBulkPartialUpdateOK struct { + Payload *models.WirelessLink +} + +func (o *WirelessWirelessLinksBulkPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /wireless/wireless-links/][%d] wirelessWirelessLinksBulkPartialUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLinksBulkPartialUpdateOK) GetPayload() *models.WirelessLink { + return o.Payload +} + +func (o *WirelessWirelessLinksBulkPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLink) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_bulk_update_parameters.go b/netbox/client/wireless/wireless_wireless_links_bulk_update_parameters.go new file mode 100644 index 000000000..16fbc81e7 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_bulk_update_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLinksBulkUpdateParams creates a new WirelessWirelessLinksBulkUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksBulkUpdateParams() *WirelessWirelessLinksBulkUpdateParams { + return &WirelessWirelessLinksBulkUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksBulkUpdateParamsWithTimeout creates a new WirelessWirelessLinksBulkUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksBulkUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksBulkUpdateParams { + return &WirelessWirelessLinksBulkUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksBulkUpdateParamsWithContext creates a new WirelessWirelessLinksBulkUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksBulkUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLinksBulkUpdateParams { + return &WirelessWirelessLinksBulkUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksBulkUpdateParamsWithHTTPClient creates a new WirelessWirelessLinksBulkUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksBulkUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksBulkUpdateParams { + return &WirelessWirelessLinksBulkUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksBulkUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless links bulk update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksBulkUpdateParams struct { + + // Data. + Data *models.WritableWirelessLink + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksBulkUpdateParams) WithDefaults() *WirelessWirelessLinksBulkUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links bulk update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksBulkUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksBulkUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLinksBulkUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksBulkUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) WithData(data *models.WritableWirelessLink) *WirelessWirelessLinksBulkUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless links bulk update params +func (o *WirelessWirelessLinksBulkUpdateParams) SetData(data *models.WritableWirelessLink) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksBulkUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_bulk_update_responses.go b/netbox/client/wireless/wireless_wireless_links_bulk_update_responses.go new file mode 100644 index 000000000..b69dd75b1 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_bulk_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksBulkUpdateReader is a Reader for the WirelessWirelessLinksBulkUpdate structure. +type WirelessWirelessLinksBulkUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksBulkUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLinksBulkUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksBulkUpdateOK creates a WirelessWirelessLinksBulkUpdateOK with default headers values +func NewWirelessWirelessLinksBulkUpdateOK() *WirelessWirelessLinksBulkUpdateOK { + return &WirelessWirelessLinksBulkUpdateOK{} +} + +/* WirelessWirelessLinksBulkUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLinksBulkUpdateOK wireless wireless links bulk update o k +*/ +type WirelessWirelessLinksBulkUpdateOK struct { + Payload *models.WirelessLink +} + +func (o *WirelessWirelessLinksBulkUpdateOK) Error() string { + return fmt.Sprintf("[PUT /wireless/wireless-links/][%d] wirelessWirelessLinksBulkUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLinksBulkUpdateOK) GetPayload() *models.WirelessLink { + return o.Payload +} + +func (o *WirelessWirelessLinksBulkUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLink) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_create_parameters.go b/netbox/client/wireless/wireless_wireless_links_create_parameters.go new file mode 100644 index 000000000..744689406 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_create_parameters.go @@ -0,0 +1,163 @@ +// 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 wireless + +// 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/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLinksCreateParams creates a new WirelessWirelessLinksCreateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksCreateParams() *WirelessWirelessLinksCreateParams { + return &WirelessWirelessLinksCreateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksCreateParamsWithTimeout creates a new WirelessWirelessLinksCreateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksCreateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksCreateParams { + return &WirelessWirelessLinksCreateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksCreateParamsWithContext creates a new WirelessWirelessLinksCreateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksCreateParamsWithContext(ctx context.Context) *WirelessWirelessLinksCreateParams { + return &WirelessWirelessLinksCreateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksCreateParamsWithHTTPClient creates a new WirelessWirelessLinksCreateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksCreateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksCreateParams { + return &WirelessWirelessLinksCreateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksCreateParams contains all the parameters to send to the API endpoint + for the wireless wireless links create operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksCreateParams struct { + + // Data. + Data *models.WritableWirelessLink + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksCreateParams) WithDefaults() *WirelessWirelessLinksCreateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links create params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksCreateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) WithContext(ctx context.Context) *WirelessWirelessLinksCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) WithData(data *models.WritableWirelessLink) *WirelessWirelessLinksCreateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless links create params +func (o *WirelessWirelessLinksCreateParams) SetData(data *models.WritableWirelessLink) { + o.Data = data +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_create_responses.go b/netbox/client/wireless/wireless_wireless_links_create_responses.go new file mode 100644 index 000000000..dc179fbc1 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_create_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksCreateReader is a Reader for the WirelessWirelessLinksCreate structure. +type WirelessWirelessLinksCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewWirelessWirelessLinksCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksCreateCreated creates a WirelessWirelessLinksCreateCreated with default headers values +func NewWirelessWirelessLinksCreateCreated() *WirelessWirelessLinksCreateCreated { + return &WirelessWirelessLinksCreateCreated{} +} + +/* WirelessWirelessLinksCreateCreated describes a response with status code 201, with default header values. + +WirelessWirelessLinksCreateCreated wireless wireless links create created +*/ +type WirelessWirelessLinksCreateCreated struct { + Payload *models.WirelessLink +} + +func (o *WirelessWirelessLinksCreateCreated) Error() string { + return fmt.Sprintf("[POST /wireless/wireless-links/][%d] wirelessWirelessLinksCreateCreated %+v", 201, o.Payload) +} +func (o *WirelessWirelessLinksCreateCreated) GetPayload() *models.WirelessLink { + return o.Payload +} + +func (o *WirelessWirelessLinksCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLink) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_delete_parameters.go b/netbox/client/wireless/wireless_wireless_links_delete_parameters.go new file mode 100644 index 000000000..d7a042c9b --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_delete_parameters.go @@ -0,0 +1,165 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLinksDeleteParams creates a new WirelessWirelessLinksDeleteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksDeleteParams() *WirelessWirelessLinksDeleteParams { + return &WirelessWirelessLinksDeleteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksDeleteParamsWithTimeout creates a new WirelessWirelessLinksDeleteParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksDeleteParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksDeleteParams { + return &WirelessWirelessLinksDeleteParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksDeleteParamsWithContext creates a new WirelessWirelessLinksDeleteParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksDeleteParamsWithContext(ctx context.Context) *WirelessWirelessLinksDeleteParams { + return &WirelessWirelessLinksDeleteParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksDeleteParamsWithHTTPClient creates a new WirelessWirelessLinksDeleteParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksDeleteParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksDeleteParams { + return &WirelessWirelessLinksDeleteParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksDeleteParams contains all the parameters to send to the API endpoint + for the wireless wireless links delete operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksDeleteParams struct { + + /* ID. + + A unique integer value identifying this wireless link. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksDeleteParams) WithDefaults() *WirelessWirelessLinksDeleteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links delete params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksDeleteParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) WithContext(ctx context.Context) *WirelessWirelessLinksDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) WithID(id int64) *WirelessWirelessLinksDeleteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless links delete params +func (o *WirelessWirelessLinksDeleteParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksDeleteParams) 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/netbox/client/wireless/wireless_wireless_links_delete_responses.go b/netbox/client/wireless/wireless_wireless_links_delete_responses.go new file mode 100644 index 000000000..0e8209e87 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_delete_responses.go @@ -0,0 +1,68 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// WirelessWirelessLinksDeleteReader is a Reader for the WirelessWirelessLinksDelete structure. +type WirelessWirelessLinksDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewWirelessWirelessLinksDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksDeleteNoContent creates a WirelessWirelessLinksDeleteNoContent with default headers values +func NewWirelessWirelessLinksDeleteNoContent() *WirelessWirelessLinksDeleteNoContent { + return &WirelessWirelessLinksDeleteNoContent{} +} + +/* WirelessWirelessLinksDeleteNoContent describes a response with status code 204, with default header values. + +WirelessWirelessLinksDeleteNoContent wireless wireless links delete no content +*/ +type WirelessWirelessLinksDeleteNoContent struct { +} + +func (o *WirelessWirelessLinksDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /wireless/wireless-links/{id}/][%d] wirelessWirelessLinksDeleteNoContent ", 204) +} + +func (o *WirelessWirelessLinksDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_list_parameters.go b/netbox/client/wireless/wireless_wireless_links_list_parameters.go new file mode 100644 index 000000000..50c21abe9 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_list_parameters.go @@ -0,0 +1,2257 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLinksListParams creates a new WirelessWirelessLinksListParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksListParams() *WirelessWirelessLinksListParams { + return &WirelessWirelessLinksListParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksListParamsWithTimeout creates a new WirelessWirelessLinksListParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksListParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksListParams { + return &WirelessWirelessLinksListParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksListParamsWithContext creates a new WirelessWirelessLinksListParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksListParamsWithContext(ctx context.Context) *WirelessWirelessLinksListParams { + return &WirelessWirelessLinksListParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksListParamsWithHTTPClient creates a new WirelessWirelessLinksListParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksListParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksListParams { + return &WirelessWirelessLinksListParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksListParams contains all the parameters to send to the API endpoint + for the wireless wireless links list operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksListParams struct { + + // AuthCipher. + AuthCipher *string + + // AuthCiphern. + AuthCiphern *string + + // AuthPsk. + AuthPsk *string + + // AuthPskEmpty. + AuthPskEmpty *string + + // AuthPskIc. + AuthPskIc *string + + // AuthPskIe. + AuthPskIe *string + + // AuthPskIew. + AuthPskIew *string + + // AuthPskIsw. + AuthPskIsw *string + + // AuthPskn. + AuthPskn *string + + // AuthPskNic. + AuthPskNic *string + + // AuthPskNie. + AuthPskNie *string + + // AuthPskNiew. + AuthPskNiew *string + + // AuthPskNisw. + AuthPskNisw *string + + // AuthType. + AuthType *string + + // AuthTypen. + AuthTypen *string + + // Created. + Created *string + + // CreatedGte. + CreatedGte *string + + // CreatedLte. + CreatedLte *string + + // Description. + Description *string + + // DescriptionEmpty. + DescriptionEmpty *string + + // DescriptionIc. + DescriptionIc *string + + // DescriptionIe. + DescriptionIe *string + + // DescriptionIew. + DescriptionIew *string + + // DescriptionIsw. + DescriptionIsw *string + + // Descriptionn. + Descriptionn *string + + // DescriptionNic. + DescriptionNic *string + + // DescriptionNie. + DescriptionNie *string + + // DescriptionNiew. + DescriptionNiew *string + + // DescriptionNisw. + DescriptionNisw *string + + // ID. + ID *string + + // IDGt. + IDGt *string + + // IDGte. + IDGte *string + + // IDLt. + IDLt *string + + // IDLte. + IDLte *string + + // IDn. + IDn *string + + // InterfaceaID. + InterfaceaID *string + + // InterfaceaIDGt. + InterfaceaIDGt *string + + // InterfaceaIDGte. + InterfaceaIDGte *string + + // InterfaceaIDLt. + InterfaceaIDLt *string + + // InterfaceaIDLte. + InterfaceaIDLte *string + + // InterfaceaIDn. + InterfaceaIDn *string + + // InterfacebID. + InterfacebID *string + + // InterfacebIDGt. + InterfacebIDGt *string + + // InterfacebIDGte. + InterfacebIDGte *string + + // InterfacebIDLt. + InterfacebIDLt *string + + // InterfacebIDLte. + InterfacebIDLte *string + + // InterfacebIDn. + InterfacebIDn *string + + // LastUpdated. + LastUpdated *string + + // LastUpdatedGte. + LastUpdatedGte *string + + // LastUpdatedLte. + LastUpdatedLte *string + + /* Limit. + + Number of results to return per page. + */ + Limit *int64 + + /* Offset. + + The initial index from which to return the results. + */ + Offset *int64 + + // Q. + Q *string + + // Ssid. + Ssid *string + + // SsidEmpty. + SsidEmpty *string + + // SsidIc. + SsidIc *string + + // SsidIe. + SsidIe *string + + // SsidIew. + SsidIew *string + + // SsidIsw. + SsidIsw *string + + // Ssidn. + Ssidn *string + + // SsidNic. + SsidNic *string + + // SsidNie. + SsidNie *string + + // SsidNiew. + SsidNiew *string + + // SsidNisw. + SsidNisw *string + + // Status. + Status *string + + // Statusn. + Statusn *string + + // Tag. + Tag *string + + // Tagn. + Tagn *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksListParams) WithDefaults() *WirelessWirelessLinksListParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links list params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksListParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithContext(ctx context.Context) *WirelessWirelessLinksListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthCipher adds the authCipher to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthCipher(authCipher *string) *WirelessWirelessLinksListParams { + o.SetAuthCipher(authCipher) + return o +} + +// SetAuthCipher adds the authCipher to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthCipher(authCipher *string) { + o.AuthCipher = authCipher +} + +// WithAuthCiphern adds the authCiphern to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthCiphern(authCiphern *string) *WirelessWirelessLinksListParams { + o.SetAuthCiphern(authCiphern) + return o +} + +// SetAuthCiphern adds the authCipherN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthCiphern(authCiphern *string) { + o.AuthCiphern = authCiphern +} + +// WithAuthPsk adds the authPsk to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPsk(authPsk *string) *WirelessWirelessLinksListParams { + o.SetAuthPsk(authPsk) + return o +} + +// SetAuthPsk adds the authPsk to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPsk(authPsk *string) { + o.AuthPsk = authPsk +} + +// WithAuthPskEmpty adds the authPskEmpty to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskEmpty(authPskEmpty *string) *WirelessWirelessLinksListParams { + o.SetAuthPskEmpty(authPskEmpty) + return o +} + +// SetAuthPskEmpty adds the authPskEmpty to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskEmpty(authPskEmpty *string) { + o.AuthPskEmpty = authPskEmpty +} + +// WithAuthPskIc adds the authPskIc to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskIc(authPskIc *string) *WirelessWirelessLinksListParams { + o.SetAuthPskIc(authPskIc) + return o +} + +// SetAuthPskIc adds the authPskIc to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskIc(authPskIc *string) { + o.AuthPskIc = authPskIc +} + +// WithAuthPskIe adds the authPskIe to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskIe(authPskIe *string) *WirelessWirelessLinksListParams { + o.SetAuthPskIe(authPskIe) + return o +} + +// SetAuthPskIe adds the authPskIe to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskIe(authPskIe *string) { + o.AuthPskIe = authPskIe +} + +// WithAuthPskIew adds the authPskIew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskIew(authPskIew *string) *WirelessWirelessLinksListParams { + o.SetAuthPskIew(authPskIew) + return o +} + +// SetAuthPskIew adds the authPskIew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskIew(authPskIew *string) { + o.AuthPskIew = authPskIew +} + +// WithAuthPskIsw adds the authPskIsw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskIsw(authPskIsw *string) *WirelessWirelessLinksListParams { + o.SetAuthPskIsw(authPskIsw) + return o +} + +// SetAuthPskIsw adds the authPskIsw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskIsw(authPskIsw *string) { + o.AuthPskIsw = authPskIsw +} + +// WithAuthPskn adds the authPskn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskn(authPskn *string) *WirelessWirelessLinksListParams { + o.SetAuthPskn(authPskn) + return o +} + +// SetAuthPskn adds the authPskN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskn(authPskn *string) { + o.AuthPskn = authPskn +} + +// WithAuthPskNic adds the authPskNic to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskNic(authPskNic *string) *WirelessWirelessLinksListParams { + o.SetAuthPskNic(authPskNic) + return o +} + +// SetAuthPskNic adds the authPskNic to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskNic(authPskNic *string) { + o.AuthPskNic = authPskNic +} + +// WithAuthPskNie adds the authPskNie to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskNie(authPskNie *string) *WirelessWirelessLinksListParams { + o.SetAuthPskNie(authPskNie) + return o +} + +// SetAuthPskNie adds the authPskNie to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskNie(authPskNie *string) { + o.AuthPskNie = authPskNie +} + +// WithAuthPskNiew adds the authPskNiew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskNiew(authPskNiew *string) *WirelessWirelessLinksListParams { + o.SetAuthPskNiew(authPskNiew) + return o +} + +// SetAuthPskNiew adds the authPskNiew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskNiew(authPskNiew *string) { + o.AuthPskNiew = authPskNiew +} + +// WithAuthPskNisw adds the authPskNisw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthPskNisw(authPskNisw *string) *WirelessWirelessLinksListParams { + o.SetAuthPskNisw(authPskNisw) + return o +} + +// SetAuthPskNisw adds the authPskNisw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthPskNisw(authPskNisw *string) { + o.AuthPskNisw = authPskNisw +} + +// WithAuthType adds the authType to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthType(authType *string) *WirelessWirelessLinksListParams { + o.SetAuthType(authType) + return o +} + +// SetAuthType adds the authType to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthType(authType *string) { + o.AuthType = authType +} + +// WithAuthTypen adds the authTypen to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithAuthTypen(authTypen *string) *WirelessWirelessLinksListParams { + o.SetAuthTypen(authTypen) + return o +} + +// SetAuthTypen adds the authTypeN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetAuthTypen(authTypen *string) { + o.AuthTypen = authTypen +} + +// WithCreated adds the created to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithCreated(created *string) *WirelessWirelessLinksListParams { + o.SetCreated(created) + return o +} + +// SetCreated adds the created to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetCreated(created *string) { + o.Created = created +} + +// WithCreatedGte adds the createdGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithCreatedGte(createdGte *string) *WirelessWirelessLinksListParams { + o.SetCreatedGte(createdGte) + return o +} + +// SetCreatedGte adds the createdGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetCreatedGte(createdGte *string) { + o.CreatedGte = createdGte +} + +// WithCreatedLte adds the createdLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithCreatedLte(createdLte *string) *WirelessWirelessLinksListParams { + o.SetCreatedLte(createdLte) + return o +} + +// SetCreatedLte adds the createdLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetCreatedLte(createdLte *string) { + o.CreatedLte = createdLte +} + +// WithDescription adds the description to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescription(description *string) *WirelessWirelessLinksListParams { + o.SetDescription(description) + return o +} + +// SetDescription adds the description to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescription(description *string) { + o.Description = description +} + +// WithDescriptionEmpty adds the descriptionEmpty to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionEmpty(descriptionEmpty *string) *WirelessWirelessLinksListParams { + o.SetDescriptionEmpty(descriptionEmpty) + return o +} + +// SetDescriptionEmpty adds the descriptionEmpty to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionEmpty(descriptionEmpty *string) { + o.DescriptionEmpty = descriptionEmpty +} + +// WithDescriptionIc adds the descriptionIc to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionIc(descriptionIc *string) *WirelessWirelessLinksListParams { + o.SetDescriptionIc(descriptionIc) + return o +} + +// SetDescriptionIc adds the descriptionIc to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionIc(descriptionIc *string) { + o.DescriptionIc = descriptionIc +} + +// WithDescriptionIe adds the descriptionIe to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionIe(descriptionIe *string) *WirelessWirelessLinksListParams { + o.SetDescriptionIe(descriptionIe) + return o +} + +// SetDescriptionIe adds the descriptionIe to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionIe(descriptionIe *string) { + o.DescriptionIe = descriptionIe +} + +// WithDescriptionIew adds the descriptionIew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionIew(descriptionIew *string) *WirelessWirelessLinksListParams { + o.SetDescriptionIew(descriptionIew) + return o +} + +// SetDescriptionIew adds the descriptionIew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionIew(descriptionIew *string) { + o.DescriptionIew = descriptionIew +} + +// WithDescriptionIsw adds the descriptionIsw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionIsw(descriptionIsw *string) *WirelessWirelessLinksListParams { + o.SetDescriptionIsw(descriptionIsw) + return o +} + +// SetDescriptionIsw adds the descriptionIsw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionIsw(descriptionIsw *string) { + o.DescriptionIsw = descriptionIsw +} + +// WithDescriptionn adds the descriptionn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionn(descriptionn *string) *WirelessWirelessLinksListParams { + o.SetDescriptionn(descriptionn) + return o +} + +// SetDescriptionn adds the descriptionN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionn(descriptionn *string) { + o.Descriptionn = descriptionn +} + +// WithDescriptionNic adds the descriptionNic to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionNic(descriptionNic *string) *WirelessWirelessLinksListParams { + o.SetDescriptionNic(descriptionNic) + return o +} + +// SetDescriptionNic adds the descriptionNic to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionNic(descriptionNic *string) { + o.DescriptionNic = descriptionNic +} + +// WithDescriptionNie adds the descriptionNie to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionNie(descriptionNie *string) *WirelessWirelessLinksListParams { + o.SetDescriptionNie(descriptionNie) + return o +} + +// SetDescriptionNie adds the descriptionNie to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionNie(descriptionNie *string) { + o.DescriptionNie = descriptionNie +} + +// WithDescriptionNiew adds the descriptionNiew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionNiew(descriptionNiew *string) *WirelessWirelessLinksListParams { + o.SetDescriptionNiew(descriptionNiew) + return o +} + +// SetDescriptionNiew adds the descriptionNiew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionNiew(descriptionNiew *string) { + o.DescriptionNiew = descriptionNiew +} + +// WithDescriptionNisw adds the descriptionNisw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithDescriptionNisw(descriptionNisw *string) *WirelessWirelessLinksListParams { + o.SetDescriptionNisw(descriptionNisw) + return o +} + +// SetDescriptionNisw adds the descriptionNisw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetDescriptionNisw(descriptionNisw *string) { + o.DescriptionNisw = descriptionNisw +} + +// WithID adds the id to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithID(id *string) *WirelessWirelessLinksListParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetID(id *string) { + o.ID = id +} + +// WithIDGt adds the iDGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithIDGt(iDGt *string) *WirelessWirelessLinksListParams { + o.SetIDGt(iDGt) + return o +} + +// SetIDGt adds the idGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetIDGt(iDGt *string) { + o.IDGt = iDGt +} + +// WithIDGte adds the iDGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithIDGte(iDGte *string) *WirelessWirelessLinksListParams { + o.SetIDGte(iDGte) + return o +} + +// SetIDGte adds the idGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetIDGte(iDGte *string) { + o.IDGte = iDGte +} + +// WithIDLt adds the iDLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithIDLt(iDLt *string) *WirelessWirelessLinksListParams { + o.SetIDLt(iDLt) + return o +} + +// SetIDLt adds the idLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetIDLt(iDLt *string) { + o.IDLt = iDLt +} + +// WithIDLte adds the iDLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithIDLte(iDLte *string) *WirelessWirelessLinksListParams { + o.SetIDLte(iDLte) + return o +} + +// SetIDLte adds the idLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetIDLte(iDLte *string) { + o.IDLte = iDLte +} + +// WithIDn adds the iDn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithIDn(iDn *string) *WirelessWirelessLinksListParams { + o.SetIDn(iDn) + return o +} + +// SetIDn adds the idN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetIDn(iDn *string) { + o.IDn = iDn +} + +// WithInterfaceaID adds the interfaceaID to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfaceaID(interfaceaID *string) *WirelessWirelessLinksListParams { + o.SetInterfaceaID(interfaceaID) + return o +} + +// SetInterfaceaID adds the interfaceAId to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfaceaID(interfaceaID *string) { + o.InterfaceaID = interfaceaID +} + +// WithInterfaceaIDGt adds the interfaceaIDGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfaceaIDGt(interfaceaIDGt *string) *WirelessWirelessLinksListParams { + o.SetInterfaceaIDGt(interfaceaIDGt) + return o +} + +// SetInterfaceaIDGt adds the interfaceAIdGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfaceaIDGt(interfaceaIDGt *string) { + o.InterfaceaIDGt = interfaceaIDGt +} + +// WithInterfaceaIDGte adds the interfaceaIDGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfaceaIDGte(interfaceaIDGte *string) *WirelessWirelessLinksListParams { + o.SetInterfaceaIDGte(interfaceaIDGte) + return o +} + +// SetInterfaceaIDGte adds the interfaceAIdGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfaceaIDGte(interfaceaIDGte *string) { + o.InterfaceaIDGte = interfaceaIDGte +} + +// WithInterfaceaIDLt adds the interfaceaIDLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfaceaIDLt(interfaceaIDLt *string) *WirelessWirelessLinksListParams { + o.SetInterfaceaIDLt(interfaceaIDLt) + return o +} + +// SetInterfaceaIDLt adds the interfaceAIdLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfaceaIDLt(interfaceaIDLt *string) { + o.InterfaceaIDLt = interfaceaIDLt +} + +// WithInterfaceaIDLte adds the interfaceaIDLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfaceaIDLte(interfaceaIDLte *string) *WirelessWirelessLinksListParams { + o.SetInterfaceaIDLte(interfaceaIDLte) + return o +} + +// SetInterfaceaIDLte adds the interfaceAIdLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfaceaIDLte(interfaceaIDLte *string) { + o.InterfaceaIDLte = interfaceaIDLte +} + +// WithInterfaceaIDn adds the interfaceaIDn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfaceaIDn(interfaceaIDn *string) *WirelessWirelessLinksListParams { + o.SetInterfaceaIDn(interfaceaIDn) + return o +} + +// SetInterfaceaIDn adds the interfaceAIdN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfaceaIDn(interfaceaIDn *string) { + o.InterfaceaIDn = interfaceaIDn +} + +// WithInterfacebID adds the interfacebID to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfacebID(interfacebID *string) *WirelessWirelessLinksListParams { + o.SetInterfacebID(interfacebID) + return o +} + +// SetInterfacebID adds the interfaceBId to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfacebID(interfacebID *string) { + o.InterfacebID = interfacebID +} + +// WithInterfacebIDGt adds the interfacebIDGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfacebIDGt(interfacebIDGt *string) *WirelessWirelessLinksListParams { + o.SetInterfacebIDGt(interfacebIDGt) + return o +} + +// SetInterfacebIDGt adds the interfaceBIdGt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfacebIDGt(interfacebIDGt *string) { + o.InterfacebIDGt = interfacebIDGt +} + +// WithInterfacebIDGte adds the interfacebIDGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfacebIDGte(interfacebIDGte *string) *WirelessWirelessLinksListParams { + o.SetInterfacebIDGte(interfacebIDGte) + return o +} + +// SetInterfacebIDGte adds the interfaceBIdGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfacebIDGte(interfacebIDGte *string) { + o.InterfacebIDGte = interfacebIDGte +} + +// WithInterfacebIDLt adds the interfacebIDLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfacebIDLt(interfacebIDLt *string) *WirelessWirelessLinksListParams { + o.SetInterfacebIDLt(interfacebIDLt) + return o +} + +// SetInterfacebIDLt adds the interfaceBIdLt to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfacebIDLt(interfacebIDLt *string) { + o.InterfacebIDLt = interfacebIDLt +} + +// WithInterfacebIDLte adds the interfacebIDLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfacebIDLte(interfacebIDLte *string) *WirelessWirelessLinksListParams { + o.SetInterfacebIDLte(interfacebIDLte) + return o +} + +// SetInterfacebIDLte adds the interfaceBIdLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfacebIDLte(interfacebIDLte *string) { + o.InterfacebIDLte = interfacebIDLte +} + +// WithInterfacebIDn adds the interfacebIDn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithInterfacebIDn(interfacebIDn *string) *WirelessWirelessLinksListParams { + o.SetInterfacebIDn(interfacebIDn) + return o +} + +// SetInterfacebIDn adds the interfaceBIdN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetInterfacebIDn(interfacebIDn *string) { + o.InterfacebIDn = interfacebIDn +} + +// WithLastUpdated adds the lastUpdated to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLastUpdated(lastUpdated *string) *WirelessWirelessLinksListParams { + o.SetLastUpdated(lastUpdated) + return o +} + +// SetLastUpdated adds the lastUpdated to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLastUpdated(lastUpdated *string) { + o.LastUpdated = lastUpdated +} + +// WithLastUpdatedGte adds the lastUpdatedGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLastUpdatedGte(lastUpdatedGte *string) *WirelessWirelessLinksListParams { + o.SetLastUpdatedGte(lastUpdatedGte) + return o +} + +// SetLastUpdatedGte adds the lastUpdatedGte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLastUpdatedGte(lastUpdatedGte *string) { + o.LastUpdatedGte = lastUpdatedGte +} + +// WithLastUpdatedLte adds the lastUpdatedLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLastUpdatedLte(lastUpdatedLte *string) *WirelessWirelessLinksListParams { + o.SetLastUpdatedLte(lastUpdatedLte) + return o +} + +// SetLastUpdatedLte adds the lastUpdatedLte to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLastUpdatedLte(lastUpdatedLte *string) { + o.LastUpdatedLte = lastUpdatedLte +} + +// WithLimit adds the limit to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithLimit(limit *int64) *WirelessWirelessLinksListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithOffset(offset *int64) *WirelessWirelessLinksListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQ adds the q to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithQ(q *string) *WirelessWirelessLinksListParams { + o.SetQ(q) + return o +} + +// SetQ adds the q to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetQ(q *string) { + o.Q = q +} + +// WithSsid adds the ssid to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsid(ssid *string) *WirelessWirelessLinksListParams { + o.SetSsid(ssid) + return o +} + +// SetSsid adds the ssid to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsid(ssid *string) { + o.Ssid = ssid +} + +// WithSsidEmpty adds the ssidEmpty to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidEmpty(ssidEmpty *string) *WirelessWirelessLinksListParams { + o.SetSsidEmpty(ssidEmpty) + return o +} + +// SetSsidEmpty adds the ssidEmpty to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidEmpty(ssidEmpty *string) { + o.SsidEmpty = ssidEmpty +} + +// WithSsidIc adds the ssidIc to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidIc(ssidIc *string) *WirelessWirelessLinksListParams { + o.SetSsidIc(ssidIc) + return o +} + +// SetSsidIc adds the ssidIc to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidIc(ssidIc *string) { + o.SsidIc = ssidIc +} + +// WithSsidIe adds the ssidIe to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidIe(ssidIe *string) *WirelessWirelessLinksListParams { + o.SetSsidIe(ssidIe) + return o +} + +// SetSsidIe adds the ssidIe to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidIe(ssidIe *string) { + o.SsidIe = ssidIe +} + +// WithSsidIew adds the ssidIew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidIew(ssidIew *string) *WirelessWirelessLinksListParams { + o.SetSsidIew(ssidIew) + return o +} + +// SetSsidIew adds the ssidIew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidIew(ssidIew *string) { + o.SsidIew = ssidIew +} + +// WithSsidIsw adds the ssidIsw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidIsw(ssidIsw *string) *WirelessWirelessLinksListParams { + o.SetSsidIsw(ssidIsw) + return o +} + +// SetSsidIsw adds the ssidIsw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidIsw(ssidIsw *string) { + o.SsidIsw = ssidIsw +} + +// WithSsidn adds the ssidn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidn(ssidn *string) *WirelessWirelessLinksListParams { + o.SetSsidn(ssidn) + return o +} + +// SetSsidn adds the ssidN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidn(ssidn *string) { + o.Ssidn = ssidn +} + +// WithSsidNic adds the ssidNic to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidNic(ssidNic *string) *WirelessWirelessLinksListParams { + o.SetSsidNic(ssidNic) + return o +} + +// SetSsidNic adds the ssidNic to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidNic(ssidNic *string) { + o.SsidNic = ssidNic +} + +// WithSsidNie adds the ssidNie to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidNie(ssidNie *string) *WirelessWirelessLinksListParams { + o.SetSsidNie(ssidNie) + return o +} + +// SetSsidNie adds the ssidNie to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidNie(ssidNie *string) { + o.SsidNie = ssidNie +} + +// WithSsidNiew adds the ssidNiew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidNiew(ssidNiew *string) *WirelessWirelessLinksListParams { + o.SetSsidNiew(ssidNiew) + return o +} + +// SetSsidNiew adds the ssidNiew to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidNiew(ssidNiew *string) { + o.SsidNiew = ssidNiew +} + +// WithSsidNisw adds the ssidNisw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithSsidNisw(ssidNisw *string) *WirelessWirelessLinksListParams { + o.SetSsidNisw(ssidNisw) + return o +} + +// SetSsidNisw adds the ssidNisw to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetSsidNisw(ssidNisw *string) { + o.SsidNisw = ssidNisw +} + +// WithStatus adds the status to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithStatus(status *string) *WirelessWirelessLinksListParams { + o.SetStatus(status) + return o +} + +// SetStatus adds the status to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetStatus(status *string) { + o.Status = status +} + +// WithStatusn adds the statusn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithStatusn(statusn *string) *WirelessWirelessLinksListParams { + o.SetStatusn(statusn) + return o +} + +// SetStatusn adds the statusN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetStatusn(statusn *string) { + o.Statusn = statusn +} + +// WithTag adds the tag to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTag(tag *string) *WirelessWirelessLinksListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) WithTagn(tagn *string) *WirelessWirelessLinksListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the wireless wireless links list params +func (o *WirelessWirelessLinksListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AuthCipher != nil { + + // query param auth_cipher + var qrAuthCipher string + + if o.AuthCipher != nil { + qrAuthCipher = *o.AuthCipher + } + qAuthCipher := qrAuthCipher + if qAuthCipher != "" { + + if err := r.SetQueryParam("auth_cipher", qAuthCipher); err != nil { + return err + } + } + } + + if o.AuthCiphern != nil { + + // query param auth_cipher__n + var qrAuthCiphern string + + if o.AuthCiphern != nil { + qrAuthCiphern = *o.AuthCiphern + } + qAuthCiphern := qrAuthCiphern + if qAuthCiphern != "" { + + if err := r.SetQueryParam("auth_cipher__n", qAuthCiphern); err != nil { + return err + } + } + } + + if o.AuthPsk != nil { + + // query param auth_psk + var qrAuthPsk string + + if o.AuthPsk != nil { + qrAuthPsk = *o.AuthPsk + } + qAuthPsk := qrAuthPsk + if qAuthPsk != "" { + + if err := r.SetQueryParam("auth_psk", qAuthPsk); err != nil { + return err + } + } + } + + if o.AuthPskEmpty != nil { + + // query param auth_psk__empty + var qrAuthPskEmpty string + + if o.AuthPskEmpty != nil { + qrAuthPskEmpty = *o.AuthPskEmpty + } + qAuthPskEmpty := qrAuthPskEmpty + if qAuthPskEmpty != "" { + + if err := r.SetQueryParam("auth_psk__empty", qAuthPskEmpty); err != nil { + return err + } + } + } + + if o.AuthPskIc != nil { + + // query param auth_psk__ic + var qrAuthPskIc string + + if o.AuthPskIc != nil { + qrAuthPskIc = *o.AuthPskIc + } + qAuthPskIc := qrAuthPskIc + if qAuthPskIc != "" { + + if err := r.SetQueryParam("auth_psk__ic", qAuthPskIc); err != nil { + return err + } + } + } + + if o.AuthPskIe != nil { + + // query param auth_psk__ie + var qrAuthPskIe string + + if o.AuthPskIe != nil { + qrAuthPskIe = *o.AuthPskIe + } + qAuthPskIe := qrAuthPskIe + if qAuthPskIe != "" { + + if err := r.SetQueryParam("auth_psk__ie", qAuthPskIe); err != nil { + return err + } + } + } + + if o.AuthPskIew != nil { + + // query param auth_psk__iew + var qrAuthPskIew string + + if o.AuthPskIew != nil { + qrAuthPskIew = *o.AuthPskIew + } + qAuthPskIew := qrAuthPskIew + if qAuthPskIew != "" { + + if err := r.SetQueryParam("auth_psk__iew", qAuthPskIew); err != nil { + return err + } + } + } + + if o.AuthPskIsw != nil { + + // query param auth_psk__isw + var qrAuthPskIsw string + + if o.AuthPskIsw != nil { + qrAuthPskIsw = *o.AuthPskIsw + } + qAuthPskIsw := qrAuthPskIsw + if qAuthPskIsw != "" { + + if err := r.SetQueryParam("auth_psk__isw", qAuthPskIsw); err != nil { + return err + } + } + } + + if o.AuthPskn != nil { + + // query param auth_psk__n + var qrAuthPskn string + + if o.AuthPskn != nil { + qrAuthPskn = *o.AuthPskn + } + qAuthPskn := qrAuthPskn + if qAuthPskn != "" { + + if err := r.SetQueryParam("auth_psk__n", qAuthPskn); err != nil { + return err + } + } + } + + if o.AuthPskNic != nil { + + // query param auth_psk__nic + var qrAuthPskNic string + + if o.AuthPskNic != nil { + qrAuthPskNic = *o.AuthPskNic + } + qAuthPskNic := qrAuthPskNic + if qAuthPskNic != "" { + + if err := r.SetQueryParam("auth_psk__nic", qAuthPskNic); err != nil { + return err + } + } + } + + if o.AuthPskNie != nil { + + // query param auth_psk__nie + var qrAuthPskNie string + + if o.AuthPskNie != nil { + qrAuthPskNie = *o.AuthPskNie + } + qAuthPskNie := qrAuthPskNie + if qAuthPskNie != "" { + + if err := r.SetQueryParam("auth_psk__nie", qAuthPskNie); err != nil { + return err + } + } + } + + if o.AuthPskNiew != nil { + + // query param auth_psk__niew + var qrAuthPskNiew string + + if o.AuthPskNiew != nil { + qrAuthPskNiew = *o.AuthPskNiew + } + qAuthPskNiew := qrAuthPskNiew + if qAuthPskNiew != "" { + + if err := r.SetQueryParam("auth_psk__niew", qAuthPskNiew); err != nil { + return err + } + } + } + + if o.AuthPskNisw != nil { + + // query param auth_psk__nisw + var qrAuthPskNisw string + + if o.AuthPskNisw != nil { + qrAuthPskNisw = *o.AuthPskNisw + } + qAuthPskNisw := qrAuthPskNisw + if qAuthPskNisw != "" { + + if err := r.SetQueryParam("auth_psk__nisw", qAuthPskNisw); err != nil { + return err + } + } + } + + if o.AuthType != nil { + + // query param auth_type + var qrAuthType string + + if o.AuthType != nil { + qrAuthType = *o.AuthType + } + qAuthType := qrAuthType + if qAuthType != "" { + + if err := r.SetQueryParam("auth_type", qAuthType); err != nil { + return err + } + } + } + + if o.AuthTypen != nil { + + // query param auth_type__n + var qrAuthTypen string + + if o.AuthTypen != nil { + qrAuthTypen = *o.AuthTypen + } + qAuthTypen := qrAuthTypen + if qAuthTypen != "" { + + if err := r.SetQueryParam("auth_type__n", qAuthTypen); err != nil { + return err + } + } + } + + if o.Created != nil { + + // query param created + var qrCreated string + + if o.Created != nil { + qrCreated = *o.Created + } + qCreated := qrCreated + if qCreated != "" { + + if err := r.SetQueryParam("created", qCreated); err != nil { + return err + } + } + } + + if o.CreatedGte != nil { + + // query param created__gte + var qrCreatedGte string + + if o.CreatedGte != nil { + qrCreatedGte = *o.CreatedGte + } + qCreatedGte := qrCreatedGte + if qCreatedGte != "" { + + if err := r.SetQueryParam("created__gte", qCreatedGte); err != nil { + return err + } + } + } + + if o.CreatedLte != nil { + + // query param created__lte + var qrCreatedLte string + + if o.CreatedLte != nil { + qrCreatedLte = *o.CreatedLte + } + qCreatedLte := qrCreatedLte + if qCreatedLte != "" { + + if err := r.SetQueryParam("created__lte", qCreatedLte); err != nil { + return err + } + } + } + + if o.Description != nil { + + // query param description + var qrDescription string + + if o.Description != nil { + qrDescription = *o.Description + } + qDescription := qrDescription + if qDescription != "" { + + if err := r.SetQueryParam("description", qDescription); err != nil { + return err + } + } + } + + if o.DescriptionEmpty != nil { + + // query param description__empty + var qrDescriptionEmpty string + + if o.DescriptionEmpty != nil { + qrDescriptionEmpty = *o.DescriptionEmpty + } + qDescriptionEmpty := qrDescriptionEmpty + if qDescriptionEmpty != "" { + + if err := r.SetQueryParam("description__empty", qDescriptionEmpty); err != nil { + return err + } + } + } + + if o.DescriptionIc != nil { + + // query param description__ic + var qrDescriptionIc string + + if o.DescriptionIc != nil { + qrDescriptionIc = *o.DescriptionIc + } + qDescriptionIc := qrDescriptionIc + if qDescriptionIc != "" { + + if err := r.SetQueryParam("description__ic", qDescriptionIc); err != nil { + return err + } + } + } + + if o.DescriptionIe != nil { + + // query param description__ie + var qrDescriptionIe string + + if o.DescriptionIe != nil { + qrDescriptionIe = *o.DescriptionIe + } + qDescriptionIe := qrDescriptionIe + if qDescriptionIe != "" { + + if err := r.SetQueryParam("description__ie", qDescriptionIe); err != nil { + return err + } + } + } + + if o.DescriptionIew != nil { + + // query param description__iew + var qrDescriptionIew string + + if o.DescriptionIew != nil { + qrDescriptionIew = *o.DescriptionIew + } + qDescriptionIew := qrDescriptionIew + if qDescriptionIew != "" { + + if err := r.SetQueryParam("description__iew", qDescriptionIew); err != nil { + return err + } + } + } + + if o.DescriptionIsw != nil { + + // query param description__isw + var qrDescriptionIsw string + + if o.DescriptionIsw != nil { + qrDescriptionIsw = *o.DescriptionIsw + } + qDescriptionIsw := qrDescriptionIsw + if qDescriptionIsw != "" { + + if err := r.SetQueryParam("description__isw", qDescriptionIsw); err != nil { + return err + } + } + } + + if o.Descriptionn != nil { + + // query param description__n + var qrDescriptionn string + + if o.Descriptionn != nil { + qrDescriptionn = *o.Descriptionn + } + qDescriptionn := qrDescriptionn + if qDescriptionn != "" { + + if err := r.SetQueryParam("description__n", qDescriptionn); err != nil { + return err + } + } + } + + if o.DescriptionNic != nil { + + // query param description__nic + var qrDescriptionNic string + + if o.DescriptionNic != nil { + qrDescriptionNic = *o.DescriptionNic + } + qDescriptionNic := qrDescriptionNic + if qDescriptionNic != "" { + + if err := r.SetQueryParam("description__nic", qDescriptionNic); err != nil { + return err + } + } + } + + if o.DescriptionNie != nil { + + // query param description__nie + var qrDescriptionNie string + + if o.DescriptionNie != nil { + qrDescriptionNie = *o.DescriptionNie + } + qDescriptionNie := qrDescriptionNie + if qDescriptionNie != "" { + + if err := r.SetQueryParam("description__nie", qDescriptionNie); err != nil { + return err + } + } + } + + if o.DescriptionNiew != nil { + + // query param description__niew + var qrDescriptionNiew string + + if o.DescriptionNiew != nil { + qrDescriptionNiew = *o.DescriptionNiew + } + qDescriptionNiew := qrDescriptionNiew + if qDescriptionNiew != "" { + + if err := r.SetQueryParam("description__niew", qDescriptionNiew); err != nil { + return err + } + } + } + + if o.DescriptionNisw != nil { + + // query param description__nisw + var qrDescriptionNisw string + + if o.DescriptionNisw != nil { + qrDescriptionNisw = *o.DescriptionNisw + } + qDescriptionNisw := qrDescriptionNisw + if qDescriptionNisw != "" { + + if err := r.SetQueryParam("description__nisw", qDescriptionNisw); err != nil { + return err + } + } + } + + if o.ID != nil { + + // query param id + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + } + + if o.IDGt != nil { + + // query param id__gt + var qrIDGt string + + if o.IDGt != nil { + qrIDGt = *o.IDGt + } + qIDGt := qrIDGt + if qIDGt != "" { + + if err := r.SetQueryParam("id__gt", qIDGt); err != nil { + return err + } + } + } + + if o.IDGte != nil { + + // query param id__gte + var qrIDGte string + + if o.IDGte != nil { + qrIDGte = *o.IDGte + } + qIDGte := qrIDGte + if qIDGte != "" { + + if err := r.SetQueryParam("id__gte", qIDGte); err != nil { + return err + } + } + } + + if o.IDLt != nil { + + // query param id__lt + var qrIDLt string + + if o.IDLt != nil { + qrIDLt = *o.IDLt + } + qIDLt := qrIDLt + if qIDLt != "" { + + if err := r.SetQueryParam("id__lt", qIDLt); err != nil { + return err + } + } + } + + if o.IDLte != nil { + + // query param id__lte + var qrIDLte string + + if o.IDLte != nil { + qrIDLte = *o.IDLte + } + qIDLte := qrIDLte + if qIDLte != "" { + + if err := r.SetQueryParam("id__lte", qIDLte); err != nil { + return err + } + } + } + + if o.IDn != nil { + + // query param id__n + var qrIDn string + + if o.IDn != nil { + qrIDn = *o.IDn + } + qIDn := qrIDn + if qIDn != "" { + + if err := r.SetQueryParam("id__n", qIDn); err != nil { + return err + } + } + } + + if o.InterfaceaID != nil { + + // query param interface_a_id + var qrInterfaceaID string + + if o.InterfaceaID != nil { + qrInterfaceaID = *o.InterfaceaID + } + qInterfaceaID := qrInterfaceaID + if qInterfaceaID != "" { + + if err := r.SetQueryParam("interface_a_id", qInterfaceaID); err != nil { + return err + } + } + } + + if o.InterfaceaIDGt != nil { + + // query param interface_a_id__gt + var qrInterfaceaIDGt string + + if o.InterfaceaIDGt != nil { + qrInterfaceaIDGt = *o.InterfaceaIDGt + } + qInterfaceaIDGt := qrInterfaceaIDGt + if qInterfaceaIDGt != "" { + + if err := r.SetQueryParam("interface_a_id__gt", qInterfaceaIDGt); err != nil { + return err + } + } + } + + if o.InterfaceaIDGte != nil { + + // query param interface_a_id__gte + var qrInterfaceaIDGte string + + if o.InterfaceaIDGte != nil { + qrInterfaceaIDGte = *o.InterfaceaIDGte + } + qInterfaceaIDGte := qrInterfaceaIDGte + if qInterfaceaIDGte != "" { + + if err := r.SetQueryParam("interface_a_id__gte", qInterfaceaIDGte); err != nil { + return err + } + } + } + + if o.InterfaceaIDLt != nil { + + // query param interface_a_id__lt + var qrInterfaceaIDLt string + + if o.InterfaceaIDLt != nil { + qrInterfaceaIDLt = *o.InterfaceaIDLt + } + qInterfaceaIDLt := qrInterfaceaIDLt + if qInterfaceaIDLt != "" { + + if err := r.SetQueryParam("interface_a_id__lt", qInterfaceaIDLt); err != nil { + return err + } + } + } + + if o.InterfaceaIDLte != nil { + + // query param interface_a_id__lte + var qrInterfaceaIDLte string + + if o.InterfaceaIDLte != nil { + qrInterfaceaIDLte = *o.InterfaceaIDLte + } + qInterfaceaIDLte := qrInterfaceaIDLte + if qInterfaceaIDLte != "" { + + if err := r.SetQueryParam("interface_a_id__lte", qInterfaceaIDLte); err != nil { + return err + } + } + } + + if o.InterfaceaIDn != nil { + + // query param interface_a_id__n + var qrInterfaceaIDn string + + if o.InterfaceaIDn != nil { + qrInterfaceaIDn = *o.InterfaceaIDn + } + qInterfaceaIDn := qrInterfaceaIDn + if qInterfaceaIDn != "" { + + if err := r.SetQueryParam("interface_a_id__n", qInterfaceaIDn); err != nil { + return err + } + } + } + + if o.InterfacebID != nil { + + // query param interface_b_id + var qrInterfacebID string + + if o.InterfacebID != nil { + qrInterfacebID = *o.InterfacebID + } + qInterfacebID := qrInterfacebID + if qInterfacebID != "" { + + if err := r.SetQueryParam("interface_b_id", qInterfacebID); err != nil { + return err + } + } + } + + if o.InterfacebIDGt != nil { + + // query param interface_b_id__gt + var qrInterfacebIDGt string + + if o.InterfacebIDGt != nil { + qrInterfacebIDGt = *o.InterfacebIDGt + } + qInterfacebIDGt := qrInterfacebIDGt + if qInterfacebIDGt != "" { + + if err := r.SetQueryParam("interface_b_id__gt", qInterfacebIDGt); err != nil { + return err + } + } + } + + if o.InterfacebIDGte != nil { + + // query param interface_b_id__gte + var qrInterfacebIDGte string + + if o.InterfacebIDGte != nil { + qrInterfacebIDGte = *o.InterfacebIDGte + } + qInterfacebIDGte := qrInterfacebIDGte + if qInterfacebIDGte != "" { + + if err := r.SetQueryParam("interface_b_id__gte", qInterfacebIDGte); err != nil { + return err + } + } + } + + if o.InterfacebIDLt != nil { + + // query param interface_b_id__lt + var qrInterfacebIDLt string + + if o.InterfacebIDLt != nil { + qrInterfacebIDLt = *o.InterfacebIDLt + } + qInterfacebIDLt := qrInterfacebIDLt + if qInterfacebIDLt != "" { + + if err := r.SetQueryParam("interface_b_id__lt", qInterfacebIDLt); err != nil { + return err + } + } + } + + if o.InterfacebIDLte != nil { + + // query param interface_b_id__lte + var qrInterfacebIDLte string + + if o.InterfacebIDLte != nil { + qrInterfacebIDLte = *o.InterfacebIDLte + } + qInterfacebIDLte := qrInterfacebIDLte + if qInterfacebIDLte != "" { + + if err := r.SetQueryParam("interface_b_id__lte", qInterfacebIDLte); err != nil { + return err + } + } + } + + if o.InterfacebIDn != nil { + + // query param interface_b_id__n + var qrInterfacebIDn string + + if o.InterfacebIDn != nil { + qrInterfacebIDn = *o.InterfacebIDn + } + qInterfacebIDn := qrInterfacebIDn + if qInterfacebIDn != "" { + + if err := r.SetQueryParam("interface_b_id__n", qInterfacebIDn); err != nil { + return err + } + } + } + + if o.LastUpdated != nil { + + // query param last_updated + var qrLastUpdated string + + if o.LastUpdated != nil { + qrLastUpdated = *o.LastUpdated + } + qLastUpdated := qrLastUpdated + if qLastUpdated != "" { + + if err := r.SetQueryParam("last_updated", qLastUpdated); err != nil { + return err + } + } + } + + if o.LastUpdatedGte != nil { + + // query param last_updated__gte + var qrLastUpdatedGte string + + if o.LastUpdatedGte != nil { + qrLastUpdatedGte = *o.LastUpdatedGte + } + qLastUpdatedGte := qrLastUpdatedGte + if qLastUpdatedGte != "" { + + if err := r.SetQueryParam("last_updated__gte", qLastUpdatedGte); err != nil { + return err + } + } + } + + if o.LastUpdatedLte != nil { + + // query param last_updated__lte + var qrLastUpdatedLte string + + if o.LastUpdatedLte != nil { + qrLastUpdatedLte = *o.LastUpdatedLte + } + qLastUpdatedLte := qrLastUpdatedLte + if qLastUpdatedLte != "" { + + if err := r.SetQueryParam("last_updated__lte", qLastUpdatedLte); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Q != nil { + + // query param q + var qrQ string + + if o.Q != nil { + qrQ = *o.Q + } + qQ := qrQ + if qQ != "" { + + if err := r.SetQueryParam("q", qQ); err != nil { + return err + } + } + } + + if o.Ssid != nil { + + // query param ssid + var qrSsid string + + if o.Ssid != nil { + qrSsid = *o.Ssid + } + qSsid := qrSsid + if qSsid != "" { + + if err := r.SetQueryParam("ssid", qSsid); err != nil { + return err + } + } + } + + if o.SsidEmpty != nil { + + // query param ssid__empty + var qrSsidEmpty string + + if o.SsidEmpty != nil { + qrSsidEmpty = *o.SsidEmpty + } + qSsidEmpty := qrSsidEmpty + if qSsidEmpty != "" { + + if err := r.SetQueryParam("ssid__empty", qSsidEmpty); err != nil { + return err + } + } + } + + if o.SsidIc != nil { + + // query param ssid__ic + var qrSsidIc string + + if o.SsidIc != nil { + qrSsidIc = *o.SsidIc + } + qSsidIc := qrSsidIc + if qSsidIc != "" { + + if err := r.SetQueryParam("ssid__ic", qSsidIc); err != nil { + return err + } + } + } + + if o.SsidIe != nil { + + // query param ssid__ie + var qrSsidIe string + + if o.SsidIe != nil { + qrSsidIe = *o.SsidIe + } + qSsidIe := qrSsidIe + if qSsidIe != "" { + + if err := r.SetQueryParam("ssid__ie", qSsidIe); err != nil { + return err + } + } + } + + if o.SsidIew != nil { + + // query param ssid__iew + var qrSsidIew string + + if o.SsidIew != nil { + qrSsidIew = *o.SsidIew + } + qSsidIew := qrSsidIew + if qSsidIew != "" { + + if err := r.SetQueryParam("ssid__iew", qSsidIew); err != nil { + return err + } + } + } + + if o.SsidIsw != nil { + + // query param ssid__isw + var qrSsidIsw string + + if o.SsidIsw != nil { + qrSsidIsw = *o.SsidIsw + } + qSsidIsw := qrSsidIsw + if qSsidIsw != "" { + + if err := r.SetQueryParam("ssid__isw", qSsidIsw); err != nil { + return err + } + } + } + + if o.Ssidn != nil { + + // query param ssid__n + var qrSsidn string + + if o.Ssidn != nil { + qrSsidn = *o.Ssidn + } + qSsidn := qrSsidn + if qSsidn != "" { + + if err := r.SetQueryParam("ssid__n", qSsidn); err != nil { + return err + } + } + } + + if o.SsidNic != nil { + + // query param ssid__nic + var qrSsidNic string + + if o.SsidNic != nil { + qrSsidNic = *o.SsidNic + } + qSsidNic := qrSsidNic + if qSsidNic != "" { + + if err := r.SetQueryParam("ssid__nic", qSsidNic); err != nil { + return err + } + } + } + + if o.SsidNie != nil { + + // query param ssid__nie + var qrSsidNie string + + if o.SsidNie != nil { + qrSsidNie = *o.SsidNie + } + qSsidNie := qrSsidNie + if qSsidNie != "" { + + if err := r.SetQueryParam("ssid__nie", qSsidNie); err != nil { + return err + } + } + } + + if o.SsidNiew != nil { + + // query param ssid__niew + var qrSsidNiew string + + if o.SsidNiew != nil { + qrSsidNiew = *o.SsidNiew + } + qSsidNiew := qrSsidNiew + if qSsidNiew != "" { + + if err := r.SetQueryParam("ssid__niew", qSsidNiew); err != nil { + return err + } + } + } + + if o.SsidNisw != nil { + + // query param ssid__nisw + var qrSsidNisw string + + if o.SsidNisw != nil { + qrSsidNisw = *o.SsidNisw + } + qSsidNisw := qrSsidNisw + if qSsidNisw != "" { + + if err := r.SetQueryParam("ssid__nisw", qSsidNisw); err != nil { + return err + } + } + } + + if o.Status != nil { + + // query param status + var qrStatus string + + if o.Status != nil { + qrStatus = *o.Status + } + qStatus := qrStatus + if qStatus != "" { + + if err := r.SetQueryParam("status", qStatus); err != nil { + return err + } + } + } + + if o.Statusn != nil { + + // query param status__n + var qrStatusn string + + if o.Statusn != nil { + qrStatusn = *o.Statusn + } + qStatusn := qrStatusn + if qStatusn != "" { + + if err := r.SetQueryParam("status__n", qStatusn); err != nil { + return err + } + } + } + + 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...) + } + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_list_responses.go b/netbox/client/wireless/wireless_wireless_links_list_responses.go new file mode 100644 index 000000000..bc13af5b0 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_list_responses.go @@ -0,0 +1,247 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksListReader is a Reader for the WirelessWirelessLinksList structure. +type WirelessWirelessLinksListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLinksListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksListOK creates a WirelessWirelessLinksListOK with default headers values +func NewWirelessWirelessLinksListOK() *WirelessWirelessLinksListOK { + return &WirelessWirelessLinksListOK{} +} + +/* WirelessWirelessLinksListOK describes a response with status code 200, with default header values. + +WirelessWirelessLinksListOK wireless wireless links list o k +*/ +type WirelessWirelessLinksListOK struct { + Payload *WirelessWirelessLinksListOKBody +} + +func (o *WirelessWirelessLinksListOK) Error() string { + return fmt.Sprintf("[GET /wireless/wireless-links/][%d] wirelessWirelessLinksListOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLinksListOK) GetPayload() *WirelessWirelessLinksListOKBody { + return o.Payload +} + +func (o *WirelessWirelessLinksListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(WirelessWirelessLinksListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*WirelessWirelessLinksListOKBody wireless wireless links list o k body +swagger:model WirelessWirelessLinksListOKBody +*/ +type WirelessWirelessLinksListOKBody struct { + + // count + // Required: true + Count *int64 `json:"count"` + + // next + // Format: uri + Next *strfmt.URI `json:"next,omitempty"` + + // previous + // Format: uri + Previous *strfmt.URI `json:"previous,omitempty"` + + // results + // Required: true + Results []*models.WirelessLink `json:"results"` +} + +// Validate validates this wireless wireless links list o k body +func (o *WirelessWirelessLinksListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCount(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNext(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if err := o.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *WirelessWirelessLinksListOKBody) validateCount(formats strfmt.Registry) error { + + if err := validate.Required("wirelessWirelessLinksListOK"+"."+"count", "body", o.Count); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLinksListOKBody) validateNext(formats strfmt.Registry) error { + if swag.IsZero(o.Next) { // not required + return nil + } + + if err := validate.FormatOf("wirelessWirelessLinksListOK"+"."+"next", "body", "uri", o.Next.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLinksListOKBody) validatePrevious(formats strfmt.Registry) error { + if swag.IsZero(o.Previous) { // not required + return nil + } + + if err := validate.FormatOf("wirelessWirelessLinksListOK"+"."+"previous", "body", "uri", o.Previous.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *WirelessWirelessLinksListOKBody) validateResults(formats strfmt.Registry) error { + + if err := validate.Required("wirelessWirelessLinksListOK"+"."+"results", "body", o.Results); err != nil { + return err + } + + for i := 0; i < len(o.Results); i++ { + if swag.IsZero(o.Results[i]) { // not required + continue + } + + if o.Results[i] != nil { + if err := o.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wirelessWirelessLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wirelessWirelessLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this wireless wireless links list o k body based on the context it is used +func (o *WirelessWirelessLinksListOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *WirelessWirelessLinksListOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Results); i++ { + + if o.Results[i] != nil { + if err := o.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wirelessWirelessLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wirelessWirelessLinksListOK" + "." + "results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *WirelessWirelessLinksListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *WirelessWirelessLinksListOKBody) UnmarshalBinary(b []byte) error { + var res WirelessWirelessLinksListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_partial_update_parameters.go b/netbox/client/wireless/wireless_wireless_links_partial_update_parameters.go new file mode 100644 index 000000000..3af6f0c17 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_partial_update_parameters.go @@ -0,0 +1,186 @@ +// 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 wireless + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLinksPartialUpdateParams creates a new WirelessWirelessLinksPartialUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksPartialUpdateParams() *WirelessWirelessLinksPartialUpdateParams { + return &WirelessWirelessLinksPartialUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksPartialUpdateParamsWithTimeout creates a new WirelessWirelessLinksPartialUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksPartialUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksPartialUpdateParams { + return &WirelessWirelessLinksPartialUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksPartialUpdateParamsWithContext creates a new WirelessWirelessLinksPartialUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksPartialUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLinksPartialUpdateParams { + return &WirelessWirelessLinksPartialUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksPartialUpdateParamsWithHTTPClient creates a new WirelessWirelessLinksPartialUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksPartialUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksPartialUpdateParams { + return &WirelessWirelessLinksPartialUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksPartialUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless links partial update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksPartialUpdateParams struct { + + // Data. + Data *models.WritableWirelessLink + + /* ID. + + A unique integer value identifying this wireless link. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksPartialUpdateParams) WithDefaults() *WirelessWirelessLinksPartialUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links partial update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksPartialUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksPartialUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLinksPartialUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksPartialUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) WithData(data *models.WritableWirelessLink) *WirelessWirelessLinksPartialUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) SetData(data *models.WritableWirelessLink) { + o.Data = data +} + +// WithID adds the id to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) WithID(id int64) *WirelessWirelessLinksPartialUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless links partial update params +func (o *WirelessWirelessLinksPartialUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksPartialUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/wireless/wireless_wireless_links_partial_update_responses.go b/netbox/client/wireless/wireless_wireless_links_partial_update_responses.go new file mode 100644 index 000000000..59b3749e8 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_partial_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksPartialUpdateReader is a Reader for the WirelessWirelessLinksPartialUpdate structure. +type WirelessWirelessLinksPartialUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksPartialUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLinksPartialUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksPartialUpdateOK creates a WirelessWirelessLinksPartialUpdateOK with default headers values +func NewWirelessWirelessLinksPartialUpdateOK() *WirelessWirelessLinksPartialUpdateOK { + return &WirelessWirelessLinksPartialUpdateOK{} +} + +/* WirelessWirelessLinksPartialUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLinksPartialUpdateOK wireless wireless links partial update o k +*/ +type WirelessWirelessLinksPartialUpdateOK struct { + Payload *models.WirelessLink +} + +func (o *WirelessWirelessLinksPartialUpdateOK) Error() string { + return fmt.Sprintf("[PATCH /wireless/wireless-links/{id}/][%d] wirelessWirelessLinksPartialUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLinksPartialUpdateOK) GetPayload() *models.WirelessLink { + return o.Payload +} + +func (o *WirelessWirelessLinksPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLink) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_read_parameters.go b/netbox/client/wireless/wireless_wireless_links_read_parameters.go new file mode 100644 index 000000000..f749185a8 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_read_parameters.go @@ -0,0 +1,165 @@ +// 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 wireless + +// 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" +) + +// NewWirelessWirelessLinksReadParams creates a new WirelessWirelessLinksReadParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksReadParams() *WirelessWirelessLinksReadParams { + return &WirelessWirelessLinksReadParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksReadParamsWithTimeout creates a new WirelessWirelessLinksReadParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksReadParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksReadParams { + return &WirelessWirelessLinksReadParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksReadParamsWithContext creates a new WirelessWirelessLinksReadParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksReadParamsWithContext(ctx context.Context) *WirelessWirelessLinksReadParams { + return &WirelessWirelessLinksReadParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksReadParamsWithHTTPClient creates a new WirelessWirelessLinksReadParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksReadParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksReadParams { + return &WirelessWirelessLinksReadParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksReadParams contains all the parameters to send to the API endpoint + for the wireless wireless links read operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksReadParams struct { + + /* ID. + + A unique integer value identifying this wireless link. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksReadParams) WithDefaults() *WirelessWirelessLinksReadParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links read params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksReadParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksReadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) WithContext(ctx context.Context) *WirelessWirelessLinksReadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksReadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) WithID(id int64) *WirelessWirelessLinksReadParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless links read params +func (o *WirelessWirelessLinksReadParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksReadParams) 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/netbox/client/wireless/wireless_wireless_links_read_responses.go b/netbox/client/wireless/wireless_wireless_links_read_responses.go new file mode 100644 index 000000000..0aec8fde9 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_read_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksReadReader is a Reader for the WirelessWirelessLinksRead structure. +type WirelessWirelessLinksReadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLinksReadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksReadOK creates a WirelessWirelessLinksReadOK with default headers values +func NewWirelessWirelessLinksReadOK() *WirelessWirelessLinksReadOK { + return &WirelessWirelessLinksReadOK{} +} + +/* WirelessWirelessLinksReadOK describes a response with status code 200, with default header values. + +WirelessWirelessLinksReadOK wireless wireless links read o k +*/ +type WirelessWirelessLinksReadOK struct { + Payload *models.WirelessLink +} + +func (o *WirelessWirelessLinksReadOK) Error() string { + return fmt.Sprintf("[GET /wireless/wireless-links/{id}/][%d] wirelessWirelessLinksReadOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLinksReadOK) GetPayload() *models.WirelessLink { + return o.Payload +} + +func (o *WirelessWirelessLinksReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLink) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/client/wireless/wireless_wireless_links_update_parameters.go b/netbox/client/wireless/wireless_wireless_links_update_parameters.go new file mode 100644 index 000000000..c091b7545 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_update_parameters.go @@ -0,0 +1,186 @@ +// 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 wireless + +// 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" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// NewWirelessWirelessLinksUpdateParams creates a new WirelessWirelessLinksUpdateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewWirelessWirelessLinksUpdateParams() *WirelessWirelessLinksUpdateParams { + return &WirelessWirelessLinksUpdateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewWirelessWirelessLinksUpdateParamsWithTimeout creates a new WirelessWirelessLinksUpdateParams object +// with the ability to set a timeout on a request. +func NewWirelessWirelessLinksUpdateParamsWithTimeout(timeout time.Duration) *WirelessWirelessLinksUpdateParams { + return &WirelessWirelessLinksUpdateParams{ + timeout: timeout, + } +} + +// NewWirelessWirelessLinksUpdateParamsWithContext creates a new WirelessWirelessLinksUpdateParams object +// with the ability to set a context for a request. +func NewWirelessWirelessLinksUpdateParamsWithContext(ctx context.Context) *WirelessWirelessLinksUpdateParams { + return &WirelessWirelessLinksUpdateParams{ + Context: ctx, + } +} + +// NewWirelessWirelessLinksUpdateParamsWithHTTPClient creates a new WirelessWirelessLinksUpdateParams object +// with the ability to set a custom HTTPClient for a request. +func NewWirelessWirelessLinksUpdateParamsWithHTTPClient(client *http.Client) *WirelessWirelessLinksUpdateParams { + return &WirelessWirelessLinksUpdateParams{ + HTTPClient: client, + } +} + +/* WirelessWirelessLinksUpdateParams contains all the parameters to send to the API endpoint + for the wireless wireless links update operation. + + Typically these are written to a http.Request. +*/ +type WirelessWirelessLinksUpdateParams struct { + + // Data. + Data *models.WritableWirelessLink + + /* ID. + + A unique integer value identifying this wireless link. + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the wireless wireless links update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksUpdateParams) WithDefaults() *WirelessWirelessLinksUpdateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the wireless wireless links update params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *WirelessWirelessLinksUpdateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) WithTimeout(timeout time.Duration) *WirelessWirelessLinksUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) WithContext(ctx context.Context) *WirelessWirelessLinksUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) WithHTTPClient(client *http.Client) *WirelessWirelessLinksUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithData adds the data to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) WithData(data *models.WritableWirelessLink) *WirelessWirelessLinksUpdateParams { + o.SetData(data) + return o +} + +// SetData adds the data to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) SetData(data *models.WritableWirelessLink) { + o.Data = data +} + +// WithID adds the id to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) WithID(id int64) *WirelessWirelessLinksUpdateParams { + o.SetID(id) + return o +} + +// SetID adds the id to the wireless wireless links update params +func (o *WirelessWirelessLinksUpdateParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *WirelessWirelessLinksUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Data != nil { + if err := r.SetBodyParam(o.Data); err != nil { + return err + } + } + + // 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/netbox/client/wireless/wireless_wireless_links_update_responses.go b/netbox/client/wireless/wireless_wireless_links_update_responses.go new file mode 100644 index 000000000..0b62d7298 --- /dev/null +++ b/netbox/client/wireless/wireless_wireless_links_update_responses.go @@ -0,0 +1,82 @@ +// 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 wireless + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/netbox-community/go-netbox/netbox/models" +) + +// WirelessWirelessLinksUpdateReader is a Reader for the WirelessWirelessLinksUpdate structure. +type WirelessWirelessLinksUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *WirelessWirelessLinksUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewWirelessWirelessLinksUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewWirelessWirelessLinksUpdateOK creates a WirelessWirelessLinksUpdateOK with default headers values +func NewWirelessWirelessLinksUpdateOK() *WirelessWirelessLinksUpdateOK { + return &WirelessWirelessLinksUpdateOK{} +} + +/* WirelessWirelessLinksUpdateOK describes a response with status code 200, with default header values. + +WirelessWirelessLinksUpdateOK wireless wireless links update o k +*/ +type WirelessWirelessLinksUpdateOK struct { + Payload *models.WirelessLink +} + +func (o *WirelessWirelessLinksUpdateOK) Error() string { + return fmt.Sprintf("[PUT /wireless/wireless-links/{id}/][%d] wirelessWirelessLinksUpdateOK %+v", 200, o.Payload) +} +func (o *WirelessWirelessLinksUpdateOK) GetPayload() *models.WirelessLink { + return o.Payload +} + +func (o *WirelessWirelessLinksUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.WirelessLink) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/netbox/models/a_s_n.go b/netbox/models/a_s_n.go new file mode 100644 index 000000000..3ef1f57ab --- /dev/null +++ b/netbox/models/a_s_n.go @@ -0,0 +1,417 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ASN a s n +// +// swagger:model ASN +type ASN struct { + + // ASN + // + // 32-bit autonomous system number + // Required: true + // Maximum: 4.294967295e+09 + // Minimum: 1 + Asn *int64 `json:"asn"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Provider count + // Read Only: true + ProviderCount int64 `json:"provider_count,omitempty"` + + // RIR + // Required: true + Rir *int64 `json:"rir"` + + // Site count + // Read Only: true + SiteCount int64 `json:"site_count,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this a s n +func (m *ASN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAsn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRir(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ASN) validateAsn(formats strfmt.Registry) error { + + if err := validate.Required("asn", "body", m.Asn); err != nil { + return err + } + + if err := validate.MinimumInt("asn", "body", *m.Asn, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("asn", "body", *m.Asn, 4.294967295e+09, false); err != nil { + return err + } + + return nil +} + +func (m *ASN) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ASN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *ASN) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ASN) validateRir(formats strfmt.Registry) error { + + if err := validate.Required("rir", "body", m.Rir); err != nil { + return err + } + + return nil +} + +func (m *ASN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ASN) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *ASN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this a s n based on the context it is used +func (m *ASN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProviderCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSiteCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ASN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ASN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ASN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ASN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ASN) contextValidateProviderCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "provider_count", "body", int64(m.ProviderCount)); err != nil { + return err + } + + return nil +} + +func (m *ASN) contextValidateSiteCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "site_count", "body", int64(m.SiteCount)); err != nil { + return err + } + + return nil +} + +func (m *ASN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ASN) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *ASN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ASN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ASN) UnmarshalBinary(b []byte) error { + var res ASN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/aggregate.go b/netbox/models/aggregate.go index fc1e4ceb6..fab6daa5d 100644 --- a/netbox/models/aggregate.go +++ b/netbox/models/aggregate.go @@ -38,8 +38,8 @@ type Aggregate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,7 +59,7 @@ type Aggregate struct { // family Family *AggregateFamily `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -143,7 +143,7 @@ func (m *Aggregate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -183,6 +183,8 @@ func (m *Aggregate) validateFamily(formats strfmt.Registry) error { if err := m.Family.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -222,6 +224,8 @@ func (m *Aggregate) validateRir(formats strfmt.Registry) error { if err := m.Rir.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rir") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rir") } return err } @@ -244,6 +248,8 @@ func (m *Aggregate) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -263,6 +269,8 @@ func (m *Aggregate) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -331,7 +339,7 @@ func (m *Aggregate) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *Aggregate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -353,6 +361,8 @@ func (m *Aggregate) contextValidateFamily(ctx context.Context, formats strfmt.Re if err := m.Family.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -385,6 +395,8 @@ func (m *Aggregate) contextValidateRir(ctx context.Context, formats strfmt.Regis if err := m.Rir.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rir") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rir") } return err } @@ -401,6 +413,8 @@ func (m *Aggregate) contextValidateTags(ctx context.Context, formats strfmt.Regi if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -417,6 +431,8 @@ func (m *Aggregate) contextValidateTenant(ctx context.Context, formats strfmt.Re if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/available_ip.go b/netbox/models/available_ip.go index 9b7093714..f4315bc3d 100644 --- a/netbox/models/available_ip.go +++ b/netbox/models/available_ip.go @@ -86,6 +86,8 @@ func (m *AvailableIP) validateVrf(formats strfmt.Registry) error { if err := m.Vrf.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -140,6 +142,8 @@ func (m *AvailableIP) contextValidateVrf(ctx context.Context, formats strfmt.Reg if err := m.Vrf.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } diff --git a/netbox/models/available_prefix.go b/netbox/models/available_prefix.go index cf3ae3378..c1a376920 100644 --- a/netbox/models/available_prefix.go +++ b/netbox/models/available_prefix.go @@ -86,6 +86,8 @@ func (m *AvailablePrefix) validateVrf(formats strfmt.Registry) error { if err := m.Vrf.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -140,6 +142,8 @@ func (m *AvailablePrefix) contextValidateVrf(ctx context.Context, formats strfmt if err := m.Vrf.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } diff --git a/netbox/models/available_v_l_a_n.go b/netbox/models/available_v_l_a_n.go new file mode 100644 index 000000000..00bc33c6a --- /dev/null +++ b/netbox/models/available_v_l_a_n.go @@ -0,0 +1,137 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AvailableVLAN available v l a n +// +// swagger:model AvailableVLAN +type AvailableVLAN struct { + + // group + Group *NestedVLANGroup `json:"group,omitempty"` + + // Vid + // Read Only: true + Vid int64 `json:"vid,omitempty"` +} + +// Validate validates this available v l a n +func (m *AvailableVLAN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AvailableVLAN) validateGroup(formats strfmt.Registry) error { + if swag.IsZero(m.Group) { // not required + return nil + } + + if m.Group != nil { + if err := m.Group.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +// ContextValidate validate this available v l a n based on the context it is used +func (m *AvailableVLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVid(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AvailableVLAN) contextValidateGroup(ctx context.Context, formats strfmt.Registry) error { + + if m.Group != nil { + if err := m.Group.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *AvailableVLAN) contextValidateVid(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "vid", "body", int64(m.Vid)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AvailableVLAN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AvailableVLAN) UnmarshalBinary(b []byte) error { + var res AvailableVLAN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/cable.go b/netbox/models/cable.go index 67565caf6..57e51b684 100644 --- a/netbox/models/cable.go +++ b/netbox/models/cable.go @@ -41,6 +41,11 @@ type Cable struct { // Pattern: ^[0-9a-f]{6}$ Color string `json:"color,omitempty"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -48,7 +53,7 @@ type Cable struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -56,6 +61,11 @@ type Cable struct { // Max Length: 100 Label string `json:"label,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Length Length *float64 `json:"length,omitempty"` @@ -68,13 +78,16 @@ type Cable struct { // tags Tags []*NestedTag `json:"tags"` + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + // Termination a // Read Only: true - Terminationa interface{} `json:"termination_a,omitempty"` + Terminationa map[string]*string `json:"termination_a,omitempty"` // Termination a id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 TerminationaID *int64 `json:"termination_a_id"` @@ -84,11 +97,11 @@ type Cable struct { // Termination b // Read Only: true - Terminationb interface{} `json:"termination_b,omitempty"` + Terminationb map[string]*string `json:"termination_b,omitempty"` // Termination b id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 TerminationbID *int64 `json:"termination_b_id"` @@ -114,10 +127,18 @@ func (m *Cable) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateLengthUnit(formats); err != nil { res = append(res, err) } @@ -130,6 +151,10 @@ func (m *Cable) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + if err := m.validateTerminationaID(formats); err != nil { res = append(res, err) } @@ -176,6 +201,18 @@ func (m *Cable) validateColor(formats strfmt.Registry) error { return nil } +func (m *Cable) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Cable) validateLabel(formats strfmt.Registry) error { if swag.IsZero(m.Label) { // not required return nil @@ -188,6 +225,18 @@ func (m *Cable) validateLabel(formats strfmt.Registry) error { return nil } +func (m *Cable) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Cable) validateLengthUnit(formats strfmt.Registry) error { if swag.IsZero(m.LengthUnit) { // not required return nil @@ -197,6 +246,8 @@ func (m *Cable) validateLengthUnit(formats strfmt.Registry) error { if err := m.LengthUnit.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("length_unit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("length_unit") } return err } @@ -214,6 +265,8 @@ func (m *Cable) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -236,6 +289,8 @@ func (m *Cable) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -246,6 +301,25 @@ func (m *Cable) validateTags(formats strfmt.Registry) error { return nil } +func (m *Cable) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + func (m *Cable) validateTerminationaID(formats strfmt.Registry) error { if err := validate.Required("termination_a_id", "body", m.TerminationaID); err != nil { @@ -256,7 +330,7 @@ func (m *Cable) validateTerminationaID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("termination_a_id", "body", *m.TerminationaID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_a_id", "body", *m.TerminationaID, 9.223372036854776e+18, false); err != nil { return err } @@ -282,7 +356,7 @@ func (m *Cable) validateTerminationbID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("termination_b_id", "body", *m.TerminationbID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_b_id", "body", *m.TerminationbID, 9.223372036854776e+18, false); err != nil { return err } @@ -419,6 +493,10 @@ func (m *Cable) validateURL(formats strfmt.Registry) error { func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -427,6 +505,10 @@ func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) er res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLengthUnit(ctx, formats); err != nil { res = append(res, err) } @@ -439,6 +521,18 @@ func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) er res = append(res, err) } + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTerminationa(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTerminationb(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -449,6 +543,15 @@ func (m *Cable) ContextValidate(ctx context.Context, formats strfmt.Registry) er return nil } +func (m *Cable) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *Cable) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -467,12 +570,23 @@ func (m *Cable) contextValidateID(ctx context.Context, formats strfmt.Registry) return nil } +func (m *Cable) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *Cable) contextValidateLengthUnit(ctx context.Context, formats strfmt.Registry) error { if m.LengthUnit != nil { if err := m.LengthUnit.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("length_unit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("length_unit") } return err } @@ -487,6 +601,8 @@ func (m *Cable) contextValidateStatus(ctx context.Context, formats strfmt.Regist if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -503,6 +619,8 @@ func (m *Cable) contextValidateTags(ctx context.Context, formats strfmt.Registry if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -513,6 +631,32 @@ func (m *Cable) contextValidateTags(ctx context.Context, formats strfmt.Registry return nil } +func (m *Cable) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + +func (m *Cable) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *Cable) contextValidateTerminationb(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *Cable) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/circuit.go b/netbox/models/circuit.go index 1103b5ac6..7d2604be5 100644 --- a/netbox/models/circuit.go +++ b/netbox/models/circuit.go @@ -52,8 +52,8 @@ type Circuit struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type Circuit struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -212,7 +212,7 @@ func (m *Circuit) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -265,6 +265,8 @@ func (m *Circuit) validateProvider(formats strfmt.Registry) error { if err := m.Provider.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider") } return err } @@ -282,6 +284,8 @@ func (m *Circuit) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -304,6 +308,8 @@ func (m *Circuit) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -323,6 +329,8 @@ func (m *Circuit) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -340,6 +348,8 @@ func (m *Circuit) validateTerminationa(formats strfmt.Registry) error { if err := m.Terminationa.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("termination_a") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("termination_a") } return err } @@ -357,6 +367,8 @@ func (m *Circuit) validateTerminationz(formats strfmt.Registry) error { if err := m.Terminationz.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("termination_z") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("termination_z") } return err } @@ -375,6 +387,8 @@ func (m *Circuit) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -455,7 +469,7 @@ func (m *Circuit) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Circuit) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -495,6 +509,8 @@ func (m *Circuit) contextValidateProvider(ctx context.Context, formats strfmt.Re if err := m.Provider.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider") } return err } @@ -509,6 +525,8 @@ func (m *Circuit) contextValidateStatus(ctx context.Context, formats strfmt.Regi if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -525,6 +543,8 @@ func (m *Circuit) contextValidateTags(ctx context.Context, formats strfmt.Regist if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -541,6 +561,8 @@ func (m *Circuit) contextValidateTenant(ctx context.Context, formats strfmt.Regi if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -555,6 +577,8 @@ func (m *Circuit) contextValidateTerminationa(ctx context.Context, formats strfm if err := m.Terminationa.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("termination_a") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("termination_a") } return err } @@ -569,6 +593,8 @@ func (m *Circuit) contextValidateTerminationz(ctx context.Context, formats strfm if err := m.Terminationz.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("termination_z") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("termination_z") } return err } @@ -583,6 +609,8 @@ func (m *Circuit) contextValidateType(ctx context.Context, formats strfmt.Regist if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } diff --git a/netbox/models/circuit_circuit_termination.go b/netbox/models/circuit_circuit_termination.go index d93668b1f..b205f8d1a 100644 --- a/netbox/models/circuit_circuit_termination.go +++ b/netbox/models/circuit_circuit_termination.go @@ -38,7 +38,7 @@ type CircuitCircuitTermination struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -132,6 +132,8 @@ func (m *CircuitCircuitTermination) validateProviderNetwork(formats strfmt.Regis if err := m.ProviderNetwork.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider_network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider_network") } return err } @@ -150,6 +152,8 @@ func (m *CircuitCircuitTermination) validateSite(formats strfmt.Registry) error if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -252,6 +256,8 @@ func (m *CircuitCircuitTermination) contextValidateProviderNetwork(ctx context.C if err := m.ProviderNetwork.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider_network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider_network") } return err } @@ -266,6 +272,8 @@ func (m *CircuitCircuitTermination) contextValidateSite(ctx context.Context, for if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } diff --git a/netbox/models/circuit_termination.go b/netbox/models/circuit_termination.go index 77b2148fb..6b6d4e447 100644 --- a/netbox/models/circuit_termination.go +++ b/netbox/models/circuit_termination.go @@ -42,22 +42,15 @@ type CircuitTermination struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // circuit // Required: true Circuit *NestedCircuit `json:"circuit"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Description // Max Length: 200 Description string `json:"description,omitempty"` @@ -66,10 +59,27 @@ type CircuitTermination struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected @@ -124,10 +134,18 @@ func (m *CircuitTermination) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDescription(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validatePortSpeed(formats); err != nil { res = append(res, err) } @@ -175,6 +193,8 @@ func (m *CircuitTermination) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -193,6 +213,8 @@ func (m *CircuitTermination) validateCircuit(formats strfmt.Registry) error { if err := m.Circuit.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuit") } return err } @@ -201,6 +223,18 @@ func (m *CircuitTermination) validateCircuit(formats strfmt.Registry) error { return nil } +func (m *CircuitTermination) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *CircuitTermination) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil @@ -213,6 +247,18 @@ func (m *CircuitTermination) validateDescription(formats strfmt.Registry) error return nil } +func (m *CircuitTermination) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *CircuitTermination) validatePortSpeed(formats strfmt.Registry) error { if swag.IsZero(m.PortSpeed) { // not required return nil @@ -250,6 +296,8 @@ func (m *CircuitTermination) validateProviderNetwork(formats strfmt.Registry) er if err := m.ProviderNetwork.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider_network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider_network") } return err } @@ -267,6 +315,8 @@ func (m *CircuitTermination) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -370,11 +420,11 @@ func (m *CircuitTermination) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateCircuit(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateCircuit(ctx, formats); err != nil { + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -386,6 +436,18 @@ func (m *CircuitTermination) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateProviderNetwork(ctx, formats); err != nil { res = append(res, err) } @@ -419,6 +481,8 @@ func (m *CircuitTermination) contextValidateCable(ctx context.Context, formats s if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -427,21 +491,14 @@ func (m *CircuitTermination) contextValidateCable(ctx context.Context, formats s return nil } -func (m *CircuitTermination) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } - - return nil -} - func (m *CircuitTermination) contextValidateCircuit(ctx context.Context, formats strfmt.Registry) error { if m.Circuit != nil { if err := m.Circuit.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("circuit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("circuit") } return err } @@ -450,6 +507,15 @@ func (m *CircuitTermination) contextValidateCircuit(ctx context.Context, formats return nil } +func (m *CircuitTermination) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *CircuitTermination) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -468,12 +534,37 @@ func (m *CircuitTermination) contextValidateID(ctx context.Context, formats strf return nil } +func (m *CircuitTermination) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *CircuitTermination) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *CircuitTermination) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *CircuitTermination) contextValidateProviderNetwork(ctx context.Context, formats strfmt.Registry) error { if m.ProviderNetwork != nil { if err := m.ProviderNetwork.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider_network") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider_network") } return err } @@ -488,6 +579,8 @@ func (m *CircuitTermination) contextValidateSite(ctx context.Context, formats st if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } diff --git a/netbox/models/circuit_type.go b/netbox/models/circuit_type.go index 2801b7735..0f09dd4fa 100644 --- a/netbox/models/circuit_type.go +++ b/netbox/models/circuit_type.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type CircuitType struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type CircuitType struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -76,6 +77,9 @@ type CircuitType struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -106,6 +110,10 @@ func (m *CircuitType) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -121,7 +129,7 @@ func (m *CircuitType) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -190,6 +198,32 @@ func (m *CircuitType) validateSlug(formats strfmt.Registry) error { return nil } +func (m *CircuitType) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *CircuitType) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -226,6 +260,10 @@ func (m *CircuitType) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -247,7 +285,7 @@ func (m *CircuitType) contextValidateCircuitCount(ctx context.Context, formats s func (m *CircuitType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -281,6 +319,26 @@ func (m *CircuitType) contextValidateLastUpdated(ctx context.Context, formats st return nil } +func (m *CircuitType) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *CircuitType) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/cluster.go b/netbox/models/cluster.go index 35c7a5353..047e14078 100644 --- a/netbox/models/cluster.go +++ b/netbox/models/cluster.go @@ -40,8 +40,8 @@ type Cluster struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -57,7 +57,7 @@ type Cluster struct { // group Group *NestedClusterGroup `json:"group,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -146,7 +146,7 @@ func (m *Cluster) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -162,6 +162,8 @@ func (m *Cluster) validateGroup(formats strfmt.Registry) error { if err := m.Group.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -208,6 +210,8 @@ func (m *Cluster) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -230,6 +234,8 @@ func (m *Cluster) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -249,6 +255,8 @@ func (m *Cluster) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -267,6 +275,8 @@ func (m *Cluster) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -347,7 +357,7 @@ func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Cluster) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -378,6 +388,8 @@ func (m *Cluster) contextValidateGroup(ctx context.Context, formats strfmt.Regis if err := m.Group.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -410,6 +422,8 @@ func (m *Cluster) contextValidateSite(ctx context.Context, formats strfmt.Regist if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -426,6 +440,8 @@ func (m *Cluster) contextValidateTags(ctx context.Context, formats strfmt.Regist if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -442,6 +458,8 @@ func (m *Cluster) contextValidateTenant(ctx context.Context, formats strfmt.Regi if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -456,6 +474,8 @@ func (m *Cluster) contextValidateType(ctx context.Context, formats strfmt.Regist if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } diff --git a/netbox/models/cluster_group.go b/netbox/models/cluster_group.go index abfe83f9d..0755b3a0d 100644 --- a/netbox/models/cluster_group.go +++ b/netbox/models/cluster_group.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type ClusterGroup struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type ClusterGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -76,6 +77,9 @@ type ClusterGroup struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -106,6 +110,10 @@ func (m *ClusterGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -121,7 +129,7 @@ func (m *ClusterGroup) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -190,6 +198,32 @@ func (m *ClusterGroup) validateSlug(formats strfmt.Registry) error { return nil } +func (m *ClusterGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *ClusterGroup) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -226,6 +260,10 @@ func (m *ClusterGroup) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -247,7 +285,7 @@ func (m *ClusterGroup) contextValidateClusterCount(ctx context.Context, formats func (m *ClusterGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -281,6 +319,26 @@ func (m *ClusterGroup) contextValidateLastUpdated(ctx context.Context, formats s return nil } +func (m *ClusterGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *ClusterGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/cluster_type.go b/netbox/models/cluster_type.go index 219601e1b..93ab1869a 100644 --- a/netbox/models/cluster_type.go +++ b/netbox/models/cluster_type.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type ClusterType struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type ClusterType struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -76,6 +77,9 @@ type ClusterType struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -106,6 +110,10 @@ func (m *ClusterType) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -121,7 +129,7 @@ func (m *ClusterType) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -190,6 +198,32 @@ func (m *ClusterType) validateSlug(formats strfmt.Registry) error { return nil } +func (m *ClusterType) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *ClusterType) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -226,6 +260,10 @@ func (m *ClusterType) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -247,7 +285,7 @@ func (m *ClusterType) contextValidateClusterCount(ctx context.Context, formats s func (m *ClusterType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -281,6 +319,26 @@ func (m *ClusterType) contextValidateLastUpdated(ctx context.Context, formats st return nil } +func (m *ClusterType) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *ClusterType) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/component_nested_module.go b/netbox/models/component_nested_module.go new file mode 100644 index 000000000..4c9795dde --- /dev/null +++ b/netbox/models/component_nested_module.go @@ -0,0 +1,205 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ComponentNestedModule component nested module +// +// swagger:model ComponentNestedModule +type ComponentNestedModule struct { + + // Device + // Required: true + Device *int64 `json:"device"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // module bay + ModuleBay *ModuleNestedModuleBay `json:"module_bay,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this component nested module +func (m *ComponentNestedModule) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleBay(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ComponentNestedModule) validateDevice(formats strfmt.Registry) error { + + if err := validate.Required("device", "body", m.Device); err != nil { + return err + } + + return nil +} + +func (m *ComponentNestedModule) validateModuleBay(formats strfmt.Registry) error { + if swag.IsZero(m.ModuleBay) { // not required + return nil + } + + if m.ModuleBay != nil { + if err := m.ModuleBay.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_bay") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_bay") + } + return err + } + } + + return nil +} + +func (m *ComponentNestedModule) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this component nested module based on the context it is used +func (m *ComponentNestedModule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModuleBay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ComponentNestedModule) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ComponentNestedModule) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ComponentNestedModule) contextValidateModuleBay(ctx context.Context, formats strfmt.Registry) error { + + if m.ModuleBay != nil { + if err := m.ModuleBay.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_bay") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_bay") + } + return err + } + } + + return nil +} + +func (m *ComponentNestedModule) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ComponentNestedModule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ComponentNestedModule) UnmarshalBinary(b []byte) error { + var res ComponentNestedModule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/config_context.go b/netbox/models/config_context.go index cbbb08f6d..1d5b7824f 100644 --- a/netbox/models/config_context.go +++ b/netbox/models/config_context.go @@ -39,14 +39,18 @@ type ConfigContext struct { // Unique: true ClusterGroups []*NestedClusterGroup `json:"cluster_groups"` + // cluster types + // Unique: true + ClusterTypes []*NestedClusterType `json:"cluster_types"` + // clusters // Unique: true Clusters []*NestedCluster `json:"clusters"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Data // Required: true @@ -64,7 +68,7 @@ type ConfigContext struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -133,6 +137,10 @@ func (m *ConfigContext) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateClusterTypes(formats); err != nil { + res = append(res, err) + } + if err := m.validateClusters(formats); err != nil { res = append(res, err) } @@ -225,6 +233,38 @@ func (m *ConfigContext) validateClusterGroups(formats strfmt.Registry) error { if err := m.ClusterGroups[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster_groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster_groups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ConfigContext) validateClusterTypes(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterTypes) { // not required + return nil + } + + if err := validate.UniqueItems("cluster_types", "body", m.ClusterTypes); err != nil { + return err + } + + for i := 0; i < len(m.ClusterTypes); i++ { + if swag.IsZero(m.ClusterTypes[i]) { // not required + continue + } + + if m.ClusterTypes[i] != nil { + if err := m.ClusterTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cluster_types" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster_types" + "." + strconv.Itoa(i)) } return err } @@ -253,6 +293,8 @@ func (m *ConfigContext) validateClusters(formats strfmt.Registry) error { if err := m.Clusters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusters" + "." + strconv.Itoa(i)) } return err } @@ -268,7 +310,7 @@ func (m *ConfigContext) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -314,6 +356,8 @@ func (m *ConfigContext) validateDeviceTypes(formats strfmt.Registry) error { if err := m.DeviceTypes[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_types" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_types" + "." + strconv.Itoa(i)) } return err } @@ -371,6 +415,8 @@ func (m *ConfigContext) validatePlatforms(formats strfmt.Registry) error { if err := m.Platforms[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platforms" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platforms" + "." + strconv.Itoa(i)) } return err } @@ -399,6 +445,8 @@ func (m *ConfigContext) validateRegions(formats strfmt.Registry) error { if err := m.Regions[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("regions" + "." + strconv.Itoa(i)) } return err } @@ -427,6 +475,8 @@ func (m *ConfigContext) validateRoles(formats strfmt.Registry) error { if err := m.Roles[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("roles" + "." + strconv.Itoa(i)) } return err } @@ -455,6 +505,8 @@ func (m *ConfigContext) validateSiteGroups(formats strfmt.Registry) error { if err := m.SiteGroups[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site_groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site_groups" + "." + strconv.Itoa(i)) } return err } @@ -483,6 +535,8 @@ func (m *ConfigContext) validateSites(formats strfmt.Registry) error { if err := m.Sites[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sites" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sites" + "." + strconv.Itoa(i)) } return err } @@ -531,6 +585,8 @@ func (m *ConfigContext) validateTenantGroups(formats strfmt.Registry) error { if err := m.TenantGroups[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant_groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant_groups" + "." + strconv.Itoa(i)) } return err } @@ -559,6 +615,8 @@ func (m *ConfigContext) validateTenants(formats strfmt.Registry) error { if err := m.Tenants[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) } return err } @@ -605,6 +663,10 @@ func (m *ConfigContext) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateClusterTypes(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateClusters(ctx, formats); err != nil { res = append(res, err) } @@ -675,6 +737,28 @@ func (m *ConfigContext) contextValidateClusterGroups(ctx context.Context, format if err := m.ClusterGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster_groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster_groups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ConfigContext) contextValidateClusterTypes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ClusterTypes); i++ { + + if m.ClusterTypes[i] != nil { + if err := m.ClusterTypes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cluster_types" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster_types" + "." + strconv.Itoa(i)) } return err } @@ -693,6 +777,8 @@ func (m *ConfigContext) contextValidateClusters(ctx context.Context, formats str if err := m.Clusters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusters" + "." + strconv.Itoa(i)) } return err } @@ -705,7 +791,7 @@ func (m *ConfigContext) contextValidateClusters(ctx context.Context, formats str func (m *ConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -720,6 +806,8 @@ func (m *ConfigContext) contextValidateDeviceTypes(ctx context.Context, formats if err := m.DeviceTypes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_types" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_types" + "." + strconv.Itoa(i)) } return err } @@ -765,6 +853,8 @@ func (m *ConfigContext) contextValidatePlatforms(ctx context.Context, formats st if err := m.Platforms[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platforms" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platforms" + "." + strconv.Itoa(i)) } return err } @@ -783,6 +873,8 @@ func (m *ConfigContext) contextValidateRegions(ctx context.Context, formats strf if err := m.Regions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("regions" + "." + strconv.Itoa(i)) } return err } @@ -801,6 +893,8 @@ func (m *ConfigContext) contextValidateRoles(ctx context.Context, formats strfmt if err := m.Roles[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("roles" + "." + strconv.Itoa(i)) } return err } @@ -819,6 +913,8 @@ func (m *ConfigContext) contextValidateSiteGroups(ctx context.Context, formats s if err := m.SiteGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site_groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site_groups" + "." + strconv.Itoa(i)) } return err } @@ -837,6 +933,8 @@ func (m *ConfigContext) contextValidateSites(ctx context.Context, formats strfmt if err := m.Sites[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sites" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sites" + "." + strconv.Itoa(i)) } return err } @@ -855,6 +953,8 @@ func (m *ConfigContext) contextValidateTenantGroups(ctx context.Context, formats if err := m.TenantGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant_groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant_groups" + "." + strconv.Itoa(i)) } return err } @@ -873,6 +973,8 @@ func (m *ConfigContext) contextValidateTenants(ctx context.Context, formats strf if err := m.Tenants[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenants" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenants" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/console_port.go b/netbox/models/console_port.go index 55ee3a4d3..397881ae3 100644 --- a/netbox/models/console_port.go +++ b/netbox/models/console_port.go @@ -43,25 +43,13 @@ type ConsolePort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -73,8 +61,8 @@ type ConsolePort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -91,7 +79,7 @@ type ConsolePort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -106,11 +94,26 @@ type ConsolePort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -160,6 +163,10 @@ func (m *ConsolePort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -195,6 +202,8 @@ func (m *ConsolePort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -208,7 +217,7 @@ func (m *ConsolePort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -237,6 +246,8 @@ func (m *ConsolePort) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -269,6 +280,25 @@ func (m *ConsolePort) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *ConsolePort) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *ConsolePort) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -295,6 +325,8 @@ func (m *ConsolePort) validateSpeed(formats strfmt.Registry) error { if err := m.Speed.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("speed") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("speed") } return err } @@ -317,6 +349,8 @@ func (m *ConsolePort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -336,6 +370,8 @@ func (m *ConsolePort) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -368,7 +404,7 @@ func (m *ConsolePort) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -400,6 +436,18 @@ func (m *ConsolePort) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateSpeed(ctx, formats); err != nil { res = append(res, err) } @@ -437,6 +485,8 @@ func (m *ConsolePort) contextValidateCable(ctx context.Context, formats strfmt.R if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -445,11 +495,7 @@ func (m *ConsolePort) contextValidateCable(ctx context.Context, formats strfmt.R return nil } -func (m *ConsolePort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *ConsolePort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -474,7 +520,7 @@ func (m *ConsolePort) contextValidateConnectedEndpointType(ctx context.Context, func (m *ConsolePort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -487,6 +533,8 @@ func (m *ConsolePort) contextValidateDevice(ctx context.Context, formats strfmt. if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -522,12 +570,44 @@ func (m *ConsolePort) contextValidateLastUpdated(ctx context.Context, formats st return nil } +func (m *ConsolePort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *ConsolePort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *ConsolePort) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *ConsolePort) contextValidateSpeed(ctx context.Context, formats strfmt.Registry) error { if m.Speed != nil { if err := m.Speed.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("speed") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("speed") } return err } @@ -544,6 +624,8 @@ func (m *ConsolePort) contextValidateTags(ctx context.Context, formats strfmt.Re if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -560,6 +642,8 @@ func (m *ConsolePort) contextValidateType(ctx context.Context, formats strfmt.Re if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -754,12 +838,12 @@ type ConsolePortType struct { // label // Required: true - // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B Other] + // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 Mini-DIN 8 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB Micro AB Other] Label *string `json:"label"` // value // Required: true - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Value *string `json:"value"` } @@ -785,7 +869,7 @@ var consolePortTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","Mini-DIN 8","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB Micro AB","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -810,6 +894,9 @@ const ( // ConsolePortTypeLabelRJDash45 captures enum value "RJ-45" ConsolePortTypeLabelRJDash45 string = "RJ-45" + // ConsolePortTypeLabelMiniDashDIN8 captures enum value "Mini-DIN 8" + ConsolePortTypeLabelMiniDashDIN8 string = "Mini-DIN 8" + // ConsolePortTypeLabelUSBTypeA captures enum value "USB Type A" ConsolePortTypeLabelUSBTypeA string = "USB Type A" @@ -831,6 +918,9 @@ const ( // ConsolePortTypeLabelUSBMicroB captures enum value "USB Micro B" ConsolePortTypeLabelUSBMicroB string = "USB Micro B" + // ConsolePortTypeLabelUSBMicroAB captures enum value "USB Micro AB" + ConsolePortTypeLabelUSBMicroAB string = "USB Micro AB" + // ConsolePortTypeLabelOther captures enum value "Other" ConsolePortTypeLabelOther string = "Other" ) @@ -861,7 +951,7 @@ var consolePortTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -886,6 +976,9 @@ const ( // ConsolePortTypeValueRjDash45 captures enum value "rj-45" ConsolePortTypeValueRjDash45 string = "rj-45" + // ConsolePortTypeValueMiniDashDinDash8 captures enum value "mini-din-8" + ConsolePortTypeValueMiniDashDinDash8 string = "mini-din-8" + // ConsolePortTypeValueUsbDasha captures enum value "usb-a" ConsolePortTypeValueUsbDasha string = "usb-a" @@ -907,6 +1000,9 @@ const ( // ConsolePortTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" ConsolePortTypeValueUsbDashMicroDashb string = "usb-micro-b" + // ConsolePortTypeValueUsbDashMicroDashAb captures enum value "usb-micro-ab" + ConsolePortTypeValueUsbDashMicroDashAb string = "usb-micro-ab" + // ConsolePortTypeValueOther captures enum value "other" ConsolePortTypeValueOther string = "other" ) diff --git a/netbox/models/console_port_template.go b/netbox/models/console_port_template.go index c2fc747df..74d9d18e2 100644 --- a/netbox/models/console_port_template.go +++ b/netbox/models/console_port_template.go @@ -37,8 +37,8 @@ type ConsolePortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -52,7 +52,7 @@ type ConsolePortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -129,7 +129,7 @@ func (m *ConsolePortTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -158,6 +158,8 @@ func (m *ConsolePortTemplate) validateDeviceType(formats strfmt.Registry) error if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -216,6 +218,8 @@ func (m *ConsolePortTemplate) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -276,7 +280,7 @@ func (m *ConsolePortTemplate) ContextValidate(ctx context.Context, formats strfm func (m *ConsolePortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -289,6 +293,8 @@ func (m *ConsolePortTemplate) contextValidateDeviceType(ctx context.Context, for if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -330,6 +336,8 @@ func (m *ConsolePortTemplate) contextValidateType(ctx context.Context, formats s if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -372,12 +380,12 @@ type ConsolePortTemplateType struct { // label // Required: true - // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B Other] + // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 Mini-DIN 8 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB Micro AB Other] Label *string `json:"label"` // value // Required: true - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Value *string `json:"value"` } @@ -403,7 +411,7 @@ var consolePortTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","Mini-DIN 8","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB Micro AB","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -428,6 +436,9 @@ const ( // ConsolePortTemplateTypeLabelRJDash45 captures enum value "RJ-45" ConsolePortTemplateTypeLabelRJDash45 string = "RJ-45" + // ConsolePortTemplateTypeLabelMiniDashDIN8 captures enum value "Mini-DIN 8" + ConsolePortTemplateTypeLabelMiniDashDIN8 string = "Mini-DIN 8" + // ConsolePortTemplateTypeLabelUSBTypeA captures enum value "USB Type A" ConsolePortTemplateTypeLabelUSBTypeA string = "USB Type A" @@ -449,6 +460,9 @@ const ( // ConsolePortTemplateTypeLabelUSBMicroB captures enum value "USB Micro B" ConsolePortTemplateTypeLabelUSBMicroB string = "USB Micro B" + // ConsolePortTemplateTypeLabelUSBMicroAB captures enum value "USB Micro AB" + ConsolePortTemplateTypeLabelUSBMicroAB string = "USB Micro AB" + // ConsolePortTemplateTypeLabelOther captures enum value "Other" ConsolePortTemplateTypeLabelOther string = "Other" ) @@ -479,7 +493,7 @@ var consolePortTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -504,6 +518,9 @@ const ( // ConsolePortTemplateTypeValueRjDash45 captures enum value "rj-45" ConsolePortTemplateTypeValueRjDash45 string = "rj-45" + // ConsolePortTemplateTypeValueMiniDashDinDash8 captures enum value "mini-din-8" + ConsolePortTemplateTypeValueMiniDashDinDash8 string = "mini-din-8" + // ConsolePortTemplateTypeValueUsbDasha captures enum value "usb-a" ConsolePortTemplateTypeValueUsbDasha string = "usb-a" @@ -525,6 +542,9 @@ const ( // ConsolePortTemplateTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" ConsolePortTemplateTypeValueUsbDashMicroDashb string = "usb-micro-b" + // ConsolePortTemplateTypeValueUsbDashMicroDashAb captures enum value "usb-micro-ab" + ConsolePortTemplateTypeValueUsbDashMicroDashAb string = "usb-micro-ab" + // ConsolePortTemplateTypeValueOther captures enum value "other" ConsolePortTemplateTypeValueOther string = "other" ) diff --git a/netbox/models/console_server_port.go b/netbox/models/console_server_port.go index 065c44f3a..d255ceb21 100644 --- a/netbox/models/console_server_port.go +++ b/netbox/models/console_server_port.go @@ -43,25 +43,13 @@ type ConsoleServerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -73,8 +61,8 @@ type ConsoleServerPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -91,7 +79,7 @@ type ConsoleServerPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -106,11 +94,26 @@ type ConsoleServerPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -160,6 +163,10 @@ func (m *ConsoleServerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -195,6 +202,8 @@ func (m *ConsoleServerPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -208,7 +217,7 @@ func (m *ConsoleServerPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -237,6 +246,8 @@ func (m *ConsoleServerPort) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -269,6 +280,25 @@ func (m *ConsoleServerPort) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *ConsoleServerPort) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *ConsoleServerPort) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -295,6 +325,8 @@ func (m *ConsoleServerPort) validateSpeed(formats strfmt.Registry) error { if err := m.Speed.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("speed") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("speed") } return err } @@ -317,6 +349,8 @@ func (m *ConsoleServerPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -336,6 +370,8 @@ func (m *ConsoleServerPort) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -368,7 +404,7 @@ func (m *ConsoleServerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -400,6 +436,18 @@ func (m *ConsoleServerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateSpeed(ctx, formats); err != nil { res = append(res, err) } @@ -437,6 +485,8 @@ func (m *ConsoleServerPort) contextValidateCable(ctx context.Context, formats st if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -445,11 +495,7 @@ func (m *ConsoleServerPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *ConsoleServerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *ConsoleServerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -474,7 +520,7 @@ func (m *ConsoleServerPort) contextValidateConnectedEndpointType(ctx context.Con func (m *ConsoleServerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -487,6 +533,8 @@ func (m *ConsoleServerPort) contextValidateDevice(ctx context.Context, formats s if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -522,12 +570,44 @@ func (m *ConsoleServerPort) contextValidateLastUpdated(ctx context.Context, form return nil } +func (m *ConsoleServerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *ConsoleServerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *ConsoleServerPort) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *ConsoleServerPort) contextValidateSpeed(ctx context.Context, formats strfmt.Registry) error { if m.Speed != nil { if err := m.Speed.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("speed") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("speed") } return err } @@ -544,6 +624,8 @@ func (m *ConsoleServerPort) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -560,6 +642,8 @@ func (m *ConsoleServerPort) contextValidateType(ctx context.Context, formats str if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -754,12 +838,12 @@ type ConsoleServerPortType struct { // label // Required: true - // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B Other] + // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 Mini-DIN 8 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB Micro AB Other] Label *string `json:"label"` // value // Required: true - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Value *string `json:"value"` } @@ -785,7 +869,7 @@ var consoleServerPortTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","Mini-DIN 8","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB Micro AB","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -810,6 +894,9 @@ const ( // ConsoleServerPortTypeLabelRJDash45 captures enum value "RJ-45" ConsoleServerPortTypeLabelRJDash45 string = "RJ-45" + // ConsoleServerPortTypeLabelMiniDashDIN8 captures enum value "Mini-DIN 8" + ConsoleServerPortTypeLabelMiniDashDIN8 string = "Mini-DIN 8" + // ConsoleServerPortTypeLabelUSBTypeA captures enum value "USB Type A" ConsoleServerPortTypeLabelUSBTypeA string = "USB Type A" @@ -831,6 +918,9 @@ const ( // ConsoleServerPortTypeLabelUSBMicroB captures enum value "USB Micro B" ConsoleServerPortTypeLabelUSBMicroB string = "USB Micro B" + // ConsoleServerPortTypeLabelUSBMicroAB captures enum value "USB Micro AB" + ConsoleServerPortTypeLabelUSBMicroAB string = "USB Micro AB" + // ConsoleServerPortTypeLabelOther captures enum value "Other" ConsoleServerPortTypeLabelOther string = "Other" ) @@ -861,7 +951,7 @@ var consoleServerPortTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -886,6 +976,9 @@ const ( // ConsoleServerPortTypeValueRjDash45 captures enum value "rj-45" ConsoleServerPortTypeValueRjDash45 string = "rj-45" + // ConsoleServerPortTypeValueMiniDashDinDash8 captures enum value "mini-din-8" + ConsoleServerPortTypeValueMiniDashDinDash8 string = "mini-din-8" + // ConsoleServerPortTypeValueUsbDasha captures enum value "usb-a" ConsoleServerPortTypeValueUsbDasha string = "usb-a" @@ -907,6 +1000,9 @@ const ( // ConsoleServerPortTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" ConsoleServerPortTypeValueUsbDashMicroDashb string = "usb-micro-b" + // ConsoleServerPortTypeValueUsbDashMicroDashAb captures enum value "usb-micro-ab" + ConsoleServerPortTypeValueUsbDashMicroDashAb string = "usb-micro-ab" + // ConsoleServerPortTypeValueOther captures enum value "other" ConsoleServerPortTypeValueOther string = "other" ) diff --git a/netbox/models/console_server_port_template.go b/netbox/models/console_server_port_template.go index 06e479bd5..83e8b9b90 100644 --- a/netbox/models/console_server_port_template.go +++ b/netbox/models/console_server_port_template.go @@ -37,8 +37,8 @@ type ConsoleServerPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -52,7 +52,7 @@ type ConsoleServerPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -129,7 +129,7 @@ func (m *ConsoleServerPortTemplate) validateCreated(formats strfmt.Registry) err return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -158,6 +158,8 @@ func (m *ConsoleServerPortTemplate) validateDeviceType(formats strfmt.Registry) if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -216,6 +218,8 @@ func (m *ConsoleServerPortTemplate) validateType(formats strfmt.Registry) error if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -276,7 +280,7 @@ func (m *ConsoleServerPortTemplate) ContextValidate(ctx context.Context, formats func (m *ConsoleServerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -289,6 +293,8 @@ func (m *ConsoleServerPortTemplate) contextValidateDeviceType(ctx context.Contex if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -330,6 +336,8 @@ func (m *ConsoleServerPortTemplate) contextValidateType(ctx context.Context, for if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -372,12 +380,12 @@ type ConsoleServerPortTemplateType struct { // label // Required: true - // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B Other] + // Enum: [DE-9 DB-25 RJ-11 RJ-12 RJ-45 Mini-DIN 8 USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB Micro AB Other] Label *string `json:"label"` // value // Required: true - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Value *string `json:"value"` } @@ -403,7 +411,7 @@ var consoleServerPortTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["DE-9","DB-25","RJ-11","RJ-12","RJ-45","Mini-DIN 8","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB Micro AB","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -428,6 +436,9 @@ const ( // ConsoleServerPortTemplateTypeLabelRJDash45 captures enum value "RJ-45" ConsoleServerPortTemplateTypeLabelRJDash45 string = "RJ-45" + // ConsoleServerPortTemplateTypeLabelMiniDashDIN8 captures enum value "Mini-DIN 8" + ConsoleServerPortTemplateTypeLabelMiniDashDIN8 string = "Mini-DIN 8" + // ConsoleServerPortTemplateTypeLabelUSBTypeA captures enum value "USB Type A" ConsoleServerPortTemplateTypeLabelUSBTypeA string = "USB Type A" @@ -449,6 +460,9 @@ const ( // ConsoleServerPortTemplateTypeLabelUSBMicroB captures enum value "USB Micro B" ConsoleServerPortTemplateTypeLabelUSBMicroB string = "USB Micro B" + // ConsoleServerPortTemplateTypeLabelUSBMicroAB captures enum value "USB Micro AB" + ConsoleServerPortTemplateTypeLabelUSBMicroAB string = "USB Micro AB" + // ConsoleServerPortTemplateTypeLabelOther captures enum value "Other" ConsoleServerPortTemplateTypeLabelOther string = "Other" ) @@ -479,7 +493,7 @@ var consoleServerPortTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -504,6 +518,9 @@ const ( // ConsoleServerPortTemplateTypeValueRjDash45 captures enum value "rj-45" ConsoleServerPortTemplateTypeValueRjDash45 string = "rj-45" + // ConsoleServerPortTemplateTypeValueMiniDashDinDash8 captures enum value "mini-din-8" + ConsoleServerPortTemplateTypeValueMiniDashDinDash8 string = "mini-din-8" + // ConsoleServerPortTemplateTypeValueUsbDasha captures enum value "usb-a" ConsoleServerPortTemplateTypeValueUsbDasha string = "usb-a" @@ -525,6 +542,9 @@ const ( // ConsoleServerPortTemplateTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" ConsoleServerPortTemplateTypeValueUsbDashMicroDashb string = "usb-micro-b" + // ConsoleServerPortTemplateTypeValueUsbDashMicroDashAb captures enum value "usb-micro-ab" + ConsoleServerPortTemplateTypeValueUsbDashMicroDashAb string = "usb-micro-ab" + // ConsoleServerPortTemplateTypeValueOther captures enum value "other" ConsoleServerPortTemplateTypeValueOther string = "other" ) diff --git a/netbox/models/contact.go b/netbox/models/contact.go new file mode 100644 index 000000000..67600615d --- /dev/null +++ b/netbox/models/contact.go @@ -0,0 +1,457 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Contact contact +// +// swagger:model Contact +type Contact struct { + + // Address + // Max Length: 200 + Address string `json:"address,omitempty"` + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Email + // Max Length: 254 + // Format: email + Email strfmt.Email `json:"email,omitempty"` + + // group + Group *NestedContactGroup `json:"group,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Link + // Max Length: 200 + // Format: uri + Link strfmt.URI `json:"link,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Phone + // Max Length: 50 + Phone string `json:"phone,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Title + // Max Length: 100 + Title string `json:"title,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this contact +func (m *Contact) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEmail(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLink(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePhone(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Contact) validateAddress(formats strfmt.Registry) error { + if swag.IsZero(m.Address) { // not required + return nil + } + + if err := validate.MaxLength("address", "body", m.Address, 200); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateEmail(formats strfmt.Registry) error { + if swag.IsZero(m.Email) { // not required + return nil + } + + if err := validate.MaxLength("email", "body", m.Email.String(), 254); err != nil { + return err + } + + if err := validate.FormatOf("email", "body", "email", m.Email.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateGroup(formats strfmt.Registry) error { + if swag.IsZero(m.Group) { // not required + return nil + } + + if m.Group != nil { + if err := m.Group.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *Contact) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateLink(formats strfmt.Registry) error { + if swag.IsZero(m.Link) { // not required + return nil + } + + if err := validate.MaxLength("link", "body", m.Link.String(), 200); err != nil { + return err + } + + if err := validate.FormatOf("link", "body", "uri", m.Link.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *Contact) validatePhone(formats strfmt.Registry) error { + if swag.IsZero(m.Phone) { // not required + return nil + } + + if err := validate.MaxLength("phone", "body", m.Phone, 50); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Contact) validateTitle(formats strfmt.Registry) error { + if swag.IsZero(m.Title) { // not required + return nil + } + + if err := validate.MaxLength("title", "body", m.Title, 100); err != nil { + return err + } + + return nil +} + +func (m *Contact) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this contact based on the context it is used +func (m *Contact) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Contact) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *Contact) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *Contact) contextValidateGroup(ctx context.Context, formats strfmt.Registry) error { + + if m.Group != nil { + if err := m.Group.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *Contact) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *Contact) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *Contact) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Contact) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Contact) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Contact) UnmarshalBinary(b []byte) error { + var res Contact + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/contact_assignment.go b/netbox/models/contact_assignment.go new file mode 100644 index 000000000..1c916f2a0 --- /dev/null +++ b/netbox/models/contact_assignment.go @@ -0,0 +1,563 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ContactAssignment contact assignment +// +// swagger:model ContactAssignment +type ContactAssignment struct { + + // contact + // Required: true + Contact *NestedContact `json:"contact"` + + // Content type + // Required: true + ContentType *string `json:"content_type"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Object + // Read Only: true + Object map[string]*string `json:"object,omitempty"` + + // Object id + // Required: true + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + ObjectID *int64 `json:"object_id"` + + // priority + Priority *ContactAssignmentPriority `json:"priority,omitempty"` + + // role + Role *NestedContactRole `json:"role,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this contact assignment +func (m *ContactAssignment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContact(formats); err != nil { + res = append(res, err) + } + + if err := m.validateContentType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateObjectID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePriority(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactAssignment) validateContact(formats strfmt.Registry) error { + + if err := validate.Required("contact", "body", m.Contact); err != nil { + return err + } + + if m.Contact != nil { + if err := m.Contact.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("contact") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("contact") + } + return err + } + } + + return nil +} + +func (m *ContactAssignment) validateContentType(formats strfmt.Registry) error { + + if err := validate.Required("content_type", "body", m.ContentType); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) validateObjectID(formats strfmt.Registry) error { + + if err := validate.Required("object_id", "body", m.ObjectID); err != nil { + return err + } + + if err := validate.MinimumInt("object_id", "body", *m.ObjectID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("object_id", "body", *m.ObjectID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) validatePriority(formats strfmt.Registry) error { + if swag.IsZero(m.Priority) { // not required + return nil + } + + if m.Priority != nil { + if err := m.Priority.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("priority") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("priority") + } + return err + } + } + + return nil +} + +func (m *ContactAssignment) validateRole(formats strfmt.Registry) error { + if swag.IsZero(m.Role) { // not required + return nil + } + + if m.Role != nil { + if err := m.Role.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *ContactAssignment) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this contact assignment based on the context it is used +func (m *ContactAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateContact(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateObject(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePriority(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRole(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactAssignment) contextValidateContact(ctx context.Context, formats strfmt.Registry) error { + + if m.Contact != nil { + if err := m.Contact.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("contact") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("contact") + } + return err + } + } + + return nil +} + +func (m *ContactAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ContactAssignment) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *ContactAssignment) contextValidatePriority(ctx context.Context, formats strfmt.Registry) error { + + if m.Priority != nil { + if err := m.Priority.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("priority") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("priority") + } + return err + } + } + + return nil +} + +func (m *ContactAssignment) contextValidateRole(ctx context.Context, formats strfmt.Registry) error { + + if m.Role != nil { + if err := m.Role.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *ContactAssignment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ContactAssignment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ContactAssignment) UnmarshalBinary(b []byte) error { + var res ContactAssignment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ContactAssignmentPriority Priority +// +// swagger:model ContactAssignmentPriority +type ContactAssignmentPriority struct { + + // label + // Required: true + // Enum: [Primary Secondary Tertiary Inactive] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [primary secondary tertiary inactive] + Value *string `json:"value"` +} + +// Validate validates this contact assignment priority +func (m *ContactAssignmentPriority) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var contactAssignmentPriorityTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Primary","Secondary","Tertiary","Inactive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + contactAssignmentPriorityTypeLabelPropEnum = append(contactAssignmentPriorityTypeLabelPropEnum, v) + } +} + +const ( + + // ContactAssignmentPriorityLabelPrimary captures enum value "Primary" + ContactAssignmentPriorityLabelPrimary string = "Primary" + + // ContactAssignmentPriorityLabelSecondary captures enum value "Secondary" + ContactAssignmentPriorityLabelSecondary string = "Secondary" + + // ContactAssignmentPriorityLabelTertiary captures enum value "Tertiary" + ContactAssignmentPriorityLabelTertiary string = "Tertiary" + + // ContactAssignmentPriorityLabelInactive captures enum value "Inactive" + ContactAssignmentPriorityLabelInactive string = "Inactive" +) + +// prop value enum +func (m *ContactAssignmentPriority) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, contactAssignmentPriorityTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ContactAssignmentPriority) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("priority"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("priority"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var contactAssignmentPriorityTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["primary","secondary","tertiary","inactive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + contactAssignmentPriorityTypeValuePropEnum = append(contactAssignmentPriorityTypeValuePropEnum, v) + } +} + +const ( + + // ContactAssignmentPriorityValuePrimary captures enum value "primary" + ContactAssignmentPriorityValuePrimary string = "primary" + + // ContactAssignmentPriorityValueSecondary captures enum value "secondary" + ContactAssignmentPriorityValueSecondary string = "secondary" + + // ContactAssignmentPriorityValueTertiary captures enum value "tertiary" + ContactAssignmentPriorityValueTertiary string = "tertiary" + + // ContactAssignmentPriorityValueInactive captures enum value "inactive" + ContactAssignmentPriorityValueInactive string = "inactive" +) + +// prop value enum +func (m *ContactAssignmentPriority) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, contactAssignmentPriorityTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ContactAssignmentPriority) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("priority"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("priority"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this contact assignment priority based on context it is used +func (m *ContactAssignmentPriority) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ContactAssignmentPriority) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ContactAssignmentPriority) UnmarshalBinary(b []byte) error { + var res ContactAssignmentPriority + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/contact_group.go b/netbox/models/contact_group.go new file mode 100644 index 000000000..1f2a39f1a --- /dev/null +++ b/netbox/models/contact_group.go @@ -0,0 +1,430 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ContactGroup contact group +// +// swagger:model ContactGroup +type ContactGroup struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Contact count + // Read Only: true + ContactCount int64 `json:"contact_count,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // parent + Parent *NestedContactGroup `json:"parent,omitempty"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this contact group +func (m *ContactGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactGroup) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) validateParent(formats strfmt.Registry) error { + if swag.IsZero(m.Parent) { // not required + return nil + } + + if m.Parent != nil { + if err := m.Parent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") + } + return err + } + } + + return nil +} + +func (m *ContactGroup) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ContactGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this contact group based on the context it is used +func (m *ContactGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateContactCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactGroup) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) contextValidateContactCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "contact_count", "body", int64(m.ContactCount)); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ContactGroup) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { + + if m.Parent != nil { + if err := m.Parent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") + } + return err + } + } + + return nil +} + +func (m *ContactGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ContactGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ContactGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ContactGroup) UnmarshalBinary(b []byte) error { + var res ContactGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/contact_role.go b/netbox/models/contact_role.go new file mode 100644 index 000000000..929ce545e --- /dev/null +++ b/netbox/models/contact_role.go @@ -0,0 +1,350 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ContactRole contact role +// +// swagger:model ContactRole +type ContactRole struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this contact role +func (m *ContactRole) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactRole) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ContactRole) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this contact role based on the context it is used +func (m *ContactRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ContactRole) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ContactRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ContactRole) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ContactRole) UnmarshalBinary(b []byte) error { + var res ContactRole + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/custom_field.go b/netbox/models/custom_field.go index b96addc83..f55eb2dda 100644 --- a/netbox/models/custom_field.go +++ b/netbox/models/custom_field.go @@ -44,6 +44,15 @@ type CustomField struct { // Unique: true ContentTypes []string `json:"content_types"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Data type + // Read Only: true + DataType string `json:"data_type,omitempty"` + // Default // // Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo"). @@ -60,7 +69,7 @@ type CustomField struct { // filter logic FilterLogic *CustomFieldFilterLogic `json:"filter_logic,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -70,14 +79,23 @@ type CustomField struct { // Max Length: 50 Label string `json:"label,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Name // // Internal field name // Required: true // Max Length: 50 // Min Length: 1 + // Pattern: ^[a-z0-9_]+$ Name *string `json:"name"` + // Object type + ObjectType string `json:"object_type,omitempty"` + // Required // // If true, this field is required when creating new objects or editing an existing object. @@ -96,14 +114,14 @@ type CustomField struct { // // Maximum allowed value (for numeric fields) // Maximum: 2.147483647e+09 - // Minimum: 0 + // Minimum: -2.147483648e+09 ValidationMaximum *int64 `json:"validation_maximum,omitempty"` // Minimum value // // Minimum allowed value (for numeric fields) // Maximum: 2.147483647e+09 - // Minimum: 0 + // Minimum: -2.147483648e+09 ValidationMinimum *int64 `json:"validation_minimum,omitempty"` // Validation regex @@ -132,6 +150,10 @@ func (m *CustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDescription(formats); err != nil { res = append(res, err) } @@ -144,6 +166,10 @@ func (m *CustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -211,6 +237,18 @@ func (m *CustomField) validateContentTypes(formats strfmt.Registry) error { return nil } +func (m *CustomField) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *CustomField) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil @@ -232,6 +270,8 @@ func (m *CustomField) validateFilterLogic(formats strfmt.Registry) error { if err := m.FilterLogic.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("filter_logic") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("filter_logic") } return err } @@ -252,6 +292,18 @@ func (m *CustomField) validateLabel(formats strfmt.Registry) error { return nil } +func (m *CustomField) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *CustomField) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -266,6 +318,10 @@ func (m *CustomField) validateName(formats strfmt.Registry) error { return err } + if err := validate.Pattern("name", "body", *m.Name, `^[a-z0-9_]+$`); err != nil { + return err + } + return nil } @@ -279,6 +335,8 @@ func (m *CustomField) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -304,7 +362,7 @@ func (m *CustomField) validateValidationMaximum(formats strfmt.Registry) error { return nil } - if err := validate.MinimumInt("validation_maximum", "body", *m.ValidationMaximum, 0, false); err != nil { + if err := validate.MinimumInt("validation_maximum", "body", *m.ValidationMaximum, -2.147483648e+09, false); err != nil { return err } @@ -320,7 +378,7 @@ func (m *CustomField) validateValidationMinimum(formats strfmt.Registry) error { return nil } - if err := validate.MinimumInt("validation_minimum", "body", *m.ValidationMinimum, 0, false); err != nil { + if err := validate.MinimumInt("validation_minimum", "body", *m.ValidationMinimum, -2.147483648e+09, false); err != nil { return err } @@ -363,6 +421,14 @@ func (m *CustomField) validateWeight(formats strfmt.Registry) error { func (m *CustomField) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDataType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -375,6 +441,10 @@ func (m *CustomField) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateType(ctx, formats); err != nil { res = append(res, err) } @@ -389,6 +459,24 @@ func (m *CustomField) ContextValidate(ctx context.Context, formats strfmt.Regist return nil } +func (m *CustomField) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *CustomField) contextValidateDataType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "data_type", "body", string(m.DataType)); err != nil { + return err + } + + return nil +} + func (m *CustomField) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -404,6 +492,8 @@ func (m *CustomField) contextValidateFilterLogic(ctx context.Context, formats st if err := m.FilterLogic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("filter_logic") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("filter_logic") } return err } @@ -421,12 +511,23 @@ func (m *CustomField) contextValidateID(ctx context.Context, formats strfmt.Regi return nil } +func (m *CustomField) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *CustomField) contextValidateType(ctx context.Context, formats strfmt.Registry) error { if m.Type != nil { if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -618,12 +719,12 @@ type CustomFieldType struct { // label // Required: true - // Enum: [Text Integer Boolean (true/false) Date URL Selection Multiple selection] + // Enum: [Text Text (long) Integer Boolean (true/false) Date URL JSON Selection Multiple selection Object Multiple objects] Label *string `json:"label"` // value // Required: true - // Enum: [text integer boolean date url select multiselect] + // Enum: [text longtext integer boolean date url json select multiselect object multiobject] Value *string `json:"value"` } @@ -649,7 +750,7 @@ var customFieldTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Text","Integer","Boolean (true/false)","Date","URL","Selection","Multiple selection"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Text","Text (long)","Integer","Boolean (true/false)","Date","URL","JSON","Selection","Multiple selection","Object","Multiple objects"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -662,6 +763,9 @@ const ( // CustomFieldTypeLabelText captures enum value "Text" CustomFieldTypeLabelText string = "Text" + // CustomFieldTypeLabelTextLong captures enum value "Text (long)" + CustomFieldTypeLabelTextLong string = "Text (long)" + // CustomFieldTypeLabelInteger captures enum value "Integer" CustomFieldTypeLabelInteger string = "Integer" @@ -674,11 +778,20 @@ const ( // CustomFieldTypeLabelURL captures enum value "URL" CustomFieldTypeLabelURL string = "URL" + // CustomFieldTypeLabelJSON captures enum value "JSON" + CustomFieldTypeLabelJSON string = "JSON" + // CustomFieldTypeLabelSelection captures enum value "Selection" CustomFieldTypeLabelSelection string = "Selection" // CustomFieldTypeLabelMultipleSelection captures enum value "Multiple selection" CustomFieldTypeLabelMultipleSelection string = "Multiple selection" + + // CustomFieldTypeLabelObject captures enum value "Object" + CustomFieldTypeLabelObject string = "Object" + + // CustomFieldTypeLabelMultipleObjects captures enum value "Multiple objects" + CustomFieldTypeLabelMultipleObjects string = "Multiple objects" ) // prop value enum @@ -707,7 +820,7 @@ var customFieldTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["text","integer","boolean","date","url","select","multiselect"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["text","longtext","integer","boolean","date","url","json","select","multiselect","object","multiobject"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -720,6 +833,9 @@ const ( // CustomFieldTypeValueText captures enum value "text" CustomFieldTypeValueText string = "text" + // CustomFieldTypeValueLongtext captures enum value "longtext" + CustomFieldTypeValueLongtext string = "longtext" + // CustomFieldTypeValueInteger captures enum value "integer" CustomFieldTypeValueInteger string = "integer" @@ -732,11 +848,20 @@ const ( // CustomFieldTypeValueURL captures enum value "url" CustomFieldTypeValueURL string = "url" + // CustomFieldTypeValueJSON captures enum value "json" + CustomFieldTypeValueJSON string = "json" + // CustomFieldTypeValueSelect captures enum value "select" CustomFieldTypeValueSelect string = "select" // CustomFieldTypeValueMultiselect captures enum value "multiselect" CustomFieldTypeValueMultiselect string = "multiselect" + + // CustomFieldTypeValueObject captures enum value "object" + CustomFieldTypeValueObject string = "object" + + // CustomFieldTypeValueMultiobject captures enum value "multiobject" + CustomFieldTypeValueMultiobject string = "multiobject" ) // prop value enum diff --git a/netbox/models/custom_link.go b/netbox/models/custom_link.go index 9a80b29a8..f6bcc3ee7 100644 --- a/netbox/models/custom_link.go +++ b/netbox/models/custom_link.go @@ -38,27 +38,40 @@ type CustomLink struct { // Button class // // The class of the first link in a group will be used for the dropdown button - // Enum: [outline-dark ghost-dark blue indigo purple pink red orange yellow green teal cyan secondary] + // Enum: [outline-dark blue indigo purple pink red orange yellow green teal cyan gray black white ghost-dark] ButtonClass string `json:"button_class,omitempty"` // Content type // Required: true ContentType *string `json:"content_type"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Display // Read Only: true Display string `json:"display,omitempty"` + // Enabled + Enabled bool `json:"enabled,omitempty"` + // Group name // // Links with the same group will appear as a dropdown menu // Max Length: 50 GroupName string `json:"group_name,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link text // // Jinja2 template code for link text @@ -109,10 +122,18 @@ func (m *CustomLink) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateGroupName(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateLinkText(formats); err != nil { res = append(res, err) } @@ -143,7 +164,7 @@ var customLinkTypeButtonClassPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["outline-dark","ghost-dark","blue","indigo","purple","pink","red","orange","yellow","green","teal","cyan","secondary"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["outline-dark","blue","indigo","purple","pink","red","orange","yellow","green","teal","cyan","gray","black","white","ghost-dark"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -156,9 +177,6 @@ const ( // CustomLinkButtonClassOutlineDashDark captures enum value "outline-dark" CustomLinkButtonClassOutlineDashDark string = "outline-dark" - // CustomLinkButtonClassGhostDashDark captures enum value "ghost-dark" - CustomLinkButtonClassGhostDashDark string = "ghost-dark" - // CustomLinkButtonClassBlue captures enum value "blue" CustomLinkButtonClassBlue string = "blue" @@ -189,8 +207,17 @@ const ( // CustomLinkButtonClassCyan captures enum value "cyan" CustomLinkButtonClassCyan string = "cyan" - // CustomLinkButtonClassSecondary captures enum value "secondary" - CustomLinkButtonClassSecondary string = "secondary" + // CustomLinkButtonClassGray captures enum value "gray" + CustomLinkButtonClassGray string = "gray" + + // CustomLinkButtonClassBlack captures enum value "black" + CustomLinkButtonClassBlack string = "black" + + // CustomLinkButtonClassWhite captures enum value "white" + CustomLinkButtonClassWhite string = "white" + + // CustomLinkButtonClassGhostDashDark captures enum value "ghost-dark" + CustomLinkButtonClassGhostDashDark string = "ghost-dark" ) // prop value enum @@ -223,6 +250,18 @@ func (m *CustomLink) validateContentType(formats strfmt.Registry) error { return nil } +func (m *CustomLink) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *CustomLink) validateGroupName(formats strfmt.Registry) error { if swag.IsZero(m.GroupName) { // not required return nil @@ -235,6 +274,18 @@ func (m *CustomLink) validateGroupName(formats strfmt.Registry) error { return nil } +func (m *CustomLink) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *CustomLink) validateLinkText(formats strfmt.Registry) error { if err := validate.Required("link_text", "body", m.LinkText); err != nil { @@ -318,6 +369,10 @@ func (m *CustomLink) validateWeight(formats strfmt.Registry) error { func (m *CustomLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -326,6 +381,10 @@ func (m *CustomLink) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -336,6 +395,15 @@ func (m *CustomLink) ContextValidate(ctx context.Context, formats strfmt.Registr return nil } +func (m *CustomLink) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *CustomLink) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -354,6 +422,15 @@ func (m *CustomLink) contextValidateID(ctx context.Context, formats strfmt.Regis return nil } +func (m *CustomLink) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *CustomLink) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/device.go b/netbox/models/device.go index d7b094e77..2fa6089c8 100644 --- a/netbox/models/device.go +++ b/netbox/models/device.go @@ -36,6 +36,9 @@ import ( // swagger:model Device type Device struct { + // airflow + Airflow *DeviceAirflow `json:"airflow,omitempty"` + // Asset tag // // A unique tag used to identify this device @@ -50,8 +53,8 @@ type Device struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -71,7 +74,7 @@ type Device struct { // face Face *DeviceFace `json:"face,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -87,8 +90,9 @@ type Device struct { Location *NestedLocation `json:"location,omitempty"` // Name + // Required: true // Max Length: 64 - Name *string `json:"name,omitempty"` + Name *string `json:"name"` // parent device ParentDevice *NestedDevice `json:"parent_device,omitempty"` @@ -97,9 +101,6 @@ type Device struct { Platform *NestedPlatform `json:"platform,omitempty"` // Position (U) - // - // The lowest-numbered unit occupied by the device - // Maximum: 32767 // Minimum: 1 Position *int64 `json:"position,omitempty"` @@ -155,6 +156,10 @@ type Device struct { func (m *Device) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAirflow(formats); err != nil { + res = append(res, err) + } + if err := m.validateAssetTag(formats); err != nil { res = append(res, err) } @@ -261,6 +266,25 @@ func (m *Device) Validate(formats strfmt.Registry) error { return nil } +func (m *Device) validateAirflow(formats strfmt.Registry) error { + if swag.IsZero(m.Airflow) { // not required + return nil + } + + if m.Airflow != nil { + if err := m.Airflow.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("airflow") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("airflow") + } + return err + } + } + + return nil +} + func (m *Device) validateAssetTag(formats strfmt.Registry) error { if swag.IsZero(m.AssetTag) { // not required return nil @@ -282,6 +306,8 @@ func (m *Device) validateCluster(formats strfmt.Registry) error { if err := m.Cluster.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster") } return err } @@ -295,7 +321,7 @@ func (m *Device) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -312,6 +338,8 @@ func (m *Device) validateDeviceRole(formats strfmt.Registry) error { if err := m.DeviceRole.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_role") } return err } @@ -330,6 +358,8 @@ func (m *Device) validateDeviceType(formats strfmt.Registry) error { if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -347,6 +377,8 @@ func (m *Device) validateFace(formats strfmt.Registry) error { if err := m.Face.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("face") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("face") } return err } @@ -376,6 +408,8 @@ func (m *Device) validateLocation(formats strfmt.Registry) error { if err := m.Location.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -385,8 +419,9 @@ func (m *Device) validateLocation(formats strfmt.Registry) error { } func (m *Device) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil + + if err := validate.Required("name", "body", m.Name); err != nil { + return err } if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { @@ -405,6 +440,8 @@ func (m *Device) validateParentDevice(formats strfmt.Registry) error { if err := m.ParentDevice.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent_device") } return err } @@ -422,6 +459,8 @@ func (m *Device) validatePlatform(formats strfmt.Registry) error { if err := m.Platform.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platform") } return err } @@ -439,10 +478,6 @@ func (m *Device) validatePosition(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("position", "body", *m.Position, 32767, false); err != nil { - return err - } - return nil } @@ -455,6 +490,8 @@ func (m *Device) validatePrimaryIP(formats strfmt.Registry) error { if err := m.PrimaryIP.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip") } return err } @@ -472,6 +509,8 @@ func (m *Device) validatePrimaryIp4(formats strfmt.Registry) error { if err := m.PrimaryIp4.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip4") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip4") } return err } @@ -489,6 +528,8 @@ func (m *Device) validatePrimaryIp6(formats strfmt.Registry) error { if err := m.PrimaryIp6.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip6") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip6") } return err } @@ -506,6 +547,8 @@ func (m *Device) validateRack(formats strfmt.Registry) error { if err := m.Rack.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -536,6 +579,8 @@ func (m *Device) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -553,6 +598,8 @@ func (m *Device) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -575,6 +622,8 @@ func (m *Device) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -594,6 +643,8 @@ func (m *Device) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -655,6 +706,8 @@ func (m *Device) validateVirtualChassis(formats strfmt.Registry) error { if err := m.VirtualChassis.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_chassis") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_chassis") } return err } @@ -667,6 +720,10 @@ func (m *Device) validateVirtualChassis(formats strfmt.Registry) error { func (m *Device) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAirflow(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCluster(ctx, formats); err != nil { res = append(res, err) } @@ -757,12 +814,30 @@ func (m *Device) ContextValidate(ctx context.Context, formats strfmt.Registry) e return nil } +func (m *Device) contextValidateAirflow(ctx context.Context, formats strfmt.Registry) error { + + if m.Airflow != nil { + if err := m.Airflow.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("airflow") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("airflow") + } + return err + } + } + + return nil +} + func (m *Device) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { if m.Cluster != nil { if err := m.Cluster.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster") } return err } @@ -773,7 +848,7 @@ func (m *Device) contextValidateCluster(ctx context.Context, formats strfmt.Regi func (m *Device) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -786,6 +861,8 @@ func (m *Device) contextValidateDeviceRole(ctx context.Context, formats strfmt.R if err := m.DeviceRole.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_role") } return err } @@ -800,6 +877,8 @@ func (m *Device) contextValidateDeviceType(ctx context.Context, formats strfmt.R if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -823,6 +902,8 @@ func (m *Device) contextValidateFace(ctx context.Context, formats strfmt.Registr if err := m.Face.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("face") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("face") } return err } @@ -855,6 +936,8 @@ func (m *Device) contextValidateLocation(ctx context.Context, formats strfmt.Reg if err := m.Location.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -869,6 +952,8 @@ func (m *Device) contextValidateParentDevice(ctx context.Context, formats strfmt if err := m.ParentDevice.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent_device") } return err } @@ -883,6 +968,8 @@ func (m *Device) contextValidatePlatform(ctx context.Context, formats strfmt.Reg if err := m.Platform.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platform") } return err } @@ -897,6 +984,8 @@ func (m *Device) contextValidatePrimaryIP(ctx context.Context, formats strfmt.Re if err := m.PrimaryIP.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip") } return err } @@ -911,6 +1000,8 @@ func (m *Device) contextValidatePrimaryIp4(ctx context.Context, formats strfmt.R if err := m.PrimaryIp4.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip4") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip4") } return err } @@ -925,6 +1016,8 @@ func (m *Device) contextValidatePrimaryIp6(ctx context.Context, formats strfmt.R if err := m.PrimaryIp6.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip6") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip6") } return err } @@ -939,6 +1032,8 @@ func (m *Device) contextValidateRack(ctx context.Context, formats strfmt.Registr if err := m.Rack.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -953,6 +1048,8 @@ func (m *Device) contextValidateSite(ctx context.Context, formats strfmt.Registr if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -967,6 +1064,8 @@ func (m *Device) contextValidateStatus(ctx context.Context, formats strfmt.Regis if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -983,6 +1082,8 @@ func (m *Device) contextValidateTags(ctx context.Context, formats strfmt.Registr if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -999,6 +1100,8 @@ func (m *Device) contextValidateTenant(ctx context.Context, formats strfmt.Regis if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -1022,6 +1125,8 @@ func (m *Device) contextValidateVirtualChassis(ctx context.Context, formats strf if err := m.VirtualChassis.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_chassis") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_chassis") } return err } @@ -1048,6 +1153,173 @@ func (m *Device) UnmarshalBinary(b []byte) error { return nil } +// DeviceAirflow Airflow +// +// swagger:model DeviceAirflow +type DeviceAirflow struct { + + // label + // Required: true + // Enum: [Front to rear Rear to front Left to right Right to left Side to rear Passive] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [front-to-rear rear-to-front left-to-right right-to-left side-to-rear passive] + Value *string `json:"value"` +} + +// Validate validates this device airflow +func (m *DeviceAirflow) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var deviceAirflowTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Front to rear","Rear to front","Left to right","Right to left","Side to rear","Passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deviceAirflowTypeLabelPropEnum = append(deviceAirflowTypeLabelPropEnum, v) + } +} + +const ( + + // DeviceAirflowLabelFrontToRear captures enum value "Front to rear" + DeviceAirflowLabelFrontToRear string = "Front to rear" + + // DeviceAirflowLabelRearToFront captures enum value "Rear to front" + DeviceAirflowLabelRearToFront string = "Rear to front" + + // DeviceAirflowLabelLeftToRight captures enum value "Left to right" + DeviceAirflowLabelLeftToRight string = "Left to right" + + // DeviceAirflowLabelRightToLeft captures enum value "Right to left" + DeviceAirflowLabelRightToLeft string = "Right to left" + + // DeviceAirflowLabelSideToRear captures enum value "Side to rear" + DeviceAirflowLabelSideToRear string = "Side to rear" + + // DeviceAirflowLabelPassive captures enum value "Passive" + DeviceAirflowLabelPassive string = "Passive" +) + +// prop value enum +func (m *DeviceAirflow) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deviceAirflowTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeviceAirflow) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("airflow"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("airflow"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var deviceAirflowTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["front-to-rear","rear-to-front","left-to-right","right-to-left","side-to-rear","passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deviceAirflowTypeValuePropEnum = append(deviceAirflowTypeValuePropEnum, v) + } +} + +const ( + + // DeviceAirflowValueFrontDashToDashRear captures enum value "front-to-rear" + DeviceAirflowValueFrontDashToDashRear string = "front-to-rear" + + // DeviceAirflowValueRearDashToDashFront captures enum value "rear-to-front" + DeviceAirflowValueRearDashToDashFront string = "rear-to-front" + + // DeviceAirflowValueLeftDashToDashRight captures enum value "left-to-right" + DeviceAirflowValueLeftDashToDashRight string = "left-to-right" + + // DeviceAirflowValueRightDashToDashLeft captures enum value "right-to-left" + DeviceAirflowValueRightDashToDashLeft string = "right-to-left" + + // DeviceAirflowValueSideDashToDashRear captures enum value "side-to-rear" + DeviceAirflowValueSideDashToDashRear string = "side-to-rear" + + // DeviceAirflowValuePassive captures enum value "passive" + DeviceAirflowValuePassive string = "passive" +) + +// prop value enum +func (m *DeviceAirflow) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deviceAirflowTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeviceAirflow) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("airflow"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("airflow"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this device airflow based on context it is used +func (m *DeviceAirflow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DeviceAirflow) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeviceAirflow) UnmarshalBinary(b []byte) error { + var res DeviceAirflow + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + // DeviceFace Face // // swagger:model DeviceFace diff --git a/netbox/models/device_bay.go b/netbox/models/device_bay.go index d9a1c1f3c..0244d17fb 100644 --- a/netbox/models/device_bay.go +++ b/netbox/models/device_bay.go @@ -37,8 +37,8 @@ type DeviceBay struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -55,7 +55,7 @@ type DeviceBay struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -139,7 +139,7 @@ func (m *DeviceBay) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -168,6 +168,8 @@ func (m *DeviceBay) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -185,6 +187,8 @@ func (m *DeviceBay) validateInstalledDevice(formats strfmt.Registry) error { if err := m.InstalledDevice.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("installed_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("installed_device") } return err } @@ -248,6 +252,8 @@ func (m *DeviceBay) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -314,7 +320,7 @@ func (m *DeviceBay) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *DeviceBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -327,6 +333,8 @@ func (m *DeviceBay) contextValidateDevice(ctx context.Context, formats strfmt.Re if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -359,6 +367,8 @@ func (m *DeviceBay) contextValidateInstalledDevice(ctx context.Context, formats if err := m.InstalledDevice.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("installed_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("installed_device") } return err } @@ -384,6 +394,8 @@ func (m *DeviceBay) contextValidateTags(ctx context.Context, formats strfmt.Regi if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/device_bay_template.go b/netbox/models/device_bay_template.go index 2dec10d3f..e77ee1bc2 100644 --- a/netbox/models/device_bay_template.go +++ b/netbox/models/device_bay_template.go @@ -36,8 +36,8 @@ type DeviceBayTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -51,7 +51,7 @@ type DeviceBayTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -121,7 +121,7 @@ func (m *DeviceBayTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -150,6 +150,8 @@ func (m *DeviceBayTemplate) validateDeviceType(formats strfmt.Registry) error { if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -247,7 +249,7 @@ func (m *DeviceBayTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *DeviceBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -260,6 +262,8 @@ func (m *DeviceBayTemplate) contextValidateDeviceType(ctx context.Context, forma if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } diff --git a/netbox/models/device_n_a_p_a_l_m.go b/netbox/models/device_n_a_p_a_l_m.go index 49d7d4377..316a10dcc 100644 --- a/netbox/models/device_n_a_p_a_l_m.go +++ b/netbox/models/device_n_a_p_a_l_m.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // DeviceNAPALM device n a p a l m @@ -35,7 +36,7 @@ type DeviceNAPALM struct { // Method // Required: true - Method interface{} `json:"method"` + Method map[string]*string `json:"method"` } // Validate validates this device n a p a l m @@ -54,8 +55,8 @@ func (m *DeviceNAPALM) Validate(formats strfmt.Registry) error { func (m *DeviceNAPALM) validateMethod(formats strfmt.Registry) error { - if m.Method == nil { - return errors.Required("method", "body", nil) + if err := validate.Required("method", "body", m.Method); err != nil { + return err } return nil diff --git a/netbox/models/device_role.go b/netbox/models/device_role.go index 9a852b92b..a56bf5b33 100644 --- a/netbox/models/device_role.go +++ b/netbox/models/device_role.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -42,8 +43,8 @@ type DeviceRole struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +61,7 @@ type DeviceRole struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -82,6 +83,9 @@ type DeviceRole struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -125,6 +129,10 @@ func (m *DeviceRole) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -160,7 +168,7 @@ func (m *DeviceRole) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -229,6 +237,32 @@ func (m *DeviceRole) validateSlug(formats strfmt.Registry) error { return nil } +func (m *DeviceRole) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *DeviceRole) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -265,6 +299,10 @@ func (m *DeviceRole) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -281,7 +319,7 @@ func (m *DeviceRole) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *DeviceRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -324,6 +362,26 @@ func (m *DeviceRole) contextValidateLastUpdated(ctx context.Context, formats str return nil } +func (m *DeviceRole) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *DeviceRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/device_type.go b/netbox/models/device_type.go index eb7a5f70a..d572578bf 100644 --- a/netbox/models/device_type.go +++ b/netbox/models/device_type.go @@ -36,13 +36,16 @@ import ( // swagger:model DeviceType type DeviceType struct { + // airflow + Airflow *DeviceTypeAirflow `json:"airflow,omitempty"` + // Comments Comments string `json:"comments,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +63,7 @@ type DeviceType struct { // Format: uri FrontImage strfmt.URI `json:"front_image,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -123,6 +126,10 @@ type DeviceType struct { func (m *DeviceType) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAirflow(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -177,12 +184,31 @@ func (m *DeviceType) Validate(formats strfmt.Registry) error { return nil } +func (m *DeviceType) validateAirflow(formats strfmt.Registry) error { + if swag.IsZero(m.Airflow) { // not required + return nil + } + + if m.Airflow != nil { + if err := m.Airflow.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("airflow") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("airflow") + } + return err + } + } + + return nil +} + func (m *DeviceType) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -223,6 +249,8 @@ func (m *DeviceType) validateManufacturer(formats strfmt.Registry) error { if err := m.Manufacturer.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } @@ -302,6 +330,8 @@ func (m *DeviceType) validateSubdeviceRole(formats strfmt.Registry) error { if err := m.SubdeviceRole.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subdevice_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("subdevice_role") } return err } @@ -324,6 +354,8 @@ func (m *DeviceType) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -366,6 +398,10 @@ func (m *DeviceType) validateURL(formats strfmt.Registry) error { func (m *DeviceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAirflow(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -416,9 +452,25 @@ func (m *DeviceType) ContextValidate(ctx context.Context, formats strfmt.Registr return nil } +func (m *DeviceType) contextValidateAirflow(ctx context.Context, formats strfmt.Registry) error { + + if m.Airflow != nil { + if err := m.Airflow.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("airflow") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("airflow") + } + return err + } + } + + return nil +} + func (m *DeviceType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -476,6 +528,8 @@ func (m *DeviceType) contextValidateManufacturer(ctx context.Context, formats st if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } @@ -499,6 +553,8 @@ func (m *DeviceType) contextValidateSubdeviceRole(ctx context.Context, formats s if err := m.SubdeviceRole.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("subdevice_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("subdevice_role") } return err } @@ -515,6 +571,8 @@ func (m *DeviceType) contextValidateTags(ctx context.Context, formats strfmt.Reg if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -552,6 +610,173 @@ func (m *DeviceType) UnmarshalBinary(b []byte) error { return nil } +// DeviceTypeAirflow Airflow +// +// swagger:model DeviceTypeAirflow +type DeviceTypeAirflow struct { + + // label + // Required: true + // Enum: [Front to rear Rear to front Left to right Right to left Side to rear Passive] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [front-to-rear rear-to-front left-to-right right-to-left side-to-rear passive] + Value *string `json:"value"` +} + +// Validate validates this device type airflow +func (m *DeviceTypeAirflow) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var deviceTypeAirflowTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Front to rear","Rear to front","Left to right","Right to left","Side to rear","Passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deviceTypeAirflowTypeLabelPropEnum = append(deviceTypeAirflowTypeLabelPropEnum, v) + } +} + +const ( + + // DeviceTypeAirflowLabelFrontToRear captures enum value "Front to rear" + DeviceTypeAirflowLabelFrontToRear string = "Front to rear" + + // DeviceTypeAirflowLabelRearToFront captures enum value "Rear to front" + DeviceTypeAirflowLabelRearToFront string = "Rear to front" + + // DeviceTypeAirflowLabelLeftToRight captures enum value "Left to right" + DeviceTypeAirflowLabelLeftToRight string = "Left to right" + + // DeviceTypeAirflowLabelRightToLeft captures enum value "Right to left" + DeviceTypeAirflowLabelRightToLeft string = "Right to left" + + // DeviceTypeAirflowLabelSideToRear captures enum value "Side to rear" + DeviceTypeAirflowLabelSideToRear string = "Side to rear" + + // DeviceTypeAirflowLabelPassive captures enum value "Passive" + DeviceTypeAirflowLabelPassive string = "Passive" +) + +// prop value enum +func (m *DeviceTypeAirflow) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deviceTypeAirflowTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeviceTypeAirflow) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("airflow"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("airflow"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var deviceTypeAirflowTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["front-to-rear","rear-to-front","left-to-right","right-to-left","side-to-rear","passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deviceTypeAirflowTypeValuePropEnum = append(deviceTypeAirflowTypeValuePropEnum, v) + } +} + +const ( + + // DeviceTypeAirflowValueFrontDashToDashRear captures enum value "front-to-rear" + DeviceTypeAirflowValueFrontDashToDashRear string = "front-to-rear" + + // DeviceTypeAirflowValueRearDashToDashFront captures enum value "rear-to-front" + DeviceTypeAirflowValueRearDashToDashFront string = "rear-to-front" + + // DeviceTypeAirflowValueLeftDashToDashRight captures enum value "left-to-right" + DeviceTypeAirflowValueLeftDashToDashRight string = "left-to-right" + + // DeviceTypeAirflowValueRightDashToDashLeft captures enum value "right-to-left" + DeviceTypeAirflowValueRightDashToDashLeft string = "right-to-left" + + // DeviceTypeAirflowValueSideDashToDashRear captures enum value "side-to-rear" + DeviceTypeAirflowValueSideDashToDashRear string = "side-to-rear" + + // DeviceTypeAirflowValuePassive captures enum value "passive" + DeviceTypeAirflowValuePassive string = "passive" +) + +// prop value enum +func (m *DeviceTypeAirflow) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deviceTypeAirflowTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeviceTypeAirflow) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("airflow"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("airflow"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this device type airflow based on context it is used +func (m *DeviceTypeAirflow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DeviceTypeAirflow) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeviceTypeAirflow) UnmarshalBinary(b []byte) error { + var res DeviceTypeAirflow + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + // DeviceTypeSubdeviceRole Subdevice role // // swagger:model DeviceTypeSubdeviceRole diff --git a/netbox/models/device_with_config_context.go b/netbox/models/device_with_config_context.go index 57784413f..875263fc8 100644 --- a/netbox/models/device_with_config_context.go +++ b/netbox/models/device_with_config_context.go @@ -36,6 +36,9 @@ import ( // swagger:model DeviceWithConfigContext type DeviceWithConfigContext struct { + // airflow + Airflow *DeviceWithConfigContextAirflow `json:"airflow,omitempty"` + // Asset tag // // A unique tag used to identify this device @@ -50,12 +53,12 @@ type DeviceWithConfigContext struct { // Config context // Read Only: true - ConfigContext interface{} `json:"config_context,omitempty"` + ConfigContext map[string]*string `json:"config_context,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -75,7 +78,7 @@ type DeviceWithConfigContext struct { // face Face *DeviceWithConfigContextFace `json:"face,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -91,8 +94,9 @@ type DeviceWithConfigContext struct { Location *NestedLocation `json:"location,omitempty"` // Name + // Required: true // Max Length: 64 - Name *string `json:"name,omitempty"` + Name *string `json:"name"` // parent device ParentDevice *NestedDevice `json:"parent_device,omitempty"` @@ -101,9 +105,6 @@ type DeviceWithConfigContext struct { Platform *NestedPlatform `json:"platform,omitempty"` // Position (U) - // - // The lowest-numbered unit occupied by the device - // Maximum: 32767 // Minimum: 1 Position *int64 `json:"position,omitempty"` @@ -159,6 +160,10 @@ type DeviceWithConfigContext struct { func (m *DeviceWithConfigContext) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAirflow(formats); err != nil { + res = append(res, err) + } + if err := m.validateAssetTag(formats); err != nil { res = append(res, err) } @@ -265,6 +270,25 @@ func (m *DeviceWithConfigContext) Validate(formats strfmt.Registry) error { return nil } +func (m *DeviceWithConfigContext) validateAirflow(formats strfmt.Registry) error { + if swag.IsZero(m.Airflow) { // not required + return nil + } + + if m.Airflow != nil { + if err := m.Airflow.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("airflow") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("airflow") + } + return err + } + } + + return nil +} + func (m *DeviceWithConfigContext) validateAssetTag(formats strfmt.Registry) error { if swag.IsZero(m.AssetTag) { // not required return nil @@ -286,6 +310,8 @@ func (m *DeviceWithConfigContext) validateCluster(formats strfmt.Registry) error if err := m.Cluster.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster") } return err } @@ -299,7 +325,7 @@ func (m *DeviceWithConfigContext) validateCreated(formats strfmt.Registry) error return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -316,6 +342,8 @@ func (m *DeviceWithConfigContext) validateDeviceRole(formats strfmt.Registry) er if err := m.DeviceRole.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_role") } return err } @@ -334,6 +362,8 @@ func (m *DeviceWithConfigContext) validateDeviceType(formats strfmt.Registry) er if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -351,6 +381,8 @@ func (m *DeviceWithConfigContext) validateFace(formats strfmt.Registry) error { if err := m.Face.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("face") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("face") } return err } @@ -380,6 +412,8 @@ func (m *DeviceWithConfigContext) validateLocation(formats strfmt.Registry) erro if err := m.Location.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -389,8 +423,9 @@ func (m *DeviceWithConfigContext) validateLocation(formats strfmt.Registry) erro } func (m *DeviceWithConfigContext) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil + + if err := validate.Required("name", "body", m.Name); err != nil { + return err } if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { @@ -409,6 +444,8 @@ func (m *DeviceWithConfigContext) validateParentDevice(formats strfmt.Registry) if err := m.ParentDevice.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent_device") } return err } @@ -426,6 +463,8 @@ func (m *DeviceWithConfigContext) validatePlatform(formats strfmt.Registry) erro if err := m.Platform.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platform") } return err } @@ -443,10 +482,6 @@ func (m *DeviceWithConfigContext) validatePosition(formats strfmt.Registry) erro return err } - if err := validate.MaximumInt("position", "body", *m.Position, 32767, false); err != nil { - return err - } - return nil } @@ -459,6 +494,8 @@ func (m *DeviceWithConfigContext) validatePrimaryIP(formats strfmt.Registry) err if err := m.PrimaryIP.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip") } return err } @@ -476,6 +513,8 @@ func (m *DeviceWithConfigContext) validatePrimaryIp4(formats strfmt.Registry) er if err := m.PrimaryIp4.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip4") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip4") } return err } @@ -493,6 +532,8 @@ func (m *DeviceWithConfigContext) validatePrimaryIp6(formats strfmt.Registry) er if err := m.PrimaryIp6.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip6") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip6") } return err } @@ -510,6 +551,8 @@ func (m *DeviceWithConfigContext) validateRack(formats strfmt.Registry) error { if err := m.Rack.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -540,6 +583,8 @@ func (m *DeviceWithConfigContext) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -557,6 +602,8 @@ func (m *DeviceWithConfigContext) validateStatus(formats strfmt.Registry) error if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -579,6 +626,8 @@ func (m *DeviceWithConfigContext) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -598,6 +647,8 @@ func (m *DeviceWithConfigContext) validateTenant(formats strfmt.Registry) error if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -659,6 +710,8 @@ func (m *DeviceWithConfigContext) validateVirtualChassis(formats strfmt.Registry if err := m.VirtualChassis.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_chassis") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_chassis") } return err } @@ -671,10 +724,18 @@ func (m *DeviceWithConfigContext) validateVirtualChassis(formats strfmt.Registry func (m *DeviceWithConfigContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAirflow(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCluster(ctx, formats); err != nil { res = append(res, err) } + if err := m.contextValidateConfigContext(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -761,12 +822,30 @@ func (m *DeviceWithConfigContext) ContextValidate(ctx context.Context, formats s return nil } +func (m *DeviceWithConfigContext) contextValidateAirflow(ctx context.Context, formats strfmt.Registry) error { + + if m.Airflow != nil { + if err := m.Airflow.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("airflow") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("airflow") + } + return err + } + } + + return nil +} + func (m *DeviceWithConfigContext) contextValidateCluster(ctx context.Context, formats strfmt.Registry) error { if m.Cluster != nil { if err := m.Cluster.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster") } return err } @@ -775,9 +854,14 @@ func (m *DeviceWithConfigContext) contextValidateCluster(ctx context.Context, fo return nil } +func (m *DeviceWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *DeviceWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -790,6 +874,8 @@ func (m *DeviceWithConfigContext) contextValidateDeviceRole(ctx context.Context, if err := m.DeviceRole.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_role") } return err } @@ -804,6 +890,8 @@ func (m *DeviceWithConfigContext) contextValidateDeviceType(ctx context.Context, if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -827,6 +915,8 @@ func (m *DeviceWithConfigContext) contextValidateFace(ctx context.Context, forma if err := m.Face.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("face") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("face") } return err } @@ -859,6 +949,8 @@ func (m *DeviceWithConfigContext) contextValidateLocation(ctx context.Context, f if err := m.Location.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -873,6 +965,8 @@ func (m *DeviceWithConfigContext) contextValidateParentDevice(ctx context.Contex if err := m.ParentDevice.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent_device") } return err } @@ -887,6 +981,8 @@ func (m *DeviceWithConfigContext) contextValidatePlatform(ctx context.Context, f if err := m.Platform.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platform") } return err } @@ -901,6 +997,8 @@ func (m *DeviceWithConfigContext) contextValidatePrimaryIP(ctx context.Context, if err := m.PrimaryIP.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip") } return err } @@ -915,6 +1013,8 @@ func (m *DeviceWithConfigContext) contextValidatePrimaryIp4(ctx context.Context, if err := m.PrimaryIp4.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip4") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip4") } return err } @@ -929,6 +1029,8 @@ func (m *DeviceWithConfigContext) contextValidatePrimaryIp6(ctx context.Context, if err := m.PrimaryIp6.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip6") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip6") } return err } @@ -943,6 +1045,8 @@ func (m *DeviceWithConfigContext) contextValidateRack(ctx context.Context, forma if err := m.Rack.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -957,6 +1061,8 @@ func (m *DeviceWithConfigContext) contextValidateSite(ctx context.Context, forma if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -971,6 +1077,8 @@ func (m *DeviceWithConfigContext) contextValidateStatus(ctx context.Context, for if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -987,6 +1095,8 @@ func (m *DeviceWithConfigContext) contextValidateTags(ctx context.Context, forma if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -1003,6 +1113,8 @@ func (m *DeviceWithConfigContext) contextValidateTenant(ctx context.Context, for if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -1026,6 +1138,8 @@ func (m *DeviceWithConfigContext) contextValidateVirtualChassis(ctx context.Cont if err := m.VirtualChassis.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_chassis") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_chassis") } return err } @@ -1052,6 +1166,173 @@ func (m *DeviceWithConfigContext) UnmarshalBinary(b []byte) error { return nil } +// DeviceWithConfigContextAirflow Airflow +// +// swagger:model DeviceWithConfigContextAirflow +type DeviceWithConfigContextAirflow struct { + + // label + // Required: true + // Enum: [Front to rear Rear to front Left to right Right to left Side to rear Passive] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [front-to-rear rear-to-front left-to-right right-to-left side-to-rear passive] + Value *string `json:"value"` +} + +// Validate validates this device with config context airflow +func (m *DeviceWithConfigContextAirflow) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var deviceWithConfigContextAirflowTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Front to rear","Rear to front","Left to right","Right to left","Side to rear","Passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deviceWithConfigContextAirflowTypeLabelPropEnum = append(deviceWithConfigContextAirflowTypeLabelPropEnum, v) + } +} + +const ( + + // DeviceWithConfigContextAirflowLabelFrontToRear captures enum value "Front to rear" + DeviceWithConfigContextAirflowLabelFrontToRear string = "Front to rear" + + // DeviceWithConfigContextAirflowLabelRearToFront captures enum value "Rear to front" + DeviceWithConfigContextAirflowLabelRearToFront string = "Rear to front" + + // DeviceWithConfigContextAirflowLabelLeftToRight captures enum value "Left to right" + DeviceWithConfigContextAirflowLabelLeftToRight string = "Left to right" + + // DeviceWithConfigContextAirflowLabelRightToLeft captures enum value "Right to left" + DeviceWithConfigContextAirflowLabelRightToLeft string = "Right to left" + + // DeviceWithConfigContextAirflowLabelSideToRear captures enum value "Side to rear" + DeviceWithConfigContextAirflowLabelSideToRear string = "Side to rear" + + // DeviceWithConfigContextAirflowLabelPassive captures enum value "Passive" + DeviceWithConfigContextAirflowLabelPassive string = "Passive" +) + +// prop value enum +func (m *DeviceWithConfigContextAirflow) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deviceWithConfigContextAirflowTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeviceWithConfigContextAirflow) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("airflow"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("airflow"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var deviceWithConfigContextAirflowTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["front-to-rear","rear-to-front","left-to-right","right-to-left","side-to-rear","passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + deviceWithConfigContextAirflowTypeValuePropEnum = append(deviceWithConfigContextAirflowTypeValuePropEnum, v) + } +} + +const ( + + // DeviceWithConfigContextAirflowValueFrontDashToDashRear captures enum value "front-to-rear" + DeviceWithConfigContextAirflowValueFrontDashToDashRear string = "front-to-rear" + + // DeviceWithConfigContextAirflowValueRearDashToDashFront captures enum value "rear-to-front" + DeviceWithConfigContextAirflowValueRearDashToDashFront string = "rear-to-front" + + // DeviceWithConfigContextAirflowValueLeftDashToDashRight captures enum value "left-to-right" + DeviceWithConfigContextAirflowValueLeftDashToDashRight string = "left-to-right" + + // DeviceWithConfigContextAirflowValueRightDashToDashLeft captures enum value "right-to-left" + DeviceWithConfigContextAirflowValueRightDashToDashLeft string = "right-to-left" + + // DeviceWithConfigContextAirflowValueSideDashToDashRear captures enum value "side-to-rear" + DeviceWithConfigContextAirflowValueSideDashToDashRear string = "side-to-rear" + + // DeviceWithConfigContextAirflowValuePassive captures enum value "passive" + DeviceWithConfigContextAirflowValuePassive string = "passive" +) + +// prop value enum +func (m *DeviceWithConfigContextAirflow) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, deviceWithConfigContextAirflowTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DeviceWithConfigContextAirflow) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("airflow"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("airflow"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this device with config context airflow based on context it is used +func (m *DeviceWithConfigContextAirflow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DeviceWithConfigContextAirflow) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeviceWithConfigContextAirflow) UnmarshalBinary(b []byte) error { + var res DeviceWithConfigContextAirflow + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + // DeviceWithConfigContextFace Face // // swagger:model DeviceWithConfigContextFace diff --git a/netbox/models/export_template.go b/netbox/models/export_template.go index 303567e5f..cf921d015 100644 --- a/netbox/models/export_template.go +++ b/netbox/models/export_template.go @@ -43,6 +43,11 @@ type ExportTemplate struct { // Required: true ContentType *string `json:"content_type"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Description // Max Length: 200 Description string `json:"description,omitempty"` @@ -57,10 +62,15 @@ type ExportTemplate struct { // Max Length: 15 FileExtension string `json:"file_extension,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // MIME type // // Defaults to text/plain @@ -94,6 +104,10 @@ func (m *ExportTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDescription(formats); err != nil { res = append(res, err) } @@ -102,6 +116,10 @@ func (m *ExportTemplate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateMimeType(formats); err != nil { res = append(res, err) } @@ -133,6 +151,18 @@ func (m *ExportTemplate) validateContentType(formats strfmt.Registry) error { return nil } +func (m *ExportTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *ExportTemplate) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil @@ -157,6 +187,18 @@ func (m *ExportTemplate) validateFileExtension(formats strfmt.Registry) error { return nil } +func (m *ExportTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *ExportTemplate) validateMimeType(formats strfmt.Registry) error { if swag.IsZero(m.MimeType) { // not required return nil @@ -215,6 +257,10 @@ func (m *ExportTemplate) validateURL(formats strfmt.Registry) error { func (m *ExportTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -223,6 +269,10 @@ func (m *ExportTemplate) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -233,6 +283,15 @@ func (m *ExportTemplate) ContextValidate(ctx context.Context, formats strfmt.Reg return nil } +func (m *ExportTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *ExportTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -251,6 +310,15 @@ func (m *ExportTemplate) contextValidateID(ctx context.Context, formats strfmt.R return nil } +func (m *ExportTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *ExportTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/f_h_r_p_group.go b/netbox/models/f_h_r_p_group.go new file mode 100644 index 000000000..5be20021d --- /dev/null +++ b/netbox/models/f_h_r_p_group.go @@ -0,0 +1,518 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FHRPGroup f h r p group +// +// swagger:model FHRPGroup +type FHRPGroup struct { + + // Authentication key + // Max Length: 255 + AuthKey string `json:"auth_key,omitempty"` + + // Authentication type + // Enum: [plaintext md5] + AuthType string `json:"auth_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Group ID + // Required: true + // Maximum: 32767 + // Minimum: 0 + GroupID *int64 `json:"group_id"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // ip addresses + // Read Only: true + IPAddresses []*NestedIPAddress `json:"ip_addresses"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Protocol + // Required: true + // Enum: [vrrp2 vrrp3 carp clusterxl hsrp glbp other] + Protocol *string `json:"protocol"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this f h r p group +func (m *FHRPGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroupID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIPAddresses(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProtocol(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FHRPGroup) validateAuthKey(formats strfmt.Registry) error { + if swag.IsZero(m.AuthKey) { // not required + return nil + } + + if err := validate.MaxLength("auth_key", "body", m.AuthKey, 255); err != nil { + return err + } + + return nil +} + +var fHRPGroupTypeAuthTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["plaintext","md5"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + fHRPGroupTypeAuthTypePropEnum = append(fHRPGroupTypeAuthTypePropEnum, v) + } +} + +const ( + + // FHRPGroupAuthTypePlaintext captures enum value "plaintext" + FHRPGroupAuthTypePlaintext string = "plaintext" + + // FHRPGroupAuthTypeMd5 captures enum value "md5" + FHRPGroupAuthTypeMd5 string = "md5" +) + +// prop value enum +func (m *FHRPGroup) validateAuthTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, fHRPGroupTypeAuthTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *FHRPGroup) validateAuthType(formats strfmt.Registry) error { + if swag.IsZero(m.AuthType) { // not required + return nil + } + + // value enum + if err := m.validateAuthTypeEnum("auth_type", "body", m.AuthType); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) validateGroupID(formats strfmt.Registry) error { + + if err := validate.Required("group_id", "body", m.GroupID); err != nil { + return err + } + + if err := validate.MinimumInt("group_id", "body", *m.GroupID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("group_id", "body", *m.GroupID, 32767, false); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) validateIPAddresses(formats strfmt.Registry) error { + if swag.IsZero(m.IPAddresses) { // not required + return nil + } + + for i := 0; i < len(m.IPAddresses); i++ { + if swag.IsZero(m.IPAddresses[i]) { // not required + continue + } + + if m.IPAddresses[i] != nil { + if err := m.IPAddresses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ip_addresses" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ip_addresses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FHRPGroup) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +var fHRPGroupTypeProtocolPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["vrrp2","vrrp3","carp","clusterxl","hsrp","glbp","other"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + fHRPGroupTypeProtocolPropEnum = append(fHRPGroupTypeProtocolPropEnum, v) + } +} + +const ( + + // FHRPGroupProtocolVrrp2 captures enum value "vrrp2" + FHRPGroupProtocolVrrp2 string = "vrrp2" + + // FHRPGroupProtocolVrrp3 captures enum value "vrrp3" + FHRPGroupProtocolVrrp3 string = "vrrp3" + + // FHRPGroupProtocolCarp captures enum value "carp" + FHRPGroupProtocolCarp string = "carp" + + // FHRPGroupProtocolClusterxl captures enum value "clusterxl" + FHRPGroupProtocolClusterxl string = "clusterxl" + + // FHRPGroupProtocolHsrp captures enum value "hsrp" + FHRPGroupProtocolHsrp string = "hsrp" + + // FHRPGroupProtocolGlbp captures enum value "glbp" + FHRPGroupProtocolGlbp string = "glbp" + + // FHRPGroupProtocolOther captures enum value "other" + FHRPGroupProtocolOther string = "other" +) + +// prop value enum +func (m *FHRPGroup) validateProtocolEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, fHRPGroupTypeProtocolPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *FHRPGroup) validateProtocol(formats strfmt.Registry) error { + + if err := validate.Required("protocol", "body", m.Protocol); err != nil { + return err + } + + // value enum + if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FHRPGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this f h r p group based on the context it is used +func (m *FHRPGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateIPAddresses(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FHRPGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) contextValidateIPAddresses(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "ip_addresses", "body", []*NestedIPAddress(m.IPAddresses)); err != nil { + return err + } + + for i := 0; i < len(m.IPAddresses); i++ { + + if m.IPAddresses[i] != nil { + if err := m.IPAddresses[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ip_addresses" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ip_addresses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FHRPGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FHRPGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FHRPGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FHRPGroup) UnmarshalBinary(b []byte) error { + var res FHRPGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/f_h_r_p_group_assignment.go b/netbox/models/f_h_r_p_group_assignment.go new file mode 100644 index 000000000..a2e1991b0 --- /dev/null +++ b/netbox/models/f_h_r_p_group_assignment.go @@ -0,0 +1,342 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// FHRPGroupAssignment f h r p group assignment +// +// swagger:model FHRPGroupAssignment +type FHRPGroupAssignment struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // group + // Required: true + Group *NestedFHRPGroup `json:"group"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Interface + // Read Only: true + Interface map[string]*string `json:"interface,omitempty"` + + // Interface id + // Required: true + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + InterfaceID *int64 `json:"interface_id"` + + // Interface type + // Required: true + InterfaceType *string `json:"interface_type"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Priority + // Required: true + // Maximum: 255 + // Minimum: 0 + Priority *int64 `json:"priority"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this f h r p group assignment +func (m *FHRPGroupAssignment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePriority(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FHRPGroupAssignment) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) validateGroup(formats strfmt.Registry) error { + + if err := validate.Required("group", "body", m.Group); err != nil { + return err + } + + if m.Group != nil { + if err := m.Group.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *FHRPGroupAssignment) validateInterfaceID(formats strfmt.Registry) error { + + if err := validate.Required("interface_id", "body", m.InterfaceID); err != nil { + return err + } + + if err := validate.MinimumInt("interface_id", "body", *m.InterfaceID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("interface_id", "body", *m.InterfaceID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) validateInterfaceType(formats strfmt.Registry) error { + + if err := validate.Required("interface_type", "body", m.InterfaceType); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) validatePriority(formats strfmt.Registry) error { + + if err := validate.Required("priority", "body", m.Priority); err != nil { + return err + } + + if err := validate.MinimumInt("priority", "body", *m.Priority, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("priority", "body", *m.Priority, 255, false); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this f h r p group assignment based on the context it is used +func (m *FHRPGroupAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInterface(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FHRPGroupAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) contextValidateGroup(ctx context.Context, formats strfmt.Registry) error { + + if m.Group != nil { + if err := m.Group.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *FHRPGroupAssignment) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) contextValidateInterface(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *FHRPGroupAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *FHRPGroupAssignment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FHRPGroupAssignment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FHRPGroupAssignment) UnmarshalBinary(b []byte) error { + var res FHRPGroupAssignment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/front_port.go b/netbox/models/front_port.go index cee864efa..97e49450f 100644 --- a/netbox/models/front_port.go +++ b/netbox/models/front_port.go @@ -43,18 +43,6 @@ type FrontPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -62,8 +50,8 @@ type FrontPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -80,7 +68,7 @@ type FrontPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -95,11 +83,26 @@ type FrontPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -160,6 +163,10 @@ func (m *FrontPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -199,6 +206,8 @@ func (m *FrontPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -228,7 +237,7 @@ func (m *FrontPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -257,6 +266,8 @@ func (m *FrontPort) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -289,6 +300,25 @@ func (m *FrontPort) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *FrontPort) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *FrontPort) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -316,6 +346,8 @@ func (m *FrontPort) validateRearPort(formats strfmt.Registry) error { if err := m.RearPort.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rear_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rear_port") } return err } @@ -354,6 +386,8 @@ func (m *FrontPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -374,6 +408,8 @@ func (m *FrontPort) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -406,10 +442,6 @@ func (m *FrontPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -430,6 +462,18 @@ func (m *FrontPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRearPort(ctx, formats); err != nil { res = append(res, err) } @@ -467,6 +511,8 @@ func (m *FrontPort) contextValidateCable(ctx context.Context, formats strfmt.Reg if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -475,18 +521,9 @@ func (m *FrontPort) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *FrontPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } - - return nil -} - func (m *FrontPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -499,6 +536,8 @@ func (m *FrontPort) contextValidateDevice(ctx context.Context, formats strfmt.Re if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -534,12 +573,44 @@ func (m *FrontPort) contextValidateLastUpdated(ctx context.Context, formats strf return nil } +func (m *FrontPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *FrontPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *FrontPort) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *FrontPort) contextValidateRearPort(ctx context.Context, formats strfmt.Registry) error { if m.RearPort != nil { if err := m.RearPort.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rear_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rear_port") } return err } @@ -556,6 +627,8 @@ func (m *FrontPort) contextValidateTags(ctx context.Context, formats strfmt.Regi if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -572,6 +645,8 @@ func (m *FrontPort) contextValidateType(ctx context.Context, formats strfmt.Regi if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -614,12 +689,12 @@ type FrontPortType struct { // label // Required: true - // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/APC LSH LSH/APC MPO MTRJ SC SC/APC ST CS SN Splice] + // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/PC LC/UPC LC/APC LSH LSH/PC LSH/UPC LSH/APC MPO MTRJ SC SC/PC SC/UPC SC/APC ST CS SN SMA 905 SMA 906 URM-P2 URM-P4 URM-P8 Splice] Label *string `json:"label"` // value // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Value *string `json:"value"` } @@ -645,7 +720,7 @@ var frontPortTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/APC","LSH","LSH/APC","MPO","MTRJ","SC","SC/APC","ST","CS","SN","Splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/PC","LC/UPC","LC/APC","LSH","LSH/PC","LSH/UPC","LSH/APC","MPO","MTRJ","SC","SC/PC","SC/UPC","SC/APC","ST","CS","SN","SMA 905","SMA 906","URM-P2","URM-P4","URM-P8","Splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -715,12 +790,24 @@ const ( // FrontPortTypeLabelLC captures enum value "LC" FrontPortTypeLabelLC string = "LC" + // FrontPortTypeLabelLCPC captures enum value "LC/PC" + FrontPortTypeLabelLCPC string = "LC/PC" + + // FrontPortTypeLabelLCUPC captures enum value "LC/UPC" + FrontPortTypeLabelLCUPC string = "LC/UPC" + // FrontPortTypeLabelLCAPC captures enum value "LC/APC" FrontPortTypeLabelLCAPC string = "LC/APC" // FrontPortTypeLabelLSH captures enum value "LSH" FrontPortTypeLabelLSH string = "LSH" + // FrontPortTypeLabelLSHPC captures enum value "LSH/PC" + FrontPortTypeLabelLSHPC string = "LSH/PC" + + // FrontPortTypeLabelLSHUPC captures enum value "LSH/UPC" + FrontPortTypeLabelLSHUPC string = "LSH/UPC" + // FrontPortTypeLabelLSHAPC captures enum value "LSH/APC" FrontPortTypeLabelLSHAPC string = "LSH/APC" @@ -733,6 +820,12 @@ const ( // FrontPortTypeLabelSC captures enum value "SC" FrontPortTypeLabelSC string = "SC" + // FrontPortTypeLabelSCPC captures enum value "SC/PC" + FrontPortTypeLabelSCPC string = "SC/PC" + + // FrontPortTypeLabelSCUPC captures enum value "SC/UPC" + FrontPortTypeLabelSCUPC string = "SC/UPC" + // FrontPortTypeLabelSCAPC captures enum value "SC/APC" FrontPortTypeLabelSCAPC string = "SC/APC" @@ -745,6 +838,21 @@ const ( // FrontPortTypeLabelSN captures enum value "SN" FrontPortTypeLabelSN string = "SN" + // FrontPortTypeLabelSMA905 captures enum value "SMA 905" + FrontPortTypeLabelSMA905 string = "SMA 905" + + // FrontPortTypeLabelSMA906 captures enum value "SMA 906" + FrontPortTypeLabelSMA906 string = "SMA 906" + + // FrontPortTypeLabelURMDashP2 captures enum value "URM-P2" + FrontPortTypeLabelURMDashP2 string = "URM-P2" + + // FrontPortTypeLabelURMDashP4 captures enum value "URM-P4" + FrontPortTypeLabelURMDashP4 string = "URM-P4" + + // FrontPortTypeLabelURMDashP8 captures enum value "URM-P8" + FrontPortTypeLabelURMDashP8 string = "URM-P8" + // FrontPortTypeLabelSplice captures enum value "Splice" FrontPortTypeLabelSplice string = "Splice" ) @@ -775,7 +883,7 @@ var frontPortTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -845,12 +953,24 @@ const ( // FrontPortTypeValueLc captures enum value "lc" FrontPortTypeValueLc string = "lc" + // FrontPortTypeValueLcDashPc captures enum value "lc-pc" + FrontPortTypeValueLcDashPc string = "lc-pc" + + // FrontPortTypeValueLcDashUpc captures enum value "lc-upc" + FrontPortTypeValueLcDashUpc string = "lc-upc" + // FrontPortTypeValueLcDashApc captures enum value "lc-apc" FrontPortTypeValueLcDashApc string = "lc-apc" // FrontPortTypeValueLsh captures enum value "lsh" FrontPortTypeValueLsh string = "lsh" + // FrontPortTypeValueLshDashPc captures enum value "lsh-pc" + FrontPortTypeValueLshDashPc string = "lsh-pc" + + // FrontPortTypeValueLshDashUpc captures enum value "lsh-upc" + FrontPortTypeValueLshDashUpc string = "lsh-upc" + // FrontPortTypeValueLshDashApc captures enum value "lsh-apc" FrontPortTypeValueLshDashApc string = "lsh-apc" @@ -863,6 +983,12 @@ const ( // FrontPortTypeValueSc captures enum value "sc" FrontPortTypeValueSc string = "sc" + // FrontPortTypeValueScDashPc captures enum value "sc-pc" + FrontPortTypeValueScDashPc string = "sc-pc" + + // FrontPortTypeValueScDashUpc captures enum value "sc-upc" + FrontPortTypeValueScDashUpc string = "sc-upc" + // FrontPortTypeValueScDashApc captures enum value "sc-apc" FrontPortTypeValueScDashApc string = "sc-apc" @@ -875,6 +1001,21 @@ const ( // FrontPortTypeValueSn captures enum value "sn" FrontPortTypeValueSn string = "sn" + // FrontPortTypeValueSmaDash905 captures enum value "sma-905" + FrontPortTypeValueSmaDash905 string = "sma-905" + + // FrontPortTypeValueSmaDash906 captures enum value "sma-906" + FrontPortTypeValueSmaDash906 string = "sma-906" + + // FrontPortTypeValueUrmDashP2 captures enum value "urm-p2" + FrontPortTypeValueUrmDashP2 string = "urm-p2" + + // FrontPortTypeValueUrmDashP4 captures enum value "urm-p4" + FrontPortTypeValueUrmDashP4 string = "urm-p4" + + // FrontPortTypeValueUrmDashP8 captures enum value "urm-p8" + FrontPortTypeValueUrmDashP8 string = "urm-p8" + // FrontPortTypeValueSplice captures enum value "splice" FrontPortTypeValueSplice string = "splice" ) diff --git a/netbox/models/front_port_rear_port.go b/netbox/models/front_port_rear_port.go index 0c223881f..04852d123 100644 --- a/netbox/models/front_port_rear_port.go +++ b/netbox/models/front_port_rear_port.go @@ -38,7 +38,7 @@ type FrontPortRearPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/front_port_template.go b/netbox/models/front_port_template.go index f2692e256..3cd3c594d 100644 --- a/netbox/models/front_port_template.go +++ b/netbox/models/front_port_template.go @@ -42,8 +42,8 @@ type FrontPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -57,7 +57,7 @@ type FrontPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -172,7 +172,7 @@ func (m *FrontPortTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -201,6 +201,8 @@ func (m *FrontPortTemplate) validateDeviceType(formats strfmt.Registry) error { if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -260,6 +262,8 @@ func (m *FrontPortTemplate) validateRearPort(formats strfmt.Registry) error { if err := m.RearPort.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rear_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rear_port") } return err } @@ -294,6 +298,8 @@ func (m *FrontPortTemplate) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -358,7 +364,7 @@ func (m *FrontPortTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *FrontPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -371,6 +377,8 @@ func (m *FrontPortTemplate) contextValidateDeviceType(ctx context.Context, forma if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -412,6 +420,8 @@ func (m *FrontPortTemplate) contextValidateRearPort(ctx context.Context, formats if err := m.RearPort.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rear_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rear_port") } return err } @@ -426,6 +436,8 @@ func (m *FrontPortTemplate) contextValidateType(ctx context.Context, formats str if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -468,12 +480,12 @@ type FrontPortTemplateType struct { // label // Required: true - // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/APC LSH LSH/APC MPO MTRJ SC SC/APC ST CS SN Splice] + // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/PC LC/UPC LC/APC LSH LSH/PC LSH/UPC LSH/APC MPO MTRJ SC SC/PC SC/UPC SC/APC ST CS SN SMA 905 SMA 906 URM-P2 URM-P4 URM-P8 Splice] Label *string `json:"label"` // value // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Value *string `json:"value"` } @@ -499,7 +511,7 @@ var frontPortTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/APC","LSH","LSH/APC","MPO","MTRJ","SC","SC/APC","ST","CS","SN","Splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/PC","LC/UPC","LC/APC","LSH","LSH/PC","LSH/UPC","LSH/APC","MPO","MTRJ","SC","SC/PC","SC/UPC","SC/APC","ST","CS","SN","SMA 905","SMA 906","URM-P2","URM-P4","URM-P8","Splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -569,12 +581,24 @@ const ( // FrontPortTemplateTypeLabelLC captures enum value "LC" FrontPortTemplateTypeLabelLC string = "LC" + // FrontPortTemplateTypeLabelLCPC captures enum value "LC/PC" + FrontPortTemplateTypeLabelLCPC string = "LC/PC" + + // FrontPortTemplateTypeLabelLCUPC captures enum value "LC/UPC" + FrontPortTemplateTypeLabelLCUPC string = "LC/UPC" + // FrontPortTemplateTypeLabelLCAPC captures enum value "LC/APC" FrontPortTemplateTypeLabelLCAPC string = "LC/APC" // FrontPortTemplateTypeLabelLSH captures enum value "LSH" FrontPortTemplateTypeLabelLSH string = "LSH" + // FrontPortTemplateTypeLabelLSHPC captures enum value "LSH/PC" + FrontPortTemplateTypeLabelLSHPC string = "LSH/PC" + + // FrontPortTemplateTypeLabelLSHUPC captures enum value "LSH/UPC" + FrontPortTemplateTypeLabelLSHUPC string = "LSH/UPC" + // FrontPortTemplateTypeLabelLSHAPC captures enum value "LSH/APC" FrontPortTemplateTypeLabelLSHAPC string = "LSH/APC" @@ -587,6 +611,12 @@ const ( // FrontPortTemplateTypeLabelSC captures enum value "SC" FrontPortTemplateTypeLabelSC string = "SC" + // FrontPortTemplateTypeLabelSCPC captures enum value "SC/PC" + FrontPortTemplateTypeLabelSCPC string = "SC/PC" + + // FrontPortTemplateTypeLabelSCUPC captures enum value "SC/UPC" + FrontPortTemplateTypeLabelSCUPC string = "SC/UPC" + // FrontPortTemplateTypeLabelSCAPC captures enum value "SC/APC" FrontPortTemplateTypeLabelSCAPC string = "SC/APC" @@ -599,6 +629,21 @@ const ( // FrontPortTemplateTypeLabelSN captures enum value "SN" FrontPortTemplateTypeLabelSN string = "SN" + // FrontPortTemplateTypeLabelSMA905 captures enum value "SMA 905" + FrontPortTemplateTypeLabelSMA905 string = "SMA 905" + + // FrontPortTemplateTypeLabelSMA906 captures enum value "SMA 906" + FrontPortTemplateTypeLabelSMA906 string = "SMA 906" + + // FrontPortTemplateTypeLabelURMDashP2 captures enum value "URM-P2" + FrontPortTemplateTypeLabelURMDashP2 string = "URM-P2" + + // FrontPortTemplateTypeLabelURMDashP4 captures enum value "URM-P4" + FrontPortTemplateTypeLabelURMDashP4 string = "URM-P4" + + // FrontPortTemplateTypeLabelURMDashP8 captures enum value "URM-P8" + FrontPortTemplateTypeLabelURMDashP8 string = "URM-P8" + // FrontPortTemplateTypeLabelSplice captures enum value "Splice" FrontPortTemplateTypeLabelSplice string = "Splice" ) @@ -629,7 +674,7 @@ var frontPortTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -699,12 +744,24 @@ const ( // FrontPortTemplateTypeValueLc captures enum value "lc" FrontPortTemplateTypeValueLc string = "lc" + // FrontPortTemplateTypeValueLcDashPc captures enum value "lc-pc" + FrontPortTemplateTypeValueLcDashPc string = "lc-pc" + + // FrontPortTemplateTypeValueLcDashUpc captures enum value "lc-upc" + FrontPortTemplateTypeValueLcDashUpc string = "lc-upc" + // FrontPortTemplateTypeValueLcDashApc captures enum value "lc-apc" FrontPortTemplateTypeValueLcDashApc string = "lc-apc" // FrontPortTemplateTypeValueLsh captures enum value "lsh" FrontPortTemplateTypeValueLsh string = "lsh" + // FrontPortTemplateTypeValueLshDashPc captures enum value "lsh-pc" + FrontPortTemplateTypeValueLshDashPc string = "lsh-pc" + + // FrontPortTemplateTypeValueLshDashUpc captures enum value "lsh-upc" + FrontPortTemplateTypeValueLshDashUpc string = "lsh-upc" + // FrontPortTemplateTypeValueLshDashApc captures enum value "lsh-apc" FrontPortTemplateTypeValueLshDashApc string = "lsh-apc" @@ -717,6 +774,12 @@ const ( // FrontPortTemplateTypeValueSc captures enum value "sc" FrontPortTemplateTypeValueSc string = "sc" + // FrontPortTemplateTypeValueScDashPc captures enum value "sc-pc" + FrontPortTemplateTypeValueScDashPc string = "sc-pc" + + // FrontPortTemplateTypeValueScDashUpc captures enum value "sc-upc" + FrontPortTemplateTypeValueScDashUpc string = "sc-upc" + // FrontPortTemplateTypeValueScDashApc captures enum value "sc-apc" FrontPortTemplateTypeValueScDashApc string = "sc-apc" @@ -729,6 +792,21 @@ const ( // FrontPortTemplateTypeValueSn captures enum value "sn" FrontPortTemplateTypeValueSn string = "sn" + // FrontPortTemplateTypeValueSmaDash905 captures enum value "sma-905" + FrontPortTemplateTypeValueSmaDash905 string = "sma-905" + + // FrontPortTemplateTypeValueSmaDash906 captures enum value "sma-906" + FrontPortTemplateTypeValueSmaDash906 string = "sma-906" + + // FrontPortTemplateTypeValueUrmDashP2 captures enum value "urm-p2" + FrontPortTemplateTypeValueUrmDashP2 string = "urm-p2" + + // FrontPortTemplateTypeValueUrmDashP4 captures enum value "urm-p4" + FrontPortTemplateTypeValueUrmDashP4 string = "urm-p4" + + // FrontPortTemplateTypeValueUrmDashP8 captures enum value "urm-p8" + FrontPortTemplateTypeValueUrmDashP8 string = "urm-p8" + // FrontPortTemplateTypeValueSplice captures enum value "splice" FrontPortTemplateTypeValueSplice string = "splice" ) diff --git a/netbox/models/image_attachment.go b/netbox/models/image_attachment.go index fc6f246d4..120a1cb6d 100644 --- a/netbox/models/image_attachment.go +++ b/netbox/models/image_attachment.go @@ -47,7 +47,7 @@ type ImageAttachment struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -68,19 +68,24 @@ type ImageAttachment struct { // Minimum: 0 ImageWidth *int64 `json:"image_width"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Name // Max Length: 50 Name string `json:"name,omitempty"` // Object id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 ObjectID *int64 `json:"object_id"` // Parent // Read Only: true - Parent interface{} `json:"parent,omitempty"` + Parent map[string]*string `json:"parent,omitempty"` // Url // Read Only: true @@ -112,6 +117,10 @@ func (m *ImageAttachment) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -197,6 +206,18 @@ func (m *ImageAttachment) validateImageWidth(formats strfmt.Registry) error { return nil } +func (m *ImageAttachment) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *ImageAttachment) validateName(formats strfmt.Registry) error { if swag.IsZero(m.Name) { // not required return nil @@ -219,7 +240,7 @@ func (m *ImageAttachment) validateObjectID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("object_id", "body", *m.ObjectID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("object_id", "body", *m.ObjectID, 9.223372036854776e+18, false); err != nil { return err } @@ -258,6 +279,14 @@ func (m *ImageAttachment) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParent(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -304,6 +333,20 @@ func (m *ImageAttachment) contextValidateImage(ctx context.Context, formats strf return nil } +func (m *ImageAttachment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ImageAttachment) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *ImageAttachment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/interface.go b/netbox/models/interface.go index fcdc6896c..53c70b382 100644 --- a/netbox/models/interface.go +++ b/netbox/models/interface.go @@ -40,28 +40,19 @@ type Interface struct { // Read Only: true Occupied *bool `json:"_occupied,omitempty"` + // bridge + Bridge *NestedInterface `json:"bridge,omitempty"` + // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -71,14 +62,18 @@ type Interface struct { // Read Only: true ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + // Count fhrp groups + // Read Only: true + CountFhrpGroups int64 `json:"count_fhrp_groups,omitempty"` + // Count ipaddresses // Read Only: true CountIpaddresses int64 `json:"count_ipaddresses,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -95,10 +90,13 @@ type Interface struct { // Read Only: true Display string `json:"display,omitempty"` + // duplex + Duplex *InterfaceDuplex `json:"duplex,omitempty"` + // Enabled Enabled bool `json:"enabled,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -116,6 +114,18 @@ type Interface struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // MAC Address MacAddress *string `json:"mac_address,omitempty"` @@ -132,6 +142,9 @@ type Interface struct { // mode Mode *InterfaceMode `json:"mode,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // MTU // Maximum: 65536 // Minimum: 1 @@ -146,6 +159,23 @@ type Interface struct { // parent Parent *NestedInterface `json:"parent,omitempty"` + // rf channel + RfChannel *InterfaceRfChannel `json:"rf_channel,omitempty"` + + // Channel frequency (MHz) + RfChannelFrequency *float64 `json:"rf_channel_frequency,omitempty"` + + // Channel width (MHz) + RfChannelWidth *float64 `json:"rf_channel_width,omitempty"` + + // rf role + RfRole *InterfaceRfRole `json:"rf_role,omitempty"` + + // Speed + // Maximum: 2.147483647e+09 + // Minimum: 0 + Speed *int64 `json:"speed,omitempty"` + // tagged vlans // Unique: true TaggedVlans []*NestedVLAN `json:"tagged_vlans"` @@ -153,6 +183,11 @@ type Interface struct { // tags Tags []*NestedTag `json:"tags"` + // Transmit power (dBm) + // Maximum: 127 + // Minimum: 0 + TxPower *int64 `json:"tx_power,omitempty"` + // type // Required: true Type *InterfaceType `json:"type"` @@ -164,12 +199,31 @@ type Interface struct { // Read Only: true // Format: uri URL strfmt.URI `json:"url,omitempty"` + + // vrf + Vrf *NestedVRF `json:"vrf,omitempty"` + + // wireless lans + // Unique: true + WirelessLans []*NestedWirelessLAN `json:"wireless_lans"` + + // wireless link + WirelessLink *NestedWirelessLink `json:"wireless_link,omitempty"` + + // WWN + // + // 64-bit World Wide Name + Wwn *string `json:"wwn,omitempty"` } // Validate validates this interface func (m *Interface) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateBridge(formats); err != nil { + res = append(res, err) + } + if err := m.validateCable(formats); err != nil { res = append(res, err) } @@ -186,6 +240,10 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDuplex(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } @@ -202,6 +260,10 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateMtu(formats); err != nil { res = append(res, err) } @@ -214,6 +276,18 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRfChannel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRfRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpeed(formats); err != nil { + res = append(res, err) + } + if err := m.validateTaggedVlans(formats); err != nil { res = append(res, err) } @@ -222,6 +296,10 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTxPower(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -234,12 +312,43 @@ func (m *Interface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVrf(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWirelessLans(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWirelessLink(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *Interface) validateBridge(formats strfmt.Registry) error { + if swag.IsZero(m.Bridge) { // not required + return nil + } + + if m.Bridge != nil { + if err := m.Bridge.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bridge") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("bridge") + } + return err + } + } + + return nil +} + func (m *Interface) validateCable(formats strfmt.Registry) error { if swag.IsZero(m.Cable) { // not required return nil @@ -249,6 +358,8 @@ func (m *Interface) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -262,7 +373,7 @@ func (m *Interface) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -291,6 +402,27 @@ func (m *Interface) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *Interface) validateDuplex(formats strfmt.Registry) error { + if swag.IsZero(m.Duplex) { // not required + return nil + } + + if m.Duplex != nil { + if err := m.Duplex.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("duplex") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("duplex") } return err } @@ -320,6 +452,8 @@ func (m *Interface) validateLag(formats strfmt.Registry) error { if err := m.Lag.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("lag") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lag") } return err } @@ -349,6 +483,27 @@ func (m *Interface) validateMode(formats strfmt.Registry) error { if err := m.Mode.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *Interface) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") } return err } @@ -399,6 +554,46 @@ func (m *Interface) validateParent(formats strfmt.Registry) error { if err := m.Parent.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") + } + return err + } + } + + return nil +} + +func (m *Interface) validateRfChannel(formats strfmt.Registry) error { + if swag.IsZero(m.RfChannel) { // not required + return nil + } + + if m.RfChannel != nil { + if err := m.RfChannel.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rf_channel") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rf_channel") + } + return err + } + } + + return nil +} + +func (m *Interface) validateRfRole(formats strfmt.Registry) error { + if swag.IsZero(m.RfRole) { // not required + return nil + } + + if m.RfRole != nil { + if err := m.RfRole.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rf_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rf_role") } return err } @@ -407,6 +602,22 @@ func (m *Interface) validateParent(formats strfmt.Registry) error { return nil } +func (m *Interface) validateSpeed(formats strfmt.Registry) error { + if swag.IsZero(m.Speed) { // not required + return nil + } + + if err := validate.MinimumInt("speed", "body", *m.Speed, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("speed", "body", *m.Speed, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + func (m *Interface) validateTaggedVlans(formats strfmt.Registry) error { if swag.IsZero(m.TaggedVlans) { // not required return nil @@ -425,6 +636,8 @@ func (m *Interface) validateTaggedVlans(formats strfmt.Registry) error { if err := m.TaggedVlans[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) } return err } @@ -449,6 +662,8 @@ func (m *Interface) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -459,6 +674,22 @@ func (m *Interface) validateTags(formats strfmt.Registry) error { return nil } +func (m *Interface) validateTxPower(formats strfmt.Registry) error { + if swag.IsZero(m.TxPower) { // not required + return nil + } + + if err := validate.MinimumInt("tx_power", "body", *m.TxPower, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("tx_power", "body", *m.TxPower, 127, false); err != nil { + return err + } + + return nil +} + func (m *Interface) validateType(formats strfmt.Registry) error { if err := validate.Required("type", "body", m.Type); err != nil { @@ -469,6 +700,8 @@ func (m *Interface) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -486,6 +719,8 @@ func (m *Interface) validateUntaggedVlan(formats strfmt.Registry) error { if err := m.UntaggedVlan.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("untagged_vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("untagged_vlan") } return err } @@ -506,6 +741,74 @@ func (m *Interface) validateURL(formats strfmt.Registry) error { return nil } +func (m *Interface) validateVrf(formats strfmt.Registry) error { + if swag.IsZero(m.Vrf) { // not required + return nil + } + + if m.Vrf != nil { + if err := m.Vrf.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") + } + return err + } + } + + return nil +} + +func (m *Interface) validateWirelessLans(formats strfmt.Registry) error { + if swag.IsZero(m.WirelessLans) { // not required + return nil + } + + if err := validate.UniqueItems("wireless_lans", "body", m.WirelessLans); err != nil { + return err + } + + for i := 0; i < len(m.WirelessLans); i++ { + if swag.IsZero(m.WirelessLans[i]) { // not required + continue + } + + if m.WirelessLans[i] != nil { + if err := m.WirelessLans[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wireless_lans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wireless_lans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Interface) validateWirelessLink(formats strfmt.Registry) error { + if swag.IsZero(m.WirelessLink) { // not required + return nil + } + + if m.WirelessLink != nil { + if err := m.WirelessLink.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wireless_link") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wireless_link") + } + return err + } + } + + return nil +} + // ContextValidate validate this interface based on the context it is used func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -514,11 +817,15 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateBridge(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCable(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -530,6 +837,10 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateCountFhrpGroups(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCountIpaddresses(ctx, formats); err != nil { res = append(res, err) } @@ -546,278 +857,2094 @@ func (m *Interface) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateDuplex(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } - if err := m.contextValidateLag(ctx, formats); err != nil { - res = append(res, err) - } + if err := m.contextValidateLag(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRfChannel(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRfRole(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTaggedVlans(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateUntaggedVlan(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVrf(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWirelessLans(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWirelessLink(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Interface) contextValidateOccupied(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_occupied", "body", m.Occupied); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateBridge(ctx context.Context, formats strfmt.Registry) error { + + if m.Bridge != nil { + if err := m.Bridge.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bridge") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("bridge") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateCable(ctx context.Context, formats strfmt.Registry) error { + + if m.Cable != nil { + if err := m.Cable.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *Interface) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateCountFhrpGroups(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "count_fhrp_groups", "body", int64(m.CountFhrpGroups)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateCountIpaddresses(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "count_ipaddresses", "body", int64(m.CountIpaddresses)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { + + if m.Device != nil { + if err := m.Device.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateDuplex(ctx context.Context, formats strfmt.Registry) error { + + if m.Duplex != nil { + if err := m.Duplex.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("duplex") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("duplex") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateLag(ctx context.Context, formats strfmt.Registry) error { + + if m.Lag != nil { + if err := m.Lag.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lag") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lag") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *Interface) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateMode(ctx context.Context, formats strfmt.Registry) error { + + if m.Mode != nil { + if err := m.Mode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { + + if m.Parent != nil { + if err := m.Parent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateRfChannel(ctx context.Context, formats strfmt.Registry) error { + + if m.RfChannel != nil { + if err := m.RfChannel.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rf_channel") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rf_channel") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateRfRole(ctx context.Context, formats strfmt.Registry) error { + + if m.RfRole != nil { + if err := m.RfRole.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rf_role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rf_role") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateTaggedVlans(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TaggedVlans); i++ { + + if m.TaggedVlans[i] != nil { + if err := m.TaggedVlans[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Interface) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Interface) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateUntaggedVlan(ctx context.Context, formats strfmt.Registry) error { + + if m.UntaggedVlan != nil { + if err := m.UntaggedVlan.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("untagged_vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("untagged_vlan") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +func (m *Interface) contextValidateVrf(ctx context.Context, formats strfmt.Registry) error { + + if m.Vrf != nil { + if err := m.Vrf.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") + } + return err + } + } + + return nil +} + +func (m *Interface) contextValidateWirelessLans(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.WirelessLans); i++ { + + if m.WirelessLans[i] != nil { + if err := m.WirelessLans[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wireless_lans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wireless_lans" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Interface) contextValidateWirelessLink(ctx context.Context, formats strfmt.Registry) error { + + if m.WirelessLink != nil { + if err := m.WirelessLink.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("wireless_link") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("wireless_link") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Interface) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Interface) UnmarshalBinary(b []byte) error { + var res Interface + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// InterfaceDuplex Duplex +// +// swagger:model InterfaceDuplex +type InterfaceDuplex struct { + + // label + // Required: true + // Enum: [Half Full Auto] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [half full auto] + Value *string `json:"value"` +} + +// Validate validates this interface duplex +func (m *InterfaceDuplex) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfaceDuplexTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Half","Full","Auto"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceDuplexTypeLabelPropEnum = append(interfaceDuplexTypeLabelPropEnum, v) + } +} + +const ( + + // InterfaceDuplexLabelHalf captures enum value "Half" + InterfaceDuplexLabelHalf string = "Half" + + // InterfaceDuplexLabelFull captures enum value "Full" + InterfaceDuplexLabelFull string = "Full" + + // InterfaceDuplexLabelAuto captures enum value "Auto" + InterfaceDuplexLabelAuto string = "Auto" +) + +// prop value enum +func (m *InterfaceDuplex) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceDuplexTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceDuplex) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("duplex"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("duplex"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfaceDuplexTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["half","full","auto"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceDuplexTypeValuePropEnum = append(interfaceDuplexTypeValuePropEnum, v) + } +} + +const ( + + // InterfaceDuplexValueHalf captures enum value "half" + InterfaceDuplexValueHalf string = "half" + + // InterfaceDuplexValueFull captures enum value "full" + InterfaceDuplexValueFull string = "full" + + // InterfaceDuplexValueAuto captures enum value "auto" + InterfaceDuplexValueAuto string = "auto" +) + +// prop value enum +func (m *InterfaceDuplex) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceDuplexTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceDuplex) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("duplex"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("duplex"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this interface duplex based on context it is used +func (m *InterfaceDuplex) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InterfaceDuplex) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InterfaceDuplex) UnmarshalBinary(b []byte) error { + var res InterfaceDuplex + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// InterfaceMode Mode +// +// swagger:model InterfaceMode +type InterfaceMode struct { + + // label + // Required: true + // Enum: [Access Tagged Tagged (All)] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [access tagged tagged-all] + Value *string `json:"value"` +} + +// Validate validates this interface mode +func (m *InterfaceMode) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfaceModeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Access","Tagged","Tagged (All)"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceModeTypeLabelPropEnum = append(interfaceModeTypeLabelPropEnum, v) + } +} + +const ( + + // InterfaceModeLabelAccess captures enum value "Access" + InterfaceModeLabelAccess string = "Access" + + // InterfaceModeLabelTagged captures enum value "Tagged" + InterfaceModeLabelTagged string = "Tagged" + + // InterfaceModeLabelTaggedAll captures enum value "Tagged (All)" + InterfaceModeLabelTaggedAll string = "Tagged (All)" +) + +// prop value enum +func (m *InterfaceMode) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceModeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceMode) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("mode"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("mode"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfaceModeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["access","tagged","tagged-all"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceModeTypeValuePropEnum = append(interfaceModeTypeValuePropEnum, v) + } +} + +const ( + + // InterfaceModeValueAccess captures enum value "access" + InterfaceModeValueAccess string = "access" + + // InterfaceModeValueTagged captures enum value "tagged" + InterfaceModeValueTagged string = "tagged" + + // InterfaceModeValueTaggedDashAll captures enum value "tagged-all" + InterfaceModeValueTaggedDashAll string = "tagged-all" +) + +// prop value enum +func (m *InterfaceMode) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceModeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceMode) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("mode"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("mode"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this interface mode based on context it is used +func (m *InterfaceMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InterfaceMode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InterfaceMode) UnmarshalBinary(b []byte) error { + var res InterfaceMode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// InterfaceRfChannel Rf channel +// +// swagger:model InterfaceRfChannel +type InterfaceRfChannel struct { + + // label + // Required: true + // Enum: [1 (2412 MHz) 2 (2417 MHz) 3 (2422 MHz) 4 (2427 MHz) 5 (2432 MHz) 6 (2437 MHz) 7 (2442 MHz) 8 (2447 MHz) 9 (2452 MHz) 10 (2457 MHz) 11 (2462 MHz) 12 (2467 MHz) 13 (2472 MHz) 32 (5160/20 MHz) 34 (5170/40 MHz) 36 (5180/20 MHz) 38 (5190/40 MHz) 40 (5200/20 MHz) 42 (5210/80 MHz) 44 (5220/20 MHz) 46 (5230/40 MHz) 48 (5240/20 MHz) 50 (5250/160 MHz) 52 (5260/20 MHz) 54 (5270/40 MHz) 56 (5280/20 MHz) 58 (5290/80 MHz) 60 (5300/20 MHz) 62 (5310/40 MHz) 64 (5320/20 MHz) 100 (5500/20 MHz) 102 (5510/40 MHz) 104 (5520/20 MHz) 106 (5530/80 MHz) 108 (5540/20 MHz) 110 (5550/40 MHz) 112 (5560/20 MHz) 114 (5570/160 MHz) 116 (5580/20 MHz) 118 (5590/40 MHz) 120 (5600/20 MHz) 122 (5610/80 MHz) 124 (5620/20 MHz) 126 (5630/40 MHz) 128 (5640/20 MHz) 132 (5660/20 MHz) 134 (5670/40 MHz) 136 (5680/20 MHz) 138 (5690/80 MHz) 140 (5700/20 MHz) 142 (5710/40 MHz) 144 (5720/20 MHz) 149 (5745/20 MHz) 151 (5755/40 MHz) 153 (5765/20 MHz) 155 (5775/80 MHz) 157 (5785/20 MHz) 159 (5795/40 MHz) 161 (5805/20 MHz) 163 (5815/160 MHz) 165 (5825/20 MHz) 167 (5835/40 MHz) 169 (5845/20 MHz) 171 (5855/80 MHz) 173 (5865/20 MHz) 175 (5875/40 MHz) 177 (5885/20 MHz) 1 (5955/20 MHz) 3 (5965/40 MHz) 5 (5975/20 MHz) 7 (5985/80 MHz) 9 (5995/20 MHz) 11 (6005/40 MHz) 13 (6015/20 MHz) 15 (6025/160 MHz) 17 (6035/20 MHz) 19 (6045/40 MHz) 21 (6055/20 MHz) 23 (6065/80 MHz) 25 (6075/20 MHz) 27 (6085/40 MHz) 29 (6095/20 MHz) 31 (6105/320 MHz) 33 (6115/20 MHz) 35 (6125/40 MHz) 37 (6135/20 MHz) 39 (6145/80 MHz) 41 (6155/20 MHz) 43 (6165/40 MHz) 45 (6175/20 MHz) 47 (6185/160 MHz) 49 (6195/20 MHz) 51 (6205/40 MHz) 53 (6215/20 MHz) 55 (6225/80 MHz) 57 (6235/20 MHz) 59 (6245/40 MHz) 61 (6255/20 MHz) 65 (6275/20 MHz) 67 (6285/40 MHz) 69 (6295/20 MHz) 71 (6305/80 MHz) 73 (6315/20 MHz) 75 (6325/40 MHz) 77 (6335/20 MHz) 79 (6345/160 MHz) 81 (6355/20 MHz) 83 (6365/40 MHz) 85 (6375/20 MHz) 87 (6385/80 MHz) 89 (6395/20 MHz) 91 (6405/40 MHz) 93 (6415/20 MHz) 95 (6425/320 MHz) 97 (6435/20 MHz) 99 (6445/40 MHz) 101 (6455/20 MHz) 103 (6465/80 MHz) 105 (6475/20 MHz) 107 (6485/40 MHz) 109 (6495/20 MHz) 111 (6505/160 MHz) 113 (6515/20 MHz) 115 (6525/40 MHz) 117 (6535/20 MHz) 119 (6545/80 MHz) 121 (6555/20 MHz) 123 (6565/40 MHz) 125 (6575/20 MHz) 129 (6595/20 MHz) 131 (6605/40 MHz) 133 (6615/20 MHz) 135 (6625/80 MHz) 137 (6635/20 MHz) 139 (6645/40 MHz) 141 (6655/20 MHz) 143 (6665/160 MHz) 145 (6675/20 MHz) 147 (6685/40 MHz) 149 (6695/20 MHz) 151 (6705/80 MHz) 153 (6715/20 MHz) 155 (6725/40 MHz) 157 (6735/20 MHz) 159 (6745/320 MHz) 161 (6755/20 MHz) 163 (6765/40 MHz) 165 (6775/20 MHz) 167 (6785/80 MHz) 169 (6795/20 MHz) 171 (6805/40 MHz) 173 (6815/20 MHz) 175 (6825/160 MHz) 177 (6835/20 MHz) 179 (6845/40 MHz) 181 (6855/20 MHz) 183 (6865/80 MHz) 185 (6875/20 MHz) 187 (6885/40 MHz) 189 (6895/20 MHz) 193 (6915/20 MHz) 195 (6925/40 MHz) 197 (6935/20 MHz) 199 (6945/80 MHz) 201 (6955/20 MHz) 203 (6965/40 MHz) 205 (6975/20 MHz) 207 (6985/160 MHz) 209 (6995/20 MHz) 211 (7005/40 MHz) 213 (7015/20 MHz) 215 (7025/80 MHz) 217 (7035/20 MHz) 219 (7045/40 MHz) 221 (7055/20 MHz) 225 (7075/20 MHz) 227 (7085/40 MHz) 229 (7095/20 MHz) 233 (7115/20 MHz) 1 (58.32/2.16 GHz) 2 (60.48/2.16 GHz) 3 (62.64/2.16 GHz) 4 (64.80/2.16 GHz) 5 (66.96/2.16 GHz) 6 (69.12/2.16 GHz) 9 (59.40/4.32 GHz) 10 (61.56/4.32 GHz) 11 (63.72/4.32 GHz) 12 (65.88/4.32 GHz) 13 (68.04/4.32 GHz) 17 (60.48/6.48 GHz) 18 (62.64/6.48 GHz) 19 (64.80/6.48 GHz) 20 (66.96/6.48 GHz) 25 (61.56/8.64 GHz) 26 (63.72/8.64 GHz) 27 (65.88/8.64 GHz)] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [2.4g-1-2412-22 2.4g-2-2417-22 2.4g-3-2422-22 2.4g-4-2427-22 2.4g-5-2432-22 2.4g-6-2437-22 2.4g-7-2442-22 2.4g-8-2447-22 2.4g-9-2452-22 2.4g-10-2457-22 2.4g-11-2462-22 2.4g-12-2467-22 2.4g-13-2472-22 5g-32-5160-20 5g-34-5170-40 5g-36-5180-20 5g-38-5190-40 5g-40-5200-20 5g-42-5210-80 5g-44-5220-20 5g-46-5230-40 5g-48-5240-20 5g-50-5250-160 5g-52-5260-20 5g-54-5270-40 5g-56-5280-20 5g-58-5290-80 5g-60-5300-20 5g-62-5310-40 5g-64-5320-20 5g-100-5500-20 5g-102-5510-40 5g-104-5520-20 5g-106-5530-80 5g-108-5540-20 5g-110-5550-40 5g-112-5560-20 5g-114-5570-160 5g-116-5580-20 5g-118-5590-40 5g-120-5600-20 5g-122-5610-80 5g-124-5620-20 5g-126-5630-40 5g-128-5640-20 5g-132-5660-20 5g-134-5670-40 5g-136-5680-20 5g-138-5690-80 5g-140-5700-20 5g-142-5710-40 5g-144-5720-20 5g-149-5745-20 5g-151-5755-40 5g-153-5765-20 5g-155-5775-80 5g-157-5785-20 5g-159-5795-40 5g-161-5805-20 5g-163-5815-160 5g-165-5825-20 5g-167-5835-40 5g-169-5845-20 5g-171-5855-80 5g-173-5865-20 5g-175-5875-40 5g-177-5885-20 6g-1-5955-20 6g-3-5965-40 6g-5-5975-20 6g-7-5985-80 6g-9-5995-20 6g-11-6005-40 6g-13-6015-20 6g-15-6025-160 6g-17-6035-20 6g-19-6045-40 6g-21-6055-20 6g-23-6065-80 6g-25-6075-20 6g-27-6085-40 6g-29-6095-20 6g-31-6105-320 6g-33-6115-20 6g-35-6125-40 6g-37-6135-20 6g-39-6145-80 6g-41-6155-20 6g-43-6165-40 6g-45-6175-20 6g-47-6185-160 6g-49-6195-20 6g-51-6205-40 6g-53-6215-20 6g-55-6225-80 6g-57-6235-20 6g-59-6245-40 6g-61-6255-20 6g-65-6275-20 6g-67-6285-40 6g-69-6295-20 6g-71-6305-80 6g-73-6315-20 6g-75-6325-40 6g-77-6335-20 6g-79-6345-160 6g-81-6355-20 6g-83-6365-40 6g-85-6375-20 6g-87-6385-80 6g-89-6395-20 6g-91-6405-40 6g-93-6415-20 6g-95-6425-320 6g-97-6435-20 6g-99-6445-40 6g-101-6455-20 6g-103-6465-80 6g-105-6475-20 6g-107-6485-40 6g-109-6495-20 6g-111-6505-160 6g-113-6515-20 6g-115-6525-40 6g-117-6535-20 6g-119-6545-80 6g-121-6555-20 6g-123-6565-40 6g-125-6575-20 6g-129-6595-20 6g-131-6605-40 6g-133-6615-20 6g-135-6625-80 6g-137-6635-20 6g-139-6645-40 6g-141-6655-20 6g-143-6665-160 6g-145-6675-20 6g-147-6685-40 6g-149-6695-20 6g-151-6705-80 6g-153-6715-20 6g-155-6725-40 6g-157-6735-20 6g-159-6745-320 6g-161-6755-20 6g-163-6765-40 6g-165-6775-20 6g-167-6785-80 6g-169-6795-20 6g-171-6805-40 6g-173-6815-20 6g-175-6825-160 6g-177-6835-20 6g-179-6845-40 6g-181-6855-20 6g-183-6865-80 6g-185-6875-20 6g-187-6885-40 6g-189-6895-20 6g-193-6915-20 6g-195-6925-40 6g-197-6935-20 6g-199-6945-80 6g-201-6955-20 6g-203-6965-40 6g-205-6975-20 6g-207-6985-160 6g-209-6995-20 6g-211-7005-40 6g-213-7015-20 6g-215-7025-80 6g-217-7035-20 6g-219-7045-40 6g-221-7055-20 6g-225-7075-20 6g-227-7085-40 6g-229-7095-20 6g-233-7115-20 60g-1-58320-2160 60g-2-60480-2160 60g-3-62640-2160 60g-4-64800-2160 60g-5-66960-2160 60g-6-69120-2160 60g-9-59400-4320 60g-10-61560-4320 60g-11-63720-4320 60g-12-65880-4320 60g-13-68040-4320 60g-17-60480-6480 60g-18-62640-6480 60g-19-64800-6480 60g-20-66960-6480 60g-25-61560-6480 60g-26-63720-6480 60g-27-65880-6480] + Value *string `json:"value"` +} + +// Validate validates this interface rf channel +func (m *InterfaceRfChannel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var interfaceRfChannelTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["1 (2412 MHz)","2 (2417 MHz)","3 (2422 MHz)","4 (2427 MHz)","5 (2432 MHz)","6 (2437 MHz)","7 (2442 MHz)","8 (2447 MHz)","9 (2452 MHz)","10 (2457 MHz)","11 (2462 MHz)","12 (2467 MHz)","13 (2472 MHz)","32 (5160/20 MHz)","34 (5170/40 MHz)","36 (5180/20 MHz)","38 (5190/40 MHz)","40 (5200/20 MHz)","42 (5210/80 MHz)","44 (5220/20 MHz)","46 (5230/40 MHz)","48 (5240/20 MHz)","50 (5250/160 MHz)","52 (5260/20 MHz)","54 (5270/40 MHz)","56 (5280/20 MHz)","58 (5290/80 MHz)","60 (5300/20 MHz)","62 (5310/40 MHz)","64 (5320/20 MHz)","100 (5500/20 MHz)","102 (5510/40 MHz)","104 (5520/20 MHz)","106 (5530/80 MHz)","108 (5540/20 MHz)","110 (5550/40 MHz)","112 (5560/20 MHz)","114 (5570/160 MHz)","116 (5580/20 MHz)","118 (5590/40 MHz)","120 (5600/20 MHz)","122 (5610/80 MHz)","124 (5620/20 MHz)","126 (5630/40 MHz)","128 (5640/20 MHz)","132 (5660/20 MHz)","134 (5670/40 MHz)","136 (5680/20 MHz)","138 (5690/80 MHz)","140 (5700/20 MHz)","142 (5710/40 MHz)","144 (5720/20 MHz)","149 (5745/20 MHz)","151 (5755/40 MHz)","153 (5765/20 MHz)","155 (5775/80 MHz)","157 (5785/20 MHz)","159 (5795/40 MHz)","161 (5805/20 MHz)","163 (5815/160 MHz)","165 (5825/20 MHz)","167 (5835/40 MHz)","169 (5845/20 MHz)","171 (5855/80 MHz)","173 (5865/20 MHz)","175 (5875/40 MHz)","177 (5885/20 MHz)","1 (5955/20 MHz)","3 (5965/40 MHz)","5 (5975/20 MHz)","7 (5985/80 MHz)","9 (5995/20 MHz)","11 (6005/40 MHz)","13 (6015/20 MHz)","15 (6025/160 MHz)","17 (6035/20 MHz)","19 (6045/40 MHz)","21 (6055/20 MHz)","23 (6065/80 MHz)","25 (6075/20 MHz)","27 (6085/40 MHz)","29 (6095/20 MHz)","31 (6105/320 MHz)","33 (6115/20 MHz)","35 (6125/40 MHz)","37 (6135/20 MHz)","39 (6145/80 MHz)","41 (6155/20 MHz)","43 (6165/40 MHz)","45 (6175/20 MHz)","47 (6185/160 MHz)","49 (6195/20 MHz)","51 (6205/40 MHz)","53 (6215/20 MHz)","55 (6225/80 MHz)","57 (6235/20 MHz)","59 (6245/40 MHz)","61 (6255/20 MHz)","65 (6275/20 MHz)","67 (6285/40 MHz)","69 (6295/20 MHz)","71 (6305/80 MHz)","73 (6315/20 MHz)","75 (6325/40 MHz)","77 (6335/20 MHz)","79 (6345/160 MHz)","81 (6355/20 MHz)","83 (6365/40 MHz)","85 (6375/20 MHz)","87 (6385/80 MHz)","89 (6395/20 MHz)","91 (6405/40 MHz)","93 (6415/20 MHz)","95 (6425/320 MHz)","97 (6435/20 MHz)","99 (6445/40 MHz)","101 (6455/20 MHz)","103 (6465/80 MHz)","105 (6475/20 MHz)","107 (6485/40 MHz)","109 (6495/20 MHz)","111 (6505/160 MHz)","113 (6515/20 MHz)","115 (6525/40 MHz)","117 (6535/20 MHz)","119 (6545/80 MHz)","121 (6555/20 MHz)","123 (6565/40 MHz)","125 (6575/20 MHz)","129 (6595/20 MHz)","131 (6605/40 MHz)","133 (6615/20 MHz)","135 (6625/80 MHz)","137 (6635/20 MHz)","139 (6645/40 MHz)","141 (6655/20 MHz)","143 (6665/160 MHz)","145 (6675/20 MHz)","147 (6685/40 MHz)","149 (6695/20 MHz)","151 (6705/80 MHz)","153 (6715/20 MHz)","155 (6725/40 MHz)","157 (6735/20 MHz)","159 (6745/320 MHz)","161 (6755/20 MHz)","163 (6765/40 MHz)","165 (6775/20 MHz)","167 (6785/80 MHz)","169 (6795/20 MHz)","171 (6805/40 MHz)","173 (6815/20 MHz)","175 (6825/160 MHz)","177 (6835/20 MHz)","179 (6845/40 MHz)","181 (6855/20 MHz)","183 (6865/80 MHz)","185 (6875/20 MHz)","187 (6885/40 MHz)","189 (6895/20 MHz)","193 (6915/20 MHz)","195 (6925/40 MHz)","197 (6935/20 MHz)","199 (6945/80 MHz)","201 (6955/20 MHz)","203 (6965/40 MHz)","205 (6975/20 MHz)","207 (6985/160 MHz)","209 (6995/20 MHz)","211 (7005/40 MHz)","213 (7015/20 MHz)","215 (7025/80 MHz)","217 (7035/20 MHz)","219 (7045/40 MHz)","221 (7055/20 MHz)","225 (7075/20 MHz)","227 (7085/40 MHz)","229 (7095/20 MHz)","233 (7115/20 MHz)","1 (58.32/2.16 GHz)","2 (60.48/2.16 GHz)","3 (62.64/2.16 GHz)","4 (64.80/2.16 GHz)","5 (66.96/2.16 GHz)","6 (69.12/2.16 GHz)","9 (59.40/4.32 GHz)","10 (61.56/4.32 GHz)","11 (63.72/4.32 GHz)","12 (65.88/4.32 GHz)","13 (68.04/4.32 GHz)","17 (60.48/6.48 GHz)","18 (62.64/6.48 GHz)","19 (64.80/6.48 GHz)","20 (66.96/6.48 GHz)","25 (61.56/8.64 GHz)","26 (63.72/8.64 GHz)","27 (65.88/8.64 GHz)"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceRfChannelTypeLabelPropEnum = append(interfaceRfChannelTypeLabelPropEnum, v) + } +} + +const ( + + // InterfaceRfChannelLabelNr12412MHz captures enum value "1 (2412 MHz)" + InterfaceRfChannelLabelNr12412MHz string = "1 (2412 MHz)" + + // InterfaceRfChannelLabelNr22417MHz captures enum value "2 (2417 MHz)" + InterfaceRfChannelLabelNr22417MHz string = "2 (2417 MHz)" + + // InterfaceRfChannelLabelNr32422MHz captures enum value "3 (2422 MHz)" + InterfaceRfChannelLabelNr32422MHz string = "3 (2422 MHz)" + + // InterfaceRfChannelLabelNr42427MHz captures enum value "4 (2427 MHz)" + InterfaceRfChannelLabelNr42427MHz string = "4 (2427 MHz)" + + // InterfaceRfChannelLabelNr52432MHz captures enum value "5 (2432 MHz)" + InterfaceRfChannelLabelNr52432MHz string = "5 (2432 MHz)" + + // InterfaceRfChannelLabelNr62437MHz captures enum value "6 (2437 MHz)" + InterfaceRfChannelLabelNr62437MHz string = "6 (2437 MHz)" + + // InterfaceRfChannelLabelNr72442MHz captures enum value "7 (2442 MHz)" + InterfaceRfChannelLabelNr72442MHz string = "7 (2442 MHz)" + + // InterfaceRfChannelLabelNr82447MHz captures enum value "8 (2447 MHz)" + InterfaceRfChannelLabelNr82447MHz string = "8 (2447 MHz)" + + // InterfaceRfChannelLabelNr92452MHz captures enum value "9 (2452 MHz)" + InterfaceRfChannelLabelNr92452MHz string = "9 (2452 MHz)" + + // InterfaceRfChannelLabelNr102457MHz captures enum value "10 (2457 MHz)" + InterfaceRfChannelLabelNr102457MHz string = "10 (2457 MHz)" + + // InterfaceRfChannelLabelNr112462MHz captures enum value "11 (2462 MHz)" + InterfaceRfChannelLabelNr112462MHz string = "11 (2462 MHz)" + + // InterfaceRfChannelLabelNr122467MHz captures enum value "12 (2467 MHz)" + InterfaceRfChannelLabelNr122467MHz string = "12 (2467 MHz)" + + // InterfaceRfChannelLabelNr132472MHz captures enum value "13 (2472 MHz)" + InterfaceRfChannelLabelNr132472MHz string = "13 (2472 MHz)" + + // InterfaceRfChannelLabelNr32516020MHz captures enum value "32 (5160/20 MHz)" + InterfaceRfChannelLabelNr32516020MHz string = "32 (5160/20 MHz)" + + // InterfaceRfChannelLabelNr34517040MHz captures enum value "34 (5170/40 MHz)" + InterfaceRfChannelLabelNr34517040MHz string = "34 (5170/40 MHz)" + + // InterfaceRfChannelLabelNr36518020MHz captures enum value "36 (5180/20 MHz)" + InterfaceRfChannelLabelNr36518020MHz string = "36 (5180/20 MHz)" + + // InterfaceRfChannelLabelNr38519040MHz captures enum value "38 (5190/40 MHz)" + InterfaceRfChannelLabelNr38519040MHz string = "38 (5190/40 MHz)" + + // InterfaceRfChannelLabelNr40520020MHz captures enum value "40 (5200/20 MHz)" + InterfaceRfChannelLabelNr40520020MHz string = "40 (5200/20 MHz)" + + // InterfaceRfChannelLabelNr42521080MHz captures enum value "42 (5210/80 MHz)" + InterfaceRfChannelLabelNr42521080MHz string = "42 (5210/80 MHz)" + + // InterfaceRfChannelLabelNr44522020MHz captures enum value "44 (5220/20 MHz)" + InterfaceRfChannelLabelNr44522020MHz string = "44 (5220/20 MHz)" + + // InterfaceRfChannelLabelNr46523040MHz captures enum value "46 (5230/40 MHz)" + InterfaceRfChannelLabelNr46523040MHz string = "46 (5230/40 MHz)" + + // InterfaceRfChannelLabelNr48524020MHz captures enum value "48 (5240/20 MHz)" + InterfaceRfChannelLabelNr48524020MHz string = "48 (5240/20 MHz)" + + // InterfaceRfChannelLabelNr505250160MHz captures enum value "50 (5250/160 MHz)" + InterfaceRfChannelLabelNr505250160MHz string = "50 (5250/160 MHz)" + + // InterfaceRfChannelLabelNr52526020MHz captures enum value "52 (5260/20 MHz)" + InterfaceRfChannelLabelNr52526020MHz string = "52 (5260/20 MHz)" + + // InterfaceRfChannelLabelNr54527040MHz captures enum value "54 (5270/40 MHz)" + InterfaceRfChannelLabelNr54527040MHz string = "54 (5270/40 MHz)" + + // InterfaceRfChannelLabelNr56528020MHz captures enum value "56 (5280/20 MHz)" + InterfaceRfChannelLabelNr56528020MHz string = "56 (5280/20 MHz)" + + // InterfaceRfChannelLabelNr58529080MHz captures enum value "58 (5290/80 MHz)" + InterfaceRfChannelLabelNr58529080MHz string = "58 (5290/80 MHz)" + + // InterfaceRfChannelLabelNr60530020MHz captures enum value "60 (5300/20 MHz)" + InterfaceRfChannelLabelNr60530020MHz string = "60 (5300/20 MHz)" + + // InterfaceRfChannelLabelNr62531040MHz captures enum value "62 (5310/40 MHz)" + InterfaceRfChannelLabelNr62531040MHz string = "62 (5310/40 MHz)" + + // InterfaceRfChannelLabelNr64532020MHz captures enum value "64 (5320/20 MHz)" + InterfaceRfChannelLabelNr64532020MHz string = "64 (5320/20 MHz)" + + // InterfaceRfChannelLabelNr100550020MHz captures enum value "100 (5500/20 MHz)" + InterfaceRfChannelLabelNr100550020MHz string = "100 (5500/20 MHz)" + + // InterfaceRfChannelLabelNr102551040MHz captures enum value "102 (5510/40 MHz)" + InterfaceRfChannelLabelNr102551040MHz string = "102 (5510/40 MHz)" + + // InterfaceRfChannelLabelNr104552020MHz captures enum value "104 (5520/20 MHz)" + InterfaceRfChannelLabelNr104552020MHz string = "104 (5520/20 MHz)" + + // InterfaceRfChannelLabelNr106553080MHz captures enum value "106 (5530/80 MHz)" + InterfaceRfChannelLabelNr106553080MHz string = "106 (5530/80 MHz)" + + // InterfaceRfChannelLabelNr108554020MHz captures enum value "108 (5540/20 MHz)" + InterfaceRfChannelLabelNr108554020MHz string = "108 (5540/20 MHz)" + + // InterfaceRfChannelLabelNr110555040MHz captures enum value "110 (5550/40 MHz)" + InterfaceRfChannelLabelNr110555040MHz string = "110 (5550/40 MHz)" + + // InterfaceRfChannelLabelNr112556020MHz captures enum value "112 (5560/20 MHz)" + InterfaceRfChannelLabelNr112556020MHz string = "112 (5560/20 MHz)" + + // InterfaceRfChannelLabelNr1145570160MHz captures enum value "114 (5570/160 MHz)" + InterfaceRfChannelLabelNr1145570160MHz string = "114 (5570/160 MHz)" + + // InterfaceRfChannelLabelNr116558020MHz captures enum value "116 (5580/20 MHz)" + InterfaceRfChannelLabelNr116558020MHz string = "116 (5580/20 MHz)" + + // InterfaceRfChannelLabelNr118559040MHz captures enum value "118 (5590/40 MHz)" + InterfaceRfChannelLabelNr118559040MHz string = "118 (5590/40 MHz)" + + // InterfaceRfChannelLabelNr120560020MHz captures enum value "120 (5600/20 MHz)" + InterfaceRfChannelLabelNr120560020MHz string = "120 (5600/20 MHz)" + + // InterfaceRfChannelLabelNr122561080MHz captures enum value "122 (5610/80 MHz)" + InterfaceRfChannelLabelNr122561080MHz string = "122 (5610/80 MHz)" + + // InterfaceRfChannelLabelNr124562020MHz captures enum value "124 (5620/20 MHz)" + InterfaceRfChannelLabelNr124562020MHz string = "124 (5620/20 MHz)" + + // InterfaceRfChannelLabelNr126563040MHz captures enum value "126 (5630/40 MHz)" + InterfaceRfChannelLabelNr126563040MHz string = "126 (5630/40 MHz)" + + // InterfaceRfChannelLabelNr128564020MHz captures enum value "128 (5640/20 MHz)" + InterfaceRfChannelLabelNr128564020MHz string = "128 (5640/20 MHz)" + + // InterfaceRfChannelLabelNr132566020MHz captures enum value "132 (5660/20 MHz)" + InterfaceRfChannelLabelNr132566020MHz string = "132 (5660/20 MHz)" + + // InterfaceRfChannelLabelNr134567040MHz captures enum value "134 (5670/40 MHz)" + InterfaceRfChannelLabelNr134567040MHz string = "134 (5670/40 MHz)" + + // InterfaceRfChannelLabelNr136568020MHz captures enum value "136 (5680/20 MHz)" + InterfaceRfChannelLabelNr136568020MHz string = "136 (5680/20 MHz)" + + // InterfaceRfChannelLabelNr138569080MHz captures enum value "138 (5690/80 MHz)" + InterfaceRfChannelLabelNr138569080MHz string = "138 (5690/80 MHz)" + + // InterfaceRfChannelLabelNr140570020MHz captures enum value "140 (5700/20 MHz)" + InterfaceRfChannelLabelNr140570020MHz string = "140 (5700/20 MHz)" + + // InterfaceRfChannelLabelNr142571040MHz captures enum value "142 (5710/40 MHz)" + InterfaceRfChannelLabelNr142571040MHz string = "142 (5710/40 MHz)" + + // InterfaceRfChannelLabelNr144572020MHz captures enum value "144 (5720/20 MHz)" + InterfaceRfChannelLabelNr144572020MHz string = "144 (5720/20 MHz)" + + // InterfaceRfChannelLabelNr149574520MHz captures enum value "149 (5745/20 MHz)" + InterfaceRfChannelLabelNr149574520MHz string = "149 (5745/20 MHz)" + + // InterfaceRfChannelLabelNr151575540MHz captures enum value "151 (5755/40 MHz)" + InterfaceRfChannelLabelNr151575540MHz string = "151 (5755/40 MHz)" + + // InterfaceRfChannelLabelNr153576520MHz captures enum value "153 (5765/20 MHz)" + InterfaceRfChannelLabelNr153576520MHz string = "153 (5765/20 MHz)" + + // InterfaceRfChannelLabelNr155577580MHz captures enum value "155 (5775/80 MHz)" + InterfaceRfChannelLabelNr155577580MHz string = "155 (5775/80 MHz)" + + // InterfaceRfChannelLabelNr157578520MHz captures enum value "157 (5785/20 MHz)" + InterfaceRfChannelLabelNr157578520MHz string = "157 (5785/20 MHz)" + + // InterfaceRfChannelLabelNr159579540MHz captures enum value "159 (5795/40 MHz)" + InterfaceRfChannelLabelNr159579540MHz string = "159 (5795/40 MHz)" + + // InterfaceRfChannelLabelNr161580520MHz captures enum value "161 (5805/20 MHz)" + InterfaceRfChannelLabelNr161580520MHz string = "161 (5805/20 MHz)" + + // InterfaceRfChannelLabelNr1635815160MHz captures enum value "163 (5815/160 MHz)" + InterfaceRfChannelLabelNr1635815160MHz string = "163 (5815/160 MHz)" + + // InterfaceRfChannelLabelNr165582520MHz captures enum value "165 (5825/20 MHz)" + InterfaceRfChannelLabelNr165582520MHz string = "165 (5825/20 MHz)" + + // InterfaceRfChannelLabelNr167583540MHz captures enum value "167 (5835/40 MHz)" + InterfaceRfChannelLabelNr167583540MHz string = "167 (5835/40 MHz)" + + // InterfaceRfChannelLabelNr169584520MHz captures enum value "169 (5845/20 MHz)" + InterfaceRfChannelLabelNr169584520MHz string = "169 (5845/20 MHz)" + + // InterfaceRfChannelLabelNr171585580MHz captures enum value "171 (5855/80 MHz)" + InterfaceRfChannelLabelNr171585580MHz string = "171 (5855/80 MHz)" + + // InterfaceRfChannelLabelNr173586520MHz captures enum value "173 (5865/20 MHz)" + InterfaceRfChannelLabelNr173586520MHz string = "173 (5865/20 MHz)" + + // InterfaceRfChannelLabelNr175587540MHz captures enum value "175 (5875/40 MHz)" + InterfaceRfChannelLabelNr175587540MHz string = "175 (5875/40 MHz)" + + // InterfaceRfChannelLabelNr177588520MHz captures enum value "177 (5885/20 MHz)" + InterfaceRfChannelLabelNr177588520MHz string = "177 (5885/20 MHz)" + + // InterfaceRfChannelLabelNr1595520MHz captures enum value "1 (5955/20 MHz)" + InterfaceRfChannelLabelNr1595520MHz string = "1 (5955/20 MHz)" + + // InterfaceRfChannelLabelNr3596540MHz captures enum value "3 (5965/40 MHz)" + InterfaceRfChannelLabelNr3596540MHz string = "3 (5965/40 MHz)" + + // InterfaceRfChannelLabelNr5597520MHz captures enum value "5 (5975/20 MHz)" + InterfaceRfChannelLabelNr5597520MHz string = "5 (5975/20 MHz)" + + // InterfaceRfChannelLabelNr7598580MHz captures enum value "7 (5985/80 MHz)" + InterfaceRfChannelLabelNr7598580MHz string = "7 (5985/80 MHz)" + + // InterfaceRfChannelLabelNr9599520MHz captures enum value "9 (5995/20 MHz)" + InterfaceRfChannelLabelNr9599520MHz string = "9 (5995/20 MHz)" + + // InterfaceRfChannelLabelNr11600540MHz captures enum value "11 (6005/40 MHz)" + InterfaceRfChannelLabelNr11600540MHz string = "11 (6005/40 MHz)" + + // InterfaceRfChannelLabelNr13601520MHz captures enum value "13 (6015/20 MHz)" + InterfaceRfChannelLabelNr13601520MHz string = "13 (6015/20 MHz)" + + // InterfaceRfChannelLabelNr156025160MHz captures enum value "15 (6025/160 MHz)" + InterfaceRfChannelLabelNr156025160MHz string = "15 (6025/160 MHz)" + + // InterfaceRfChannelLabelNr17603520MHz captures enum value "17 (6035/20 MHz)" + InterfaceRfChannelLabelNr17603520MHz string = "17 (6035/20 MHz)" + + // InterfaceRfChannelLabelNr19604540MHz captures enum value "19 (6045/40 MHz)" + InterfaceRfChannelLabelNr19604540MHz string = "19 (6045/40 MHz)" + + // InterfaceRfChannelLabelNr21605520MHz captures enum value "21 (6055/20 MHz)" + InterfaceRfChannelLabelNr21605520MHz string = "21 (6055/20 MHz)" + + // InterfaceRfChannelLabelNr23606580MHz captures enum value "23 (6065/80 MHz)" + InterfaceRfChannelLabelNr23606580MHz string = "23 (6065/80 MHz)" + + // InterfaceRfChannelLabelNr25607520MHz captures enum value "25 (6075/20 MHz)" + InterfaceRfChannelLabelNr25607520MHz string = "25 (6075/20 MHz)" + + // InterfaceRfChannelLabelNr27608540MHz captures enum value "27 (6085/40 MHz)" + InterfaceRfChannelLabelNr27608540MHz string = "27 (6085/40 MHz)" + + // InterfaceRfChannelLabelNr29609520MHz captures enum value "29 (6095/20 MHz)" + InterfaceRfChannelLabelNr29609520MHz string = "29 (6095/20 MHz)" + + // InterfaceRfChannelLabelNr316105320MHz captures enum value "31 (6105/320 MHz)" + InterfaceRfChannelLabelNr316105320MHz string = "31 (6105/320 MHz)" + + // InterfaceRfChannelLabelNr33611520MHz captures enum value "33 (6115/20 MHz)" + InterfaceRfChannelLabelNr33611520MHz string = "33 (6115/20 MHz)" + + // InterfaceRfChannelLabelNr35612540MHz captures enum value "35 (6125/40 MHz)" + InterfaceRfChannelLabelNr35612540MHz string = "35 (6125/40 MHz)" + + // InterfaceRfChannelLabelNr37613520MHz captures enum value "37 (6135/20 MHz)" + InterfaceRfChannelLabelNr37613520MHz string = "37 (6135/20 MHz)" + + // InterfaceRfChannelLabelNr39614580MHz captures enum value "39 (6145/80 MHz)" + InterfaceRfChannelLabelNr39614580MHz string = "39 (6145/80 MHz)" + + // InterfaceRfChannelLabelNr41615520MHz captures enum value "41 (6155/20 MHz)" + InterfaceRfChannelLabelNr41615520MHz string = "41 (6155/20 MHz)" + + // InterfaceRfChannelLabelNr43616540MHz captures enum value "43 (6165/40 MHz)" + InterfaceRfChannelLabelNr43616540MHz string = "43 (6165/40 MHz)" + + // InterfaceRfChannelLabelNr45617520MHz captures enum value "45 (6175/20 MHz)" + InterfaceRfChannelLabelNr45617520MHz string = "45 (6175/20 MHz)" + + // InterfaceRfChannelLabelNr476185160MHz captures enum value "47 (6185/160 MHz)" + InterfaceRfChannelLabelNr476185160MHz string = "47 (6185/160 MHz)" + + // InterfaceRfChannelLabelNr49619520MHz captures enum value "49 (6195/20 MHz)" + InterfaceRfChannelLabelNr49619520MHz string = "49 (6195/20 MHz)" + + // InterfaceRfChannelLabelNr51620540MHz captures enum value "51 (6205/40 MHz)" + InterfaceRfChannelLabelNr51620540MHz string = "51 (6205/40 MHz)" + + // InterfaceRfChannelLabelNr53621520MHz captures enum value "53 (6215/20 MHz)" + InterfaceRfChannelLabelNr53621520MHz string = "53 (6215/20 MHz)" + + // InterfaceRfChannelLabelNr55622580MHz captures enum value "55 (6225/80 MHz)" + InterfaceRfChannelLabelNr55622580MHz string = "55 (6225/80 MHz)" + + // InterfaceRfChannelLabelNr57623520MHz captures enum value "57 (6235/20 MHz)" + InterfaceRfChannelLabelNr57623520MHz string = "57 (6235/20 MHz)" + + // InterfaceRfChannelLabelNr59624540MHz captures enum value "59 (6245/40 MHz)" + InterfaceRfChannelLabelNr59624540MHz string = "59 (6245/40 MHz)" + + // InterfaceRfChannelLabelNr61625520MHz captures enum value "61 (6255/20 MHz)" + InterfaceRfChannelLabelNr61625520MHz string = "61 (6255/20 MHz)" + + // InterfaceRfChannelLabelNr65627520MHz captures enum value "65 (6275/20 MHz)" + InterfaceRfChannelLabelNr65627520MHz string = "65 (6275/20 MHz)" + + // InterfaceRfChannelLabelNr67628540MHz captures enum value "67 (6285/40 MHz)" + InterfaceRfChannelLabelNr67628540MHz string = "67 (6285/40 MHz)" + + // InterfaceRfChannelLabelNr69629520MHz captures enum value "69 (6295/20 MHz)" + InterfaceRfChannelLabelNr69629520MHz string = "69 (6295/20 MHz)" + + // InterfaceRfChannelLabelNr71630580MHz captures enum value "71 (6305/80 MHz)" + InterfaceRfChannelLabelNr71630580MHz string = "71 (6305/80 MHz)" + + // InterfaceRfChannelLabelNr73631520MHz captures enum value "73 (6315/20 MHz)" + InterfaceRfChannelLabelNr73631520MHz string = "73 (6315/20 MHz)" + + // InterfaceRfChannelLabelNr75632540MHz captures enum value "75 (6325/40 MHz)" + InterfaceRfChannelLabelNr75632540MHz string = "75 (6325/40 MHz)" + + // InterfaceRfChannelLabelNr77633520MHz captures enum value "77 (6335/20 MHz)" + InterfaceRfChannelLabelNr77633520MHz string = "77 (6335/20 MHz)" + + // InterfaceRfChannelLabelNr796345160MHz captures enum value "79 (6345/160 MHz)" + InterfaceRfChannelLabelNr796345160MHz string = "79 (6345/160 MHz)" + + // InterfaceRfChannelLabelNr81635520MHz captures enum value "81 (6355/20 MHz)" + InterfaceRfChannelLabelNr81635520MHz string = "81 (6355/20 MHz)" + + // InterfaceRfChannelLabelNr83636540MHz captures enum value "83 (6365/40 MHz)" + InterfaceRfChannelLabelNr83636540MHz string = "83 (6365/40 MHz)" + + // InterfaceRfChannelLabelNr85637520MHz captures enum value "85 (6375/20 MHz)" + InterfaceRfChannelLabelNr85637520MHz string = "85 (6375/20 MHz)" + + // InterfaceRfChannelLabelNr87638580MHz captures enum value "87 (6385/80 MHz)" + InterfaceRfChannelLabelNr87638580MHz string = "87 (6385/80 MHz)" + + // InterfaceRfChannelLabelNr89639520MHz captures enum value "89 (6395/20 MHz)" + InterfaceRfChannelLabelNr89639520MHz string = "89 (6395/20 MHz)" + + // InterfaceRfChannelLabelNr91640540MHz captures enum value "91 (6405/40 MHz)" + InterfaceRfChannelLabelNr91640540MHz string = "91 (6405/40 MHz)" + + // InterfaceRfChannelLabelNr93641520MHz captures enum value "93 (6415/20 MHz)" + InterfaceRfChannelLabelNr93641520MHz string = "93 (6415/20 MHz)" + + // InterfaceRfChannelLabelNr956425320MHz captures enum value "95 (6425/320 MHz)" + InterfaceRfChannelLabelNr956425320MHz string = "95 (6425/320 MHz)" + + // InterfaceRfChannelLabelNr97643520MHz captures enum value "97 (6435/20 MHz)" + InterfaceRfChannelLabelNr97643520MHz string = "97 (6435/20 MHz)" + + // InterfaceRfChannelLabelNr99644540MHz captures enum value "99 (6445/40 MHz)" + InterfaceRfChannelLabelNr99644540MHz string = "99 (6445/40 MHz)" + + // InterfaceRfChannelLabelNr101645520MHz captures enum value "101 (6455/20 MHz)" + InterfaceRfChannelLabelNr101645520MHz string = "101 (6455/20 MHz)" + + // InterfaceRfChannelLabelNr103646580MHz captures enum value "103 (6465/80 MHz)" + InterfaceRfChannelLabelNr103646580MHz string = "103 (6465/80 MHz)" + + // InterfaceRfChannelLabelNr105647520MHz captures enum value "105 (6475/20 MHz)" + InterfaceRfChannelLabelNr105647520MHz string = "105 (6475/20 MHz)" + + // InterfaceRfChannelLabelNr107648540MHz captures enum value "107 (6485/40 MHz)" + InterfaceRfChannelLabelNr107648540MHz string = "107 (6485/40 MHz)" + + // InterfaceRfChannelLabelNr109649520MHz captures enum value "109 (6495/20 MHz)" + InterfaceRfChannelLabelNr109649520MHz string = "109 (6495/20 MHz)" + + // InterfaceRfChannelLabelNr1116505160MHz captures enum value "111 (6505/160 MHz)" + InterfaceRfChannelLabelNr1116505160MHz string = "111 (6505/160 MHz)" + + // InterfaceRfChannelLabelNr113651520MHz captures enum value "113 (6515/20 MHz)" + InterfaceRfChannelLabelNr113651520MHz string = "113 (6515/20 MHz)" + + // InterfaceRfChannelLabelNr115652540MHz captures enum value "115 (6525/40 MHz)" + InterfaceRfChannelLabelNr115652540MHz string = "115 (6525/40 MHz)" + + // InterfaceRfChannelLabelNr117653520MHz captures enum value "117 (6535/20 MHz)" + InterfaceRfChannelLabelNr117653520MHz string = "117 (6535/20 MHz)" + + // InterfaceRfChannelLabelNr119654580MHz captures enum value "119 (6545/80 MHz)" + InterfaceRfChannelLabelNr119654580MHz string = "119 (6545/80 MHz)" + + // InterfaceRfChannelLabelNr121655520MHz captures enum value "121 (6555/20 MHz)" + InterfaceRfChannelLabelNr121655520MHz string = "121 (6555/20 MHz)" + + // InterfaceRfChannelLabelNr123656540MHz captures enum value "123 (6565/40 MHz)" + InterfaceRfChannelLabelNr123656540MHz string = "123 (6565/40 MHz)" + + // InterfaceRfChannelLabelNr125657520MHz captures enum value "125 (6575/20 MHz)" + InterfaceRfChannelLabelNr125657520MHz string = "125 (6575/20 MHz)" + + // InterfaceRfChannelLabelNr129659520MHz captures enum value "129 (6595/20 MHz)" + InterfaceRfChannelLabelNr129659520MHz string = "129 (6595/20 MHz)" + + // InterfaceRfChannelLabelNr131660540MHz captures enum value "131 (6605/40 MHz)" + InterfaceRfChannelLabelNr131660540MHz string = "131 (6605/40 MHz)" + + // InterfaceRfChannelLabelNr133661520MHz captures enum value "133 (6615/20 MHz)" + InterfaceRfChannelLabelNr133661520MHz string = "133 (6615/20 MHz)" + + // InterfaceRfChannelLabelNr135662580MHz captures enum value "135 (6625/80 MHz)" + InterfaceRfChannelLabelNr135662580MHz string = "135 (6625/80 MHz)" + + // InterfaceRfChannelLabelNr137663520MHz captures enum value "137 (6635/20 MHz)" + InterfaceRfChannelLabelNr137663520MHz string = "137 (6635/20 MHz)" + + // InterfaceRfChannelLabelNr139664540MHz captures enum value "139 (6645/40 MHz)" + InterfaceRfChannelLabelNr139664540MHz string = "139 (6645/40 MHz)" + + // InterfaceRfChannelLabelNr141665520MHz captures enum value "141 (6655/20 MHz)" + InterfaceRfChannelLabelNr141665520MHz string = "141 (6655/20 MHz)" + + // InterfaceRfChannelLabelNr1436665160MHz captures enum value "143 (6665/160 MHz)" + InterfaceRfChannelLabelNr1436665160MHz string = "143 (6665/160 MHz)" + + // InterfaceRfChannelLabelNr145667520MHz captures enum value "145 (6675/20 MHz)" + InterfaceRfChannelLabelNr145667520MHz string = "145 (6675/20 MHz)" + + // InterfaceRfChannelLabelNr147668540MHz captures enum value "147 (6685/40 MHz)" + InterfaceRfChannelLabelNr147668540MHz string = "147 (6685/40 MHz)" + + // InterfaceRfChannelLabelNr149669520MHz captures enum value "149 (6695/20 MHz)" + InterfaceRfChannelLabelNr149669520MHz string = "149 (6695/20 MHz)" + + // InterfaceRfChannelLabelNr151670580MHz captures enum value "151 (6705/80 MHz)" + InterfaceRfChannelLabelNr151670580MHz string = "151 (6705/80 MHz)" + + // InterfaceRfChannelLabelNr153671520MHz captures enum value "153 (6715/20 MHz)" + InterfaceRfChannelLabelNr153671520MHz string = "153 (6715/20 MHz)" + + // InterfaceRfChannelLabelNr155672540MHz captures enum value "155 (6725/40 MHz)" + InterfaceRfChannelLabelNr155672540MHz string = "155 (6725/40 MHz)" + + // InterfaceRfChannelLabelNr157673520MHz captures enum value "157 (6735/20 MHz)" + InterfaceRfChannelLabelNr157673520MHz string = "157 (6735/20 MHz)" + + // InterfaceRfChannelLabelNr1596745320MHz captures enum value "159 (6745/320 MHz)" + InterfaceRfChannelLabelNr1596745320MHz string = "159 (6745/320 MHz)" + + // InterfaceRfChannelLabelNr161675520MHz captures enum value "161 (6755/20 MHz)" + InterfaceRfChannelLabelNr161675520MHz string = "161 (6755/20 MHz)" + + // InterfaceRfChannelLabelNr163676540MHz captures enum value "163 (6765/40 MHz)" + InterfaceRfChannelLabelNr163676540MHz string = "163 (6765/40 MHz)" + + // InterfaceRfChannelLabelNr165677520MHz captures enum value "165 (6775/20 MHz)" + InterfaceRfChannelLabelNr165677520MHz string = "165 (6775/20 MHz)" + + // InterfaceRfChannelLabelNr167678580MHz captures enum value "167 (6785/80 MHz)" + InterfaceRfChannelLabelNr167678580MHz string = "167 (6785/80 MHz)" + + // InterfaceRfChannelLabelNr169679520MHz captures enum value "169 (6795/20 MHz)" + InterfaceRfChannelLabelNr169679520MHz string = "169 (6795/20 MHz)" + + // InterfaceRfChannelLabelNr171680540MHz captures enum value "171 (6805/40 MHz)" + InterfaceRfChannelLabelNr171680540MHz string = "171 (6805/40 MHz)" + + // InterfaceRfChannelLabelNr173681520MHz captures enum value "173 (6815/20 MHz)" + InterfaceRfChannelLabelNr173681520MHz string = "173 (6815/20 MHz)" + + // InterfaceRfChannelLabelNr1756825160MHz captures enum value "175 (6825/160 MHz)" + InterfaceRfChannelLabelNr1756825160MHz string = "175 (6825/160 MHz)" + + // InterfaceRfChannelLabelNr177683520MHz captures enum value "177 (6835/20 MHz)" + InterfaceRfChannelLabelNr177683520MHz string = "177 (6835/20 MHz)" + + // InterfaceRfChannelLabelNr179684540MHz captures enum value "179 (6845/40 MHz)" + InterfaceRfChannelLabelNr179684540MHz string = "179 (6845/40 MHz)" + + // InterfaceRfChannelLabelNr181685520MHz captures enum value "181 (6855/20 MHz)" + InterfaceRfChannelLabelNr181685520MHz string = "181 (6855/20 MHz)" + + // InterfaceRfChannelLabelNr183686580MHz captures enum value "183 (6865/80 MHz)" + InterfaceRfChannelLabelNr183686580MHz string = "183 (6865/80 MHz)" + + // InterfaceRfChannelLabelNr185687520MHz captures enum value "185 (6875/20 MHz)" + InterfaceRfChannelLabelNr185687520MHz string = "185 (6875/20 MHz)" + + // InterfaceRfChannelLabelNr187688540MHz captures enum value "187 (6885/40 MHz)" + InterfaceRfChannelLabelNr187688540MHz string = "187 (6885/40 MHz)" + + // InterfaceRfChannelLabelNr189689520MHz captures enum value "189 (6895/20 MHz)" + InterfaceRfChannelLabelNr189689520MHz string = "189 (6895/20 MHz)" + + // InterfaceRfChannelLabelNr193691520MHz captures enum value "193 (6915/20 MHz)" + InterfaceRfChannelLabelNr193691520MHz string = "193 (6915/20 MHz)" + + // InterfaceRfChannelLabelNr195692540MHz captures enum value "195 (6925/40 MHz)" + InterfaceRfChannelLabelNr195692540MHz string = "195 (6925/40 MHz)" + + // InterfaceRfChannelLabelNr197693520MHz captures enum value "197 (6935/20 MHz)" + InterfaceRfChannelLabelNr197693520MHz string = "197 (6935/20 MHz)" + + // InterfaceRfChannelLabelNr199694580MHz captures enum value "199 (6945/80 MHz)" + InterfaceRfChannelLabelNr199694580MHz string = "199 (6945/80 MHz)" + + // InterfaceRfChannelLabelNr201695520MHz captures enum value "201 (6955/20 MHz)" + InterfaceRfChannelLabelNr201695520MHz string = "201 (6955/20 MHz)" + + // InterfaceRfChannelLabelNr203696540MHz captures enum value "203 (6965/40 MHz)" + InterfaceRfChannelLabelNr203696540MHz string = "203 (6965/40 MHz)" + + // InterfaceRfChannelLabelNr205697520MHz captures enum value "205 (6975/20 MHz)" + InterfaceRfChannelLabelNr205697520MHz string = "205 (6975/20 MHz)" + + // InterfaceRfChannelLabelNr2076985160MHz captures enum value "207 (6985/160 MHz)" + InterfaceRfChannelLabelNr2076985160MHz string = "207 (6985/160 MHz)" + + // InterfaceRfChannelLabelNr209699520MHz captures enum value "209 (6995/20 MHz)" + InterfaceRfChannelLabelNr209699520MHz string = "209 (6995/20 MHz)" + + // InterfaceRfChannelLabelNr211700540MHz captures enum value "211 (7005/40 MHz)" + InterfaceRfChannelLabelNr211700540MHz string = "211 (7005/40 MHz)" + + // InterfaceRfChannelLabelNr213701520MHz captures enum value "213 (7015/20 MHz)" + InterfaceRfChannelLabelNr213701520MHz string = "213 (7015/20 MHz)" + + // InterfaceRfChannelLabelNr215702580MHz captures enum value "215 (7025/80 MHz)" + InterfaceRfChannelLabelNr215702580MHz string = "215 (7025/80 MHz)" + + // InterfaceRfChannelLabelNr217703520MHz captures enum value "217 (7035/20 MHz)" + InterfaceRfChannelLabelNr217703520MHz string = "217 (7035/20 MHz)" + + // InterfaceRfChannelLabelNr219704540MHz captures enum value "219 (7045/40 MHz)" + InterfaceRfChannelLabelNr219704540MHz string = "219 (7045/40 MHz)" + + // InterfaceRfChannelLabelNr221705520MHz captures enum value "221 (7055/20 MHz)" + InterfaceRfChannelLabelNr221705520MHz string = "221 (7055/20 MHz)" + + // InterfaceRfChannelLabelNr225707520MHz captures enum value "225 (7075/20 MHz)" + InterfaceRfChannelLabelNr225707520MHz string = "225 (7075/20 MHz)" + + // InterfaceRfChannelLabelNr227708540MHz captures enum value "227 (7085/40 MHz)" + InterfaceRfChannelLabelNr227708540MHz string = "227 (7085/40 MHz)" + + // InterfaceRfChannelLabelNr229709520MHz captures enum value "229 (7095/20 MHz)" + InterfaceRfChannelLabelNr229709520MHz string = "229 (7095/20 MHz)" + + // InterfaceRfChannelLabelNr233711520MHz captures enum value "233 (7115/20 MHz)" + InterfaceRfChannelLabelNr233711520MHz string = "233 (7115/20 MHz)" + + // InterfaceRfChannelLabelNr158Dot322Dot16GHz captures enum value "1 (58.32/2.16 GHz)" + InterfaceRfChannelLabelNr158Dot322Dot16GHz string = "1 (58.32/2.16 GHz)" + + // InterfaceRfChannelLabelNr260Dot482Dot16GHz captures enum value "2 (60.48/2.16 GHz)" + InterfaceRfChannelLabelNr260Dot482Dot16GHz string = "2 (60.48/2.16 GHz)" + + // InterfaceRfChannelLabelNr362Dot642Dot16GHz captures enum value "3 (62.64/2.16 GHz)" + InterfaceRfChannelLabelNr362Dot642Dot16GHz string = "3 (62.64/2.16 GHz)" + + // InterfaceRfChannelLabelNr464Dot802Dot16GHz captures enum value "4 (64.80/2.16 GHz)" + InterfaceRfChannelLabelNr464Dot802Dot16GHz string = "4 (64.80/2.16 GHz)" + + // InterfaceRfChannelLabelNr566Dot962Dot16GHz captures enum value "5 (66.96/2.16 GHz)" + InterfaceRfChannelLabelNr566Dot962Dot16GHz string = "5 (66.96/2.16 GHz)" + + // InterfaceRfChannelLabelNr669Dot122Dot16GHz captures enum value "6 (69.12/2.16 GHz)" + InterfaceRfChannelLabelNr669Dot122Dot16GHz string = "6 (69.12/2.16 GHz)" + + // InterfaceRfChannelLabelNr959Dot404Dot32GHz captures enum value "9 (59.40/4.32 GHz)" + InterfaceRfChannelLabelNr959Dot404Dot32GHz string = "9 (59.40/4.32 GHz)" + + // InterfaceRfChannelLabelNr1061Dot564Dot32GHz captures enum value "10 (61.56/4.32 GHz)" + InterfaceRfChannelLabelNr1061Dot564Dot32GHz string = "10 (61.56/4.32 GHz)" + + // InterfaceRfChannelLabelNr1163Dot724Dot32GHz captures enum value "11 (63.72/4.32 GHz)" + InterfaceRfChannelLabelNr1163Dot724Dot32GHz string = "11 (63.72/4.32 GHz)" + + // InterfaceRfChannelLabelNr1265Dot884Dot32GHz captures enum value "12 (65.88/4.32 GHz)" + InterfaceRfChannelLabelNr1265Dot884Dot32GHz string = "12 (65.88/4.32 GHz)" + + // InterfaceRfChannelLabelNr1368Dot044Dot32GHz captures enum value "13 (68.04/4.32 GHz)" + InterfaceRfChannelLabelNr1368Dot044Dot32GHz string = "13 (68.04/4.32 GHz)" + + // InterfaceRfChannelLabelNr1760Dot486Dot48GHz captures enum value "17 (60.48/6.48 GHz)" + InterfaceRfChannelLabelNr1760Dot486Dot48GHz string = "17 (60.48/6.48 GHz)" + + // InterfaceRfChannelLabelNr1862Dot646Dot48GHz captures enum value "18 (62.64/6.48 GHz)" + InterfaceRfChannelLabelNr1862Dot646Dot48GHz string = "18 (62.64/6.48 GHz)" + + // InterfaceRfChannelLabelNr1964Dot806Dot48GHz captures enum value "19 (64.80/6.48 GHz)" + InterfaceRfChannelLabelNr1964Dot806Dot48GHz string = "19 (64.80/6.48 GHz)" + + // InterfaceRfChannelLabelNr2066Dot966Dot48GHz captures enum value "20 (66.96/6.48 GHz)" + InterfaceRfChannelLabelNr2066Dot966Dot48GHz string = "20 (66.96/6.48 GHz)" + + // InterfaceRfChannelLabelNr2561Dot568Dot64GHz captures enum value "25 (61.56/8.64 GHz)" + InterfaceRfChannelLabelNr2561Dot568Dot64GHz string = "25 (61.56/8.64 GHz)" + + // InterfaceRfChannelLabelNr2663Dot728Dot64GHz captures enum value "26 (63.72/8.64 GHz)" + InterfaceRfChannelLabelNr2663Dot728Dot64GHz string = "26 (63.72/8.64 GHz)" + + // InterfaceRfChannelLabelNr2765Dot888Dot64GHz captures enum value "27 (65.88/8.64 GHz)" + InterfaceRfChannelLabelNr2765Dot888Dot64GHz string = "27 (65.88/8.64 GHz)" +) + +// prop value enum +func (m *InterfaceRfChannel) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceRfChannelTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *InterfaceRfChannel) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("rf_channel"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("rf_channel"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var interfaceRfChannelTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["2.4g-1-2412-22","2.4g-2-2417-22","2.4g-3-2422-22","2.4g-4-2427-22","2.4g-5-2432-22","2.4g-6-2437-22","2.4g-7-2442-22","2.4g-8-2447-22","2.4g-9-2452-22","2.4g-10-2457-22","2.4g-11-2462-22","2.4g-12-2467-22","2.4g-13-2472-22","5g-32-5160-20","5g-34-5170-40","5g-36-5180-20","5g-38-5190-40","5g-40-5200-20","5g-42-5210-80","5g-44-5220-20","5g-46-5230-40","5g-48-5240-20","5g-50-5250-160","5g-52-5260-20","5g-54-5270-40","5g-56-5280-20","5g-58-5290-80","5g-60-5300-20","5g-62-5310-40","5g-64-5320-20","5g-100-5500-20","5g-102-5510-40","5g-104-5520-20","5g-106-5530-80","5g-108-5540-20","5g-110-5550-40","5g-112-5560-20","5g-114-5570-160","5g-116-5580-20","5g-118-5590-40","5g-120-5600-20","5g-122-5610-80","5g-124-5620-20","5g-126-5630-40","5g-128-5640-20","5g-132-5660-20","5g-134-5670-40","5g-136-5680-20","5g-138-5690-80","5g-140-5700-20","5g-142-5710-40","5g-144-5720-20","5g-149-5745-20","5g-151-5755-40","5g-153-5765-20","5g-155-5775-80","5g-157-5785-20","5g-159-5795-40","5g-161-5805-20","5g-163-5815-160","5g-165-5825-20","5g-167-5835-40","5g-169-5845-20","5g-171-5855-80","5g-173-5865-20","5g-175-5875-40","5g-177-5885-20","6g-1-5955-20","6g-3-5965-40","6g-5-5975-20","6g-7-5985-80","6g-9-5995-20","6g-11-6005-40","6g-13-6015-20","6g-15-6025-160","6g-17-6035-20","6g-19-6045-40","6g-21-6055-20","6g-23-6065-80","6g-25-6075-20","6g-27-6085-40","6g-29-6095-20","6g-31-6105-320","6g-33-6115-20","6g-35-6125-40","6g-37-6135-20","6g-39-6145-80","6g-41-6155-20","6g-43-6165-40","6g-45-6175-20","6g-47-6185-160","6g-49-6195-20","6g-51-6205-40","6g-53-6215-20","6g-55-6225-80","6g-57-6235-20","6g-59-6245-40","6g-61-6255-20","6g-65-6275-20","6g-67-6285-40","6g-69-6295-20","6g-71-6305-80","6g-73-6315-20","6g-75-6325-40","6g-77-6335-20","6g-79-6345-160","6g-81-6355-20","6g-83-6365-40","6g-85-6375-20","6g-87-6385-80","6g-89-6395-20","6g-91-6405-40","6g-93-6415-20","6g-95-6425-320","6g-97-6435-20","6g-99-6445-40","6g-101-6455-20","6g-103-6465-80","6g-105-6475-20","6g-107-6485-40","6g-109-6495-20","6g-111-6505-160","6g-113-6515-20","6g-115-6525-40","6g-117-6535-20","6g-119-6545-80","6g-121-6555-20","6g-123-6565-40","6g-125-6575-20","6g-129-6595-20","6g-131-6605-40","6g-133-6615-20","6g-135-6625-80","6g-137-6635-20","6g-139-6645-40","6g-141-6655-20","6g-143-6665-160","6g-145-6675-20","6g-147-6685-40","6g-149-6695-20","6g-151-6705-80","6g-153-6715-20","6g-155-6725-40","6g-157-6735-20","6g-159-6745-320","6g-161-6755-20","6g-163-6765-40","6g-165-6775-20","6g-167-6785-80","6g-169-6795-20","6g-171-6805-40","6g-173-6815-20","6g-175-6825-160","6g-177-6835-20","6g-179-6845-40","6g-181-6855-20","6g-183-6865-80","6g-185-6875-20","6g-187-6885-40","6g-189-6895-20","6g-193-6915-20","6g-195-6925-40","6g-197-6935-20","6g-199-6945-80","6g-201-6955-20","6g-203-6965-40","6g-205-6975-20","6g-207-6985-160","6g-209-6995-20","6g-211-7005-40","6g-213-7015-20","6g-215-7025-80","6g-217-7035-20","6g-219-7045-40","6g-221-7055-20","6g-225-7075-20","6g-227-7085-40","6g-229-7095-20","6g-233-7115-20","60g-1-58320-2160","60g-2-60480-2160","60g-3-62640-2160","60g-4-64800-2160","60g-5-66960-2160","60g-6-69120-2160","60g-9-59400-4320","60g-10-61560-4320","60g-11-63720-4320","60g-12-65880-4320","60g-13-68040-4320","60g-17-60480-6480","60g-18-62640-6480","60g-19-64800-6480","60g-20-66960-6480","60g-25-61560-6480","60g-26-63720-6480","60g-27-65880-6480"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + interfaceRfChannelTypeValuePropEnum = append(interfaceRfChannelTypeValuePropEnum, v) + } +} + +const ( + + // InterfaceRfChannelValueNr2Dot4gDash1Dash2412Dash22 captures enum value "2.4g-1-2412-22" + InterfaceRfChannelValueNr2Dot4gDash1Dash2412Dash22 string = "2.4g-1-2412-22" + + // InterfaceRfChannelValueNr2Dot4gDash2Dash2417Dash22 captures enum value "2.4g-2-2417-22" + InterfaceRfChannelValueNr2Dot4gDash2Dash2417Dash22 string = "2.4g-2-2417-22" + + // InterfaceRfChannelValueNr2Dot4gDash3Dash2422Dash22 captures enum value "2.4g-3-2422-22" + InterfaceRfChannelValueNr2Dot4gDash3Dash2422Dash22 string = "2.4g-3-2422-22" + + // InterfaceRfChannelValueNr2Dot4gDash4Dash2427Dash22 captures enum value "2.4g-4-2427-22" + InterfaceRfChannelValueNr2Dot4gDash4Dash2427Dash22 string = "2.4g-4-2427-22" + + // InterfaceRfChannelValueNr2Dot4gDash5Dash2432Dash22 captures enum value "2.4g-5-2432-22" + InterfaceRfChannelValueNr2Dot4gDash5Dash2432Dash22 string = "2.4g-5-2432-22" + + // InterfaceRfChannelValueNr2Dot4gDash6Dash2437Dash22 captures enum value "2.4g-6-2437-22" + InterfaceRfChannelValueNr2Dot4gDash6Dash2437Dash22 string = "2.4g-6-2437-22" + + // InterfaceRfChannelValueNr2Dot4gDash7Dash2442Dash22 captures enum value "2.4g-7-2442-22" + InterfaceRfChannelValueNr2Dot4gDash7Dash2442Dash22 string = "2.4g-7-2442-22" + + // InterfaceRfChannelValueNr2Dot4gDash8Dash2447Dash22 captures enum value "2.4g-8-2447-22" + InterfaceRfChannelValueNr2Dot4gDash8Dash2447Dash22 string = "2.4g-8-2447-22" + + // InterfaceRfChannelValueNr2Dot4gDash9Dash2452Dash22 captures enum value "2.4g-9-2452-22" + InterfaceRfChannelValueNr2Dot4gDash9Dash2452Dash22 string = "2.4g-9-2452-22" + + // InterfaceRfChannelValueNr2Dot4gDash10Dash2457Dash22 captures enum value "2.4g-10-2457-22" + InterfaceRfChannelValueNr2Dot4gDash10Dash2457Dash22 string = "2.4g-10-2457-22" + + // InterfaceRfChannelValueNr2Dot4gDash11Dash2462Dash22 captures enum value "2.4g-11-2462-22" + InterfaceRfChannelValueNr2Dot4gDash11Dash2462Dash22 string = "2.4g-11-2462-22" + + // InterfaceRfChannelValueNr2Dot4gDash12Dash2467Dash22 captures enum value "2.4g-12-2467-22" + InterfaceRfChannelValueNr2Dot4gDash12Dash2467Dash22 string = "2.4g-12-2467-22" + + // InterfaceRfChannelValueNr2Dot4gDash13Dash2472Dash22 captures enum value "2.4g-13-2472-22" + InterfaceRfChannelValueNr2Dot4gDash13Dash2472Dash22 string = "2.4g-13-2472-22" + + // InterfaceRfChannelValueNr5gDash32Dash5160Dash20 captures enum value "5g-32-5160-20" + InterfaceRfChannelValueNr5gDash32Dash5160Dash20 string = "5g-32-5160-20" + + // InterfaceRfChannelValueNr5gDash34Dash5170Dash40 captures enum value "5g-34-5170-40" + InterfaceRfChannelValueNr5gDash34Dash5170Dash40 string = "5g-34-5170-40" + + // InterfaceRfChannelValueNr5gDash36Dash5180Dash20 captures enum value "5g-36-5180-20" + InterfaceRfChannelValueNr5gDash36Dash5180Dash20 string = "5g-36-5180-20" + + // InterfaceRfChannelValueNr5gDash38Dash5190Dash40 captures enum value "5g-38-5190-40" + InterfaceRfChannelValueNr5gDash38Dash5190Dash40 string = "5g-38-5190-40" + + // InterfaceRfChannelValueNr5gDash40Dash5200Dash20 captures enum value "5g-40-5200-20" + InterfaceRfChannelValueNr5gDash40Dash5200Dash20 string = "5g-40-5200-20" + + // InterfaceRfChannelValueNr5gDash42Dash5210Dash80 captures enum value "5g-42-5210-80" + InterfaceRfChannelValueNr5gDash42Dash5210Dash80 string = "5g-42-5210-80" + + // InterfaceRfChannelValueNr5gDash44Dash5220Dash20 captures enum value "5g-44-5220-20" + InterfaceRfChannelValueNr5gDash44Dash5220Dash20 string = "5g-44-5220-20" + + // InterfaceRfChannelValueNr5gDash46Dash5230Dash40 captures enum value "5g-46-5230-40" + InterfaceRfChannelValueNr5gDash46Dash5230Dash40 string = "5g-46-5230-40" + + // InterfaceRfChannelValueNr5gDash48Dash5240Dash20 captures enum value "5g-48-5240-20" + InterfaceRfChannelValueNr5gDash48Dash5240Dash20 string = "5g-48-5240-20" + + // InterfaceRfChannelValueNr5gDash50Dash5250Dash160 captures enum value "5g-50-5250-160" + InterfaceRfChannelValueNr5gDash50Dash5250Dash160 string = "5g-50-5250-160" + + // InterfaceRfChannelValueNr5gDash52Dash5260Dash20 captures enum value "5g-52-5260-20" + InterfaceRfChannelValueNr5gDash52Dash5260Dash20 string = "5g-52-5260-20" + + // InterfaceRfChannelValueNr5gDash54Dash5270Dash40 captures enum value "5g-54-5270-40" + InterfaceRfChannelValueNr5gDash54Dash5270Dash40 string = "5g-54-5270-40" + + // InterfaceRfChannelValueNr5gDash56Dash5280Dash20 captures enum value "5g-56-5280-20" + InterfaceRfChannelValueNr5gDash56Dash5280Dash20 string = "5g-56-5280-20" + + // InterfaceRfChannelValueNr5gDash58Dash5290Dash80 captures enum value "5g-58-5290-80" + InterfaceRfChannelValueNr5gDash58Dash5290Dash80 string = "5g-58-5290-80" + + // InterfaceRfChannelValueNr5gDash60Dash5300Dash20 captures enum value "5g-60-5300-20" + InterfaceRfChannelValueNr5gDash60Dash5300Dash20 string = "5g-60-5300-20" + + // InterfaceRfChannelValueNr5gDash62Dash5310Dash40 captures enum value "5g-62-5310-40" + InterfaceRfChannelValueNr5gDash62Dash5310Dash40 string = "5g-62-5310-40" + + // InterfaceRfChannelValueNr5gDash64Dash5320Dash20 captures enum value "5g-64-5320-20" + InterfaceRfChannelValueNr5gDash64Dash5320Dash20 string = "5g-64-5320-20" + + // InterfaceRfChannelValueNr5gDash100Dash5500Dash20 captures enum value "5g-100-5500-20" + InterfaceRfChannelValueNr5gDash100Dash5500Dash20 string = "5g-100-5500-20" + + // InterfaceRfChannelValueNr5gDash102Dash5510Dash40 captures enum value "5g-102-5510-40" + InterfaceRfChannelValueNr5gDash102Dash5510Dash40 string = "5g-102-5510-40" + + // InterfaceRfChannelValueNr5gDash104Dash5520Dash20 captures enum value "5g-104-5520-20" + InterfaceRfChannelValueNr5gDash104Dash5520Dash20 string = "5g-104-5520-20" + + // InterfaceRfChannelValueNr5gDash106Dash5530Dash80 captures enum value "5g-106-5530-80" + InterfaceRfChannelValueNr5gDash106Dash5530Dash80 string = "5g-106-5530-80" + + // InterfaceRfChannelValueNr5gDash108Dash5540Dash20 captures enum value "5g-108-5540-20" + InterfaceRfChannelValueNr5gDash108Dash5540Dash20 string = "5g-108-5540-20" + + // InterfaceRfChannelValueNr5gDash110Dash5550Dash40 captures enum value "5g-110-5550-40" + InterfaceRfChannelValueNr5gDash110Dash5550Dash40 string = "5g-110-5550-40" + + // InterfaceRfChannelValueNr5gDash112Dash5560Dash20 captures enum value "5g-112-5560-20" + InterfaceRfChannelValueNr5gDash112Dash5560Dash20 string = "5g-112-5560-20" + + // InterfaceRfChannelValueNr5gDash114Dash5570Dash160 captures enum value "5g-114-5570-160" + InterfaceRfChannelValueNr5gDash114Dash5570Dash160 string = "5g-114-5570-160" + + // InterfaceRfChannelValueNr5gDash116Dash5580Dash20 captures enum value "5g-116-5580-20" + InterfaceRfChannelValueNr5gDash116Dash5580Dash20 string = "5g-116-5580-20" + + // InterfaceRfChannelValueNr5gDash118Dash5590Dash40 captures enum value "5g-118-5590-40" + InterfaceRfChannelValueNr5gDash118Dash5590Dash40 string = "5g-118-5590-40" + + // InterfaceRfChannelValueNr5gDash120Dash5600Dash20 captures enum value "5g-120-5600-20" + InterfaceRfChannelValueNr5gDash120Dash5600Dash20 string = "5g-120-5600-20" + + // InterfaceRfChannelValueNr5gDash122Dash5610Dash80 captures enum value "5g-122-5610-80" + InterfaceRfChannelValueNr5gDash122Dash5610Dash80 string = "5g-122-5610-80" + + // InterfaceRfChannelValueNr5gDash124Dash5620Dash20 captures enum value "5g-124-5620-20" + InterfaceRfChannelValueNr5gDash124Dash5620Dash20 string = "5g-124-5620-20" + + // InterfaceRfChannelValueNr5gDash126Dash5630Dash40 captures enum value "5g-126-5630-40" + InterfaceRfChannelValueNr5gDash126Dash5630Dash40 string = "5g-126-5630-40" + + // InterfaceRfChannelValueNr5gDash128Dash5640Dash20 captures enum value "5g-128-5640-20" + InterfaceRfChannelValueNr5gDash128Dash5640Dash20 string = "5g-128-5640-20" + + // InterfaceRfChannelValueNr5gDash132Dash5660Dash20 captures enum value "5g-132-5660-20" + InterfaceRfChannelValueNr5gDash132Dash5660Dash20 string = "5g-132-5660-20" + + // InterfaceRfChannelValueNr5gDash134Dash5670Dash40 captures enum value "5g-134-5670-40" + InterfaceRfChannelValueNr5gDash134Dash5670Dash40 string = "5g-134-5670-40" + + // InterfaceRfChannelValueNr5gDash136Dash5680Dash20 captures enum value "5g-136-5680-20" + InterfaceRfChannelValueNr5gDash136Dash5680Dash20 string = "5g-136-5680-20" + + // InterfaceRfChannelValueNr5gDash138Dash5690Dash80 captures enum value "5g-138-5690-80" + InterfaceRfChannelValueNr5gDash138Dash5690Dash80 string = "5g-138-5690-80" + + // InterfaceRfChannelValueNr5gDash140Dash5700Dash20 captures enum value "5g-140-5700-20" + InterfaceRfChannelValueNr5gDash140Dash5700Dash20 string = "5g-140-5700-20" + + // InterfaceRfChannelValueNr5gDash142Dash5710Dash40 captures enum value "5g-142-5710-40" + InterfaceRfChannelValueNr5gDash142Dash5710Dash40 string = "5g-142-5710-40" + + // InterfaceRfChannelValueNr5gDash144Dash5720Dash20 captures enum value "5g-144-5720-20" + InterfaceRfChannelValueNr5gDash144Dash5720Dash20 string = "5g-144-5720-20" + + // InterfaceRfChannelValueNr5gDash149Dash5745Dash20 captures enum value "5g-149-5745-20" + InterfaceRfChannelValueNr5gDash149Dash5745Dash20 string = "5g-149-5745-20" + + // InterfaceRfChannelValueNr5gDash151Dash5755Dash40 captures enum value "5g-151-5755-40" + InterfaceRfChannelValueNr5gDash151Dash5755Dash40 string = "5g-151-5755-40" + + // InterfaceRfChannelValueNr5gDash153Dash5765Dash20 captures enum value "5g-153-5765-20" + InterfaceRfChannelValueNr5gDash153Dash5765Dash20 string = "5g-153-5765-20" + + // InterfaceRfChannelValueNr5gDash155Dash5775Dash80 captures enum value "5g-155-5775-80" + InterfaceRfChannelValueNr5gDash155Dash5775Dash80 string = "5g-155-5775-80" + + // InterfaceRfChannelValueNr5gDash157Dash5785Dash20 captures enum value "5g-157-5785-20" + InterfaceRfChannelValueNr5gDash157Dash5785Dash20 string = "5g-157-5785-20" + + // InterfaceRfChannelValueNr5gDash159Dash5795Dash40 captures enum value "5g-159-5795-40" + InterfaceRfChannelValueNr5gDash159Dash5795Dash40 string = "5g-159-5795-40" + + // InterfaceRfChannelValueNr5gDash161Dash5805Dash20 captures enum value "5g-161-5805-20" + InterfaceRfChannelValueNr5gDash161Dash5805Dash20 string = "5g-161-5805-20" + + // InterfaceRfChannelValueNr5gDash163Dash5815Dash160 captures enum value "5g-163-5815-160" + InterfaceRfChannelValueNr5gDash163Dash5815Dash160 string = "5g-163-5815-160" + + // InterfaceRfChannelValueNr5gDash165Dash5825Dash20 captures enum value "5g-165-5825-20" + InterfaceRfChannelValueNr5gDash165Dash5825Dash20 string = "5g-165-5825-20" + + // InterfaceRfChannelValueNr5gDash167Dash5835Dash40 captures enum value "5g-167-5835-40" + InterfaceRfChannelValueNr5gDash167Dash5835Dash40 string = "5g-167-5835-40" + + // InterfaceRfChannelValueNr5gDash169Dash5845Dash20 captures enum value "5g-169-5845-20" + InterfaceRfChannelValueNr5gDash169Dash5845Dash20 string = "5g-169-5845-20" + + // InterfaceRfChannelValueNr5gDash171Dash5855Dash80 captures enum value "5g-171-5855-80" + InterfaceRfChannelValueNr5gDash171Dash5855Dash80 string = "5g-171-5855-80" + + // InterfaceRfChannelValueNr5gDash173Dash5865Dash20 captures enum value "5g-173-5865-20" + InterfaceRfChannelValueNr5gDash173Dash5865Dash20 string = "5g-173-5865-20" + + // InterfaceRfChannelValueNr5gDash175Dash5875Dash40 captures enum value "5g-175-5875-40" + InterfaceRfChannelValueNr5gDash175Dash5875Dash40 string = "5g-175-5875-40" + + // InterfaceRfChannelValueNr5gDash177Dash5885Dash20 captures enum value "5g-177-5885-20" + InterfaceRfChannelValueNr5gDash177Dash5885Dash20 string = "5g-177-5885-20" + + // InterfaceRfChannelValueNr6gDash1Dash5955Dash20 captures enum value "6g-1-5955-20" + InterfaceRfChannelValueNr6gDash1Dash5955Dash20 string = "6g-1-5955-20" + + // InterfaceRfChannelValueNr6gDash3Dash5965Dash40 captures enum value "6g-3-5965-40" + InterfaceRfChannelValueNr6gDash3Dash5965Dash40 string = "6g-3-5965-40" + + // InterfaceRfChannelValueNr6gDash5Dash5975Dash20 captures enum value "6g-5-5975-20" + InterfaceRfChannelValueNr6gDash5Dash5975Dash20 string = "6g-5-5975-20" + + // InterfaceRfChannelValueNr6gDash7Dash5985Dash80 captures enum value "6g-7-5985-80" + InterfaceRfChannelValueNr6gDash7Dash5985Dash80 string = "6g-7-5985-80" + + // InterfaceRfChannelValueNr6gDash9Dash5995Dash20 captures enum value "6g-9-5995-20" + InterfaceRfChannelValueNr6gDash9Dash5995Dash20 string = "6g-9-5995-20" + + // InterfaceRfChannelValueNr6gDash11Dash6005Dash40 captures enum value "6g-11-6005-40" + InterfaceRfChannelValueNr6gDash11Dash6005Dash40 string = "6g-11-6005-40" + + // InterfaceRfChannelValueNr6gDash13Dash6015Dash20 captures enum value "6g-13-6015-20" + InterfaceRfChannelValueNr6gDash13Dash6015Dash20 string = "6g-13-6015-20" + + // InterfaceRfChannelValueNr6gDash15Dash6025Dash160 captures enum value "6g-15-6025-160" + InterfaceRfChannelValueNr6gDash15Dash6025Dash160 string = "6g-15-6025-160" + + // InterfaceRfChannelValueNr6gDash17Dash6035Dash20 captures enum value "6g-17-6035-20" + InterfaceRfChannelValueNr6gDash17Dash6035Dash20 string = "6g-17-6035-20" + + // InterfaceRfChannelValueNr6gDash19Dash6045Dash40 captures enum value "6g-19-6045-40" + InterfaceRfChannelValueNr6gDash19Dash6045Dash40 string = "6g-19-6045-40" + + // InterfaceRfChannelValueNr6gDash21Dash6055Dash20 captures enum value "6g-21-6055-20" + InterfaceRfChannelValueNr6gDash21Dash6055Dash20 string = "6g-21-6055-20" + + // InterfaceRfChannelValueNr6gDash23Dash6065Dash80 captures enum value "6g-23-6065-80" + InterfaceRfChannelValueNr6gDash23Dash6065Dash80 string = "6g-23-6065-80" + + // InterfaceRfChannelValueNr6gDash25Dash6075Dash20 captures enum value "6g-25-6075-20" + InterfaceRfChannelValueNr6gDash25Dash6075Dash20 string = "6g-25-6075-20" + + // InterfaceRfChannelValueNr6gDash27Dash6085Dash40 captures enum value "6g-27-6085-40" + InterfaceRfChannelValueNr6gDash27Dash6085Dash40 string = "6g-27-6085-40" + + // InterfaceRfChannelValueNr6gDash29Dash6095Dash20 captures enum value "6g-29-6095-20" + InterfaceRfChannelValueNr6gDash29Dash6095Dash20 string = "6g-29-6095-20" + + // InterfaceRfChannelValueNr6gDash31Dash6105Dash320 captures enum value "6g-31-6105-320" + InterfaceRfChannelValueNr6gDash31Dash6105Dash320 string = "6g-31-6105-320" + + // InterfaceRfChannelValueNr6gDash33Dash6115Dash20 captures enum value "6g-33-6115-20" + InterfaceRfChannelValueNr6gDash33Dash6115Dash20 string = "6g-33-6115-20" + + // InterfaceRfChannelValueNr6gDash35Dash6125Dash40 captures enum value "6g-35-6125-40" + InterfaceRfChannelValueNr6gDash35Dash6125Dash40 string = "6g-35-6125-40" + + // InterfaceRfChannelValueNr6gDash37Dash6135Dash20 captures enum value "6g-37-6135-20" + InterfaceRfChannelValueNr6gDash37Dash6135Dash20 string = "6g-37-6135-20" + + // InterfaceRfChannelValueNr6gDash39Dash6145Dash80 captures enum value "6g-39-6145-80" + InterfaceRfChannelValueNr6gDash39Dash6145Dash80 string = "6g-39-6145-80" + + // InterfaceRfChannelValueNr6gDash41Dash6155Dash20 captures enum value "6g-41-6155-20" + InterfaceRfChannelValueNr6gDash41Dash6155Dash20 string = "6g-41-6155-20" + + // InterfaceRfChannelValueNr6gDash43Dash6165Dash40 captures enum value "6g-43-6165-40" + InterfaceRfChannelValueNr6gDash43Dash6165Dash40 string = "6g-43-6165-40" + + // InterfaceRfChannelValueNr6gDash45Dash6175Dash20 captures enum value "6g-45-6175-20" + InterfaceRfChannelValueNr6gDash45Dash6175Dash20 string = "6g-45-6175-20" + + // InterfaceRfChannelValueNr6gDash47Dash6185Dash160 captures enum value "6g-47-6185-160" + InterfaceRfChannelValueNr6gDash47Dash6185Dash160 string = "6g-47-6185-160" + + // InterfaceRfChannelValueNr6gDash49Dash6195Dash20 captures enum value "6g-49-6195-20" + InterfaceRfChannelValueNr6gDash49Dash6195Dash20 string = "6g-49-6195-20" + + // InterfaceRfChannelValueNr6gDash51Dash6205Dash40 captures enum value "6g-51-6205-40" + InterfaceRfChannelValueNr6gDash51Dash6205Dash40 string = "6g-51-6205-40" + + // InterfaceRfChannelValueNr6gDash53Dash6215Dash20 captures enum value "6g-53-6215-20" + InterfaceRfChannelValueNr6gDash53Dash6215Dash20 string = "6g-53-6215-20" + + // InterfaceRfChannelValueNr6gDash55Dash6225Dash80 captures enum value "6g-55-6225-80" + InterfaceRfChannelValueNr6gDash55Dash6225Dash80 string = "6g-55-6225-80" + + // InterfaceRfChannelValueNr6gDash57Dash6235Dash20 captures enum value "6g-57-6235-20" + InterfaceRfChannelValueNr6gDash57Dash6235Dash20 string = "6g-57-6235-20" + + // InterfaceRfChannelValueNr6gDash59Dash6245Dash40 captures enum value "6g-59-6245-40" + InterfaceRfChannelValueNr6gDash59Dash6245Dash40 string = "6g-59-6245-40" + + // InterfaceRfChannelValueNr6gDash61Dash6255Dash20 captures enum value "6g-61-6255-20" + InterfaceRfChannelValueNr6gDash61Dash6255Dash20 string = "6g-61-6255-20" + + // InterfaceRfChannelValueNr6gDash65Dash6275Dash20 captures enum value "6g-65-6275-20" + InterfaceRfChannelValueNr6gDash65Dash6275Dash20 string = "6g-65-6275-20" + + // InterfaceRfChannelValueNr6gDash67Dash6285Dash40 captures enum value "6g-67-6285-40" + InterfaceRfChannelValueNr6gDash67Dash6285Dash40 string = "6g-67-6285-40" + + // InterfaceRfChannelValueNr6gDash69Dash6295Dash20 captures enum value "6g-69-6295-20" + InterfaceRfChannelValueNr6gDash69Dash6295Dash20 string = "6g-69-6295-20" + + // InterfaceRfChannelValueNr6gDash71Dash6305Dash80 captures enum value "6g-71-6305-80" + InterfaceRfChannelValueNr6gDash71Dash6305Dash80 string = "6g-71-6305-80" + + // InterfaceRfChannelValueNr6gDash73Dash6315Dash20 captures enum value "6g-73-6315-20" + InterfaceRfChannelValueNr6gDash73Dash6315Dash20 string = "6g-73-6315-20" + + // InterfaceRfChannelValueNr6gDash75Dash6325Dash40 captures enum value "6g-75-6325-40" + InterfaceRfChannelValueNr6gDash75Dash6325Dash40 string = "6g-75-6325-40" + + // InterfaceRfChannelValueNr6gDash77Dash6335Dash20 captures enum value "6g-77-6335-20" + InterfaceRfChannelValueNr6gDash77Dash6335Dash20 string = "6g-77-6335-20" + + // InterfaceRfChannelValueNr6gDash79Dash6345Dash160 captures enum value "6g-79-6345-160" + InterfaceRfChannelValueNr6gDash79Dash6345Dash160 string = "6g-79-6345-160" + + // InterfaceRfChannelValueNr6gDash81Dash6355Dash20 captures enum value "6g-81-6355-20" + InterfaceRfChannelValueNr6gDash81Dash6355Dash20 string = "6g-81-6355-20" + + // InterfaceRfChannelValueNr6gDash83Dash6365Dash40 captures enum value "6g-83-6365-40" + InterfaceRfChannelValueNr6gDash83Dash6365Dash40 string = "6g-83-6365-40" + + // InterfaceRfChannelValueNr6gDash85Dash6375Dash20 captures enum value "6g-85-6375-20" + InterfaceRfChannelValueNr6gDash85Dash6375Dash20 string = "6g-85-6375-20" + + // InterfaceRfChannelValueNr6gDash87Dash6385Dash80 captures enum value "6g-87-6385-80" + InterfaceRfChannelValueNr6gDash87Dash6385Dash80 string = "6g-87-6385-80" + + // InterfaceRfChannelValueNr6gDash89Dash6395Dash20 captures enum value "6g-89-6395-20" + InterfaceRfChannelValueNr6gDash89Dash6395Dash20 string = "6g-89-6395-20" + + // InterfaceRfChannelValueNr6gDash91Dash6405Dash40 captures enum value "6g-91-6405-40" + InterfaceRfChannelValueNr6gDash91Dash6405Dash40 string = "6g-91-6405-40" + + // InterfaceRfChannelValueNr6gDash93Dash6415Dash20 captures enum value "6g-93-6415-20" + InterfaceRfChannelValueNr6gDash93Dash6415Dash20 string = "6g-93-6415-20" + + // InterfaceRfChannelValueNr6gDash95Dash6425Dash320 captures enum value "6g-95-6425-320" + InterfaceRfChannelValueNr6gDash95Dash6425Dash320 string = "6g-95-6425-320" + + // InterfaceRfChannelValueNr6gDash97Dash6435Dash20 captures enum value "6g-97-6435-20" + InterfaceRfChannelValueNr6gDash97Dash6435Dash20 string = "6g-97-6435-20" + + // InterfaceRfChannelValueNr6gDash99Dash6445Dash40 captures enum value "6g-99-6445-40" + InterfaceRfChannelValueNr6gDash99Dash6445Dash40 string = "6g-99-6445-40" + + // InterfaceRfChannelValueNr6gDash101Dash6455Dash20 captures enum value "6g-101-6455-20" + InterfaceRfChannelValueNr6gDash101Dash6455Dash20 string = "6g-101-6455-20" + + // InterfaceRfChannelValueNr6gDash103Dash6465Dash80 captures enum value "6g-103-6465-80" + InterfaceRfChannelValueNr6gDash103Dash6465Dash80 string = "6g-103-6465-80" + + // InterfaceRfChannelValueNr6gDash105Dash6475Dash20 captures enum value "6g-105-6475-20" + InterfaceRfChannelValueNr6gDash105Dash6475Dash20 string = "6g-105-6475-20" + + // InterfaceRfChannelValueNr6gDash107Dash6485Dash40 captures enum value "6g-107-6485-40" + InterfaceRfChannelValueNr6gDash107Dash6485Dash40 string = "6g-107-6485-40" + + // InterfaceRfChannelValueNr6gDash109Dash6495Dash20 captures enum value "6g-109-6495-20" + InterfaceRfChannelValueNr6gDash109Dash6495Dash20 string = "6g-109-6495-20" + + // InterfaceRfChannelValueNr6gDash111Dash6505Dash160 captures enum value "6g-111-6505-160" + InterfaceRfChannelValueNr6gDash111Dash6505Dash160 string = "6g-111-6505-160" + + // InterfaceRfChannelValueNr6gDash113Dash6515Dash20 captures enum value "6g-113-6515-20" + InterfaceRfChannelValueNr6gDash113Dash6515Dash20 string = "6g-113-6515-20" + + // InterfaceRfChannelValueNr6gDash115Dash6525Dash40 captures enum value "6g-115-6525-40" + InterfaceRfChannelValueNr6gDash115Dash6525Dash40 string = "6g-115-6525-40" + + // InterfaceRfChannelValueNr6gDash117Dash6535Dash20 captures enum value "6g-117-6535-20" + InterfaceRfChannelValueNr6gDash117Dash6535Dash20 string = "6g-117-6535-20" + + // InterfaceRfChannelValueNr6gDash119Dash6545Dash80 captures enum value "6g-119-6545-80" + InterfaceRfChannelValueNr6gDash119Dash6545Dash80 string = "6g-119-6545-80" + + // InterfaceRfChannelValueNr6gDash121Dash6555Dash20 captures enum value "6g-121-6555-20" + InterfaceRfChannelValueNr6gDash121Dash6555Dash20 string = "6g-121-6555-20" + + // InterfaceRfChannelValueNr6gDash123Dash6565Dash40 captures enum value "6g-123-6565-40" + InterfaceRfChannelValueNr6gDash123Dash6565Dash40 string = "6g-123-6565-40" + + // InterfaceRfChannelValueNr6gDash125Dash6575Dash20 captures enum value "6g-125-6575-20" + InterfaceRfChannelValueNr6gDash125Dash6575Dash20 string = "6g-125-6575-20" + + // InterfaceRfChannelValueNr6gDash129Dash6595Dash20 captures enum value "6g-129-6595-20" + InterfaceRfChannelValueNr6gDash129Dash6595Dash20 string = "6g-129-6595-20" + + // InterfaceRfChannelValueNr6gDash131Dash6605Dash40 captures enum value "6g-131-6605-40" + InterfaceRfChannelValueNr6gDash131Dash6605Dash40 string = "6g-131-6605-40" - if err := m.contextValidateLastUpdated(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash133Dash6615Dash20 captures enum value "6g-133-6615-20" + InterfaceRfChannelValueNr6gDash133Dash6615Dash20 string = "6g-133-6615-20" - if err := m.contextValidateMode(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash135Dash6625Dash80 captures enum value "6g-135-6625-80" + InterfaceRfChannelValueNr6gDash135Dash6625Dash80 string = "6g-135-6625-80" - if err := m.contextValidateParent(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash137Dash6635Dash20 captures enum value "6g-137-6635-20" + InterfaceRfChannelValueNr6gDash137Dash6635Dash20 string = "6g-137-6635-20" - if err := m.contextValidateTaggedVlans(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash139Dash6645Dash40 captures enum value "6g-139-6645-40" + InterfaceRfChannelValueNr6gDash139Dash6645Dash40 string = "6g-139-6645-40" - if err := m.contextValidateTags(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash141Dash6655Dash20 captures enum value "6g-141-6655-20" + InterfaceRfChannelValueNr6gDash141Dash6655Dash20 string = "6g-141-6655-20" - if err := m.contextValidateType(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash143Dash6665Dash160 captures enum value "6g-143-6665-160" + InterfaceRfChannelValueNr6gDash143Dash6665Dash160 string = "6g-143-6665-160" - if err := m.contextValidateUntaggedVlan(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash145Dash6675Dash20 captures enum value "6g-145-6675-20" + InterfaceRfChannelValueNr6gDash145Dash6675Dash20 string = "6g-145-6675-20" - if err := m.contextValidateURL(ctx, formats); err != nil { - res = append(res, err) - } + // InterfaceRfChannelValueNr6gDash147Dash6685Dash40 captures enum value "6g-147-6685-40" + InterfaceRfChannelValueNr6gDash147Dash6685Dash40 string = "6g-147-6685-40" - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} + // InterfaceRfChannelValueNr6gDash149Dash6695Dash20 captures enum value "6g-149-6695-20" + InterfaceRfChannelValueNr6gDash149Dash6695Dash20 string = "6g-149-6695-20" -func (m *Interface) contextValidateOccupied(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash151Dash6705Dash80 captures enum value "6g-151-6705-80" + InterfaceRfChannelValueNr6gDash151Dash6705Dash80 string = "6g-151-6705-80" - if err := validate.ReadOnly(ctx, "_occupied", "body", m.Occupied); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash153Dash6715Dash20 captures enum value "6g-153-6715-20" + InterfaceRfChannelValueNr6gDash153Dash6715Dash20 string = "6g-153-6715-20" - return nil -} + // InterfaceRfChannelValueNr6gDash155Dash6725Dash40 captures enum value "6g-155-6725-40" + InterfaceRfChannelValueNr6gDash155Dash6725Dash40 string = "6g-155-6725-40" -func (m *Interface) contextValidateCable(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash157Dash6735Dash20 captures enum value "6g-157-6735-20" + InterfaceRfChannelValueNr6gDash157Dash6735Dash20 string = "6g-157-6735-20" - if m.Cable != nil { - if err := m.Cable.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cable") - } - return err - } - } + // InterfaceRfChannelValueNr6gDash159Dash6745Dash320 captures enum value "6g-159-6745-320" + InterfaceRfChannelValueNr6gDash159Dash6745Dash320 string = "6g-159-6745-320" - return nil -} + // InterfaceRfChannelValueNr6gDash161Dash6755Dash20 captures enum value "6g-161-6755-20" + InterfaceRfChannelValueNr6gDash161Dash6755Dash20 string = "6g-161-6755-20" -func (m *Interface) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash163Dash6765Dash40 captures enum value "6g-163-6765-40" + InterfaceRfChannelValueNr6gDash163Dash6765Dash40 string = "6g-163-6765-40" - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash165Dash6775Dash20 captures enum value "6g-165-6775-20" + InterfaceRfChannelValueNr6gDash165Dash6775Dash20 string = "6g-165-6775-20" - return nil -} + // InterfaceRfChannelValueNr6gDash167Dash6785Dash80 captures enum value "6g-167-6785-80" + InterfaceRfChannelValueNr6gDash167Dash6785Dash80 string = "6g-167-6785-80" -func (m *Interface) contextValidateConnectedEndpointReachable(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash169Dash6795Dash20 captures enum value "6g-169-6795-20" + InterfaceRfChannelValueNr6gDash169Dash6795Dash20 string = "6g-169-6795-20" - if err := validate.ReadOnly(ctx, "connected_endpoint_reachable", "body", m.ConnectedEndpointReachable); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash171Dash6805Dash40 captures enum value "6g-171-6805-40" + InterfaceRfChannelValueNr6gDash171Dash6805Dash40 string = "6g-171-6805-40" - return nil -} + // InterfaceRfChannelValueNr6gDash173Dash6815Dash20 captures enum value "6g-173-6815-20" + InterfaceRfChannelValueNr6gDash173Dash6815Dash20 string = "6g-173-6815-20" -func (m *Interface) contextValidateConnectedEndpointType(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash175Dash6825Dash160 captures enum value "6g-175-6825-160" + InterfaceRfChannelValueNr6gDash175Dash6825Dash160 string = "6g-175-6825-160" - if err := validate.ReadOnly(ctx, "connected_endpoint_type", "body", string(m.ConnectedEndpointType)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash177Dash6835Dash20 captures enum value "6g-177-6835-20" + InterfaceRfChannelValueNr6gDash177Dash6835Dash20 string = "6g-177-6835-20" - return nil -} + // InterfaceRfChannelValueNr6gDash179Dash6845Dash40 captures enum value "6g-179-6845-40" + InterfaceRfChannelValueNr6gDash179Dash6845Dash40 string = "6g-179-6845-40" -func (m *Interface) contextValidateCountIpaddresses(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash181Dash6855Dash20 captures enum value "6g-181-6855-20" + InterfaceRfChannelValueNr6gDash181Dash6855Dash20 string = "6g-181-6855-20" - if err := validate.ReadOnly(ctx, "count_ipaddresses", "body", int64(m.CountIpaddresses)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash183Dash6865Dash80 captures enum value "6g-183-6865-80" + InterfaceRfChannelValueNr6gDash183Dash6865Dash80 string = "6g-183-6865-80" - return nil -} + // InterfaceRfChannelValueNr6gDash185Dash6875Dash20 captures enum value "6g-185-6875-20" + InterfaceRfChannelValueNr6gDash185Dash6875Dash20 string = "6g-185-6875-20" -func (m *Interface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash187Dash6885Dash40 captures enum value "6g-187-6885-40" + InterfaceRfChannelValueNr6gDash187Dash6885Dash40 string = "6g-187-6885-40" - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash189Dash6895Dash20 captures enum value "6g-189-6895-20" + InterfaceRfChannelValueNr6gDash189Dash6895Dash20 string = "6g-189-6895-20" - return nil -} + // InterfaceRfChannelValueNr6gDash193Dash6915Dash20 captures enum value "6g-193-6915-20" + InterfaceRfChannelValueNr6gDash193Dash6915Dash20 string = "6g-193-6915-20" -func (m *Interface) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash195Dash6925Dash40 captures enum value "6g-195-6925-40" + InterfaceRfChannelValueNr6gDash195Dash6925Dash40 string = "6g-195-6925-40" - if m.Device != nil { - if err := m.Device.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("device") - } - return err - } - } + // InterfaceRfChannelValueNr6gDash197Dash6935Dash20 captures enum value "6g-197-6935-20" + InterfaceRfChannelValueNr6gDash197Dash6935Dash20 string = "6g-197-6935-20" - return nil -} + // InterfaceRfChannelValueNr6gDash199Dash6945Dash80 captures enum value "6g-199-6945-80" + InterfaceRfChannelValueNr6gDash199Dash6945Dash80 string = "6g-199-6945-80" -func (m *Interface) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash201Dash6955Dash20 captures enum value "6g-201-6955-20" + InterfaceRfChannelValueNr6gDash201Dash6955Dash20 string = "6g-201-6955-20" - if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash203Dash6965Dash40 captures enum value "6g-203-6965-40" + InterfaceRfChannelValueNr6gDash203Dash6965Dash40 string = "6g-203-6965-40" - return nil -} + // InterfaceRfChannelValueNr6gDash205Dash6975Dash20 captures enum value "6g-205-6975-20" + InterfaceRfChannelValueNr6gDash205Dash6975Dash20 string = "6g-205-6975-20" -func (m *Interface) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash207Dash6985Dash160 captures enum value "6g-207-6985-160" + InterfaceRfChannelValueNr6gDash207Dash6985Dash160 string = "6g-207-6985-160" - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash209Dash6995Dash20 captures enum value "6g-209-6995-20" + InterfaceRfChannelValueNr6gDash209Dash6995Dash20 string = "6g-209-6995-20" - return nil -} + // InterfaceRfChannelValueNr6gDash211Dash7005Dash40 captures enum value "6g-211-7005-40" + InterfaceRfChannelValueNr6gDash211Dash7005Dash40 string = "6g-211-7005-40" -func (m *Interface) contextValidateLag(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash213Dash7015Dash20 captures enum value "6g-213-7015-20" + InterfaceRfChannelValueNr6gDash213Dash7015Dash20 string = "6g-213-7015-20" - if m.Lag != nil { - if err := m.Lag.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lag") - } - return err - } - } + // InterfaceRfChannelValueNr6gDash215Dash7025Dash80 captures enum value "6g-215-7025-80" + InterfaceRfChannelValueNr6gDash215Dash7025Dash80 string = "6g-215-7025-80" - return nil -} + // InterfaceRfChannelValueNr6gDash217Dash7035Dash20 captures enum value "6g-217-7035-20" + InterfaceRfChannelValueNr6gDash217Dash7035Dash20 string = "6g-217-7035-20" -func (m *Interface) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash219Dash7045Dash40 captures enum value "6g-219-7045-40" + InterfaceRfChannelValueNr6gDash219Dash7045Dash40 string = "6g-219-7045-40" - if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { - return err - } + // InterfaceRfChannelValueNr6gDash221Dash7055Dash20 captures enum value "6g-221-7055-20" + InterfaceRfChannelValueNr6gDash221Dash7055Dash20 string = "6g-221-7055-20" - return nil -} + // InterfaceRfChannelValueNr6gDash225Dash7075Dash20 captures enum value "6g-225-7075-20" + InterfaceRfChannelValueNr6gDash225Dash7075Dash20 string = "6g-225-7075-20" -func (m *Interface) contextValidateMode(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr6gDash227Dash7085Dash40 captures enum value "6g-227-7085-40" + InterfaceRfChannelValueNr6gDash227Dash7085Dash40 string = "6g-227-7085-40" - if m.Mode != nil { - if err := m.Mode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mode") - } - return err - } - } + // InterfaceRfChannelValueNr6gDash229Dash7095Dash20 captures enum value "6g-229-7095-20" + InterfaceRfChannelValueNr6gDash229Dash7095Dash20 string = "6g-229-7095-20" - return nil -} + // InterfaceRfChannelValueNr6gDash233Dash7115Dash20 captures enum value "6g-233-7115-20" + InterfaceRfChannelValueNr6gDash233Dash7115Dash20 string = "6g-233-7115-20" -func (m *Interface) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr60gDash1Dash58320Dash2160 captures enum value "60g-1-58320-2160" + InterfaceRfChannelValueNr60gDash1Dash58320Dash2160 string = "60g-1-58320-2160" - if m.Parent != nil { - if err := m.Parent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parent") - } - return err - } - } + // InterfaceRfChannelValueNr60gDash2Dash60480Dash2160 captures enum value "60g-2-60480-2160" + InterfaceRfChannelValueNr60gDash2Dash60480Dash2160 string = "60g-2-60480-2160" - return nil -} + // InterfaceRfChannelValueNr60gDash3Dash62640Dash2160 captures enum value "60g-3-62640-2160" + InterfaceRfChannelValueNr60gDash3Dash62640Dash2160 string = "60g-3-62640-2160" -func (m *Interface) contextValidateTaggedVlans(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr60gDash4Dash64800Dash2160 captures enum value "60g-4-64800-2160" + InterfaceRfChannelValueNr60gDash4Dash64800Dash2160 string = "60g-4-64800-2160" - for i := 0; i < len(m.TaggedVlans); i++ { + // InterfaceRfChannelValueNr60gDash5Dash66960Dash2160 captures enum value "60g-5-66960-2160" + InterfaceRfChannelValueNr60gDash5Dash66960Dash2160 string = "60g-5-66960-2160" - if m.TaggedVlans[i] != nil { - if err := m.TaggedVlans[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) - } - return err - } - } + // InterfaceRfChannelValueNr60gDash6Dash69120Dash2160 captures enum value "60g-6-69120-2160" + InterfaceRfChannelValueNr60gDash6Dash69120Dash2160 string = "60g-6-69120-2160" - } + // InterfaceRfChannelValueNr60gDash9Dash59400Dash4320 captures enum value "60g-9-59400-4320" + InterfaceRfChannelValueNr60gDash9Dash59400Dash4320 string = "60g-9-59400-4320" - return nil -} + // InterfaceRfChannelValueNr60gDash10Dash61560Dash4320 captures enum value "60g-10-61560-4320" + InterfaceRfChannelValueNr60gDash10Dash61560Dash4320 string = "60g-10-61560-4320" -func (m *Interface) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr60gDash11Dash63720Dash4320 captures enum value "60g-11-63720-4320" + InterfaceRfChannelValueNr60gDash11Dash63720Dash4320 string = "60g-11-63720-4320" - for i := 0; i < len(m.Tags); i++ { + // InterfaceRfChannelValueNr60gDash12Dash65880Dash4320 captures enum value "60g-12-65880-4320" + InterfaceRfChannelValueNr60gDash12Dash65880Dash4320 string = "60g-12-65880-4320" - if m.Tags[i] != nil { - if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tags" + "." + strconv.Itoa(i)) - } - return err - } - } + // InterfaceRfChannelValueNr60gDash13Dash68040Dash4320 captures enum value "60g-13-68040-4320" + InterfaceRfChannelValueNr60gDash13Dash68040Dash4320 string = "60g-13-68040-4320" - } + // InterfaceRfChannelValueNr60gDash17Dash60480Dash6480 captures enum value "60g-17-60480-6480" + InterfaceRfChannelValueNr60gDash17Dash60480Dash6480 string = "60g-17-60480-6480" - return nil -} + // InterfaceRfChannelValueNr60gDash18Dash62640Dash6480 captures enum value "60g-18-62640-6480" + InterfaceRfChannelValueNr60gDash18Dash62640Dash6480 string = "60g-18-62640-6480" -func (m *Interface) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr60gDash19Dash64800Dash6480 captures enum value "60g-19-64800-6480" + InterfaceRfChannelValueNr60gDash19Dash64800Dash6480 string = "60g-19-64800-6480" - if m.Type != nil { - if err := m.Type.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } - return err - } - } + // InterfaceRfChannelValueNr60gDash20Dash66960Dash6480 captures enum value "60g-20-66960-6480" + InterfaceRfChannelValueNr60gDash20Dash66960Dash6480 string = "60g-20-66960-6480" - return nil -} + // InterfaceRfChannelValueNr60gDash25Dash61560Dash6480 captures enum value "60g-25-61560-6480" + InterfaceRfChannelValueNr60gDash25Dash61560Dash6480 string = "60g-25-61560-6480" -func (m *Interface) contextValidateUntaggedVlan(ctx context.Context, formats strfmt.Registry) error { + // InterfaceRfChannelValueNr60gDash26Dash63720Dash6480 captures enum value "60g-26-63720-6480" + InterfaceRfChannelValueNr60gDash26Dash63720Dash6480 string = "60g-26-63720-6480" - if m.UntaggedVlan != nil { - if err := m.UntaggedVlan.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("untagged_vlan") - } - return err - } - } + // InterfaceRfChannelValueNr60gDash27Dash65880Dash6480 captures enum value "60g-27-65880-6480" + InterfaceRfChannelValueNr60gDash27Dash65880Dash6480 string = "60g-27-65880-6480" +) +// prop value enum +func (m *InterfaceRfChannel) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceRfChannelTypeValuePropEnum, true); err != nil { + return err + } return nil } -func (m *Interface) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { +func (m *InterfaceRfChannel) validateValue(formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + if err := validate.Required("rf_channel"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("rf_channel"+"."+"value", "body", *m.Value); err != nil { return err } return nil } +// ContextValidate validates this interface rf channel based on context it is used +func (m *InterfaceRfChannel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation -func (m *Interface) MarshalBinary() ([]byte, error) { +func (m *InterfaceRfChannel) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -825,8 +2952,8 @@ func (m *Interface) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *Interface) UnmarshalBinary(b []byte) error { - var res Interface +func (m *InterfaceRfChannel) UnmarshalBinary(b []byte) error { + var res InterfaceRfChannel if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -834,24 +2961,24 @@ func (m *Interface) UnmarshalBinary(b []byte) error { return nil } -// InterfaceMode Mode +// InterfaceRfRole Rf role // -// swagger:model InterfaceMode -type InterfaceMode struct { +// swagger:model InterfaceRfRole +type InterfaceRfRole struct { // label // Required: true - // Enum: [Access Tagged Tagged (All)] + // Enum: [Access point Station] Label *string `json:"label"` // value // Required: true - // Enum: [access tagged tagged-all] + // Enum: [ap station] Value *string `json:"value"` } -// Validate validates this interface mode -func (m *InterfaceMode) Validate(formats strfmt.Registry) error { +// Validate validates this interface rf role +func (m *InterfaceRfRole) Validate(formats strfmt.Registry) error { var res []error if err := m.validateLabel(formats); err != nil { @@ -868,105 +2995,99 @@ func (m *InterfaceMode) Validate(formats strfmt.Registry) error { return nil } -var interfaceModeTypeLabelPropEnum []interface{} +var interfaceRfRoleTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Access","Tagged","Tagged (All)"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Access point","Station"]`), &res); err != nil { panic(err) } for _, v := range res { - interfaceModeTypeLabelPropEnum = append(interfaceModeTypeLabelPropEnum, v) + interfaceRfRoleTypeLabelPropEnum = append(interfaceRfRoleTypeLabelPropEnum, v) } } const ( - // InterfaceModeLabelAccess captures enum value "Access" - InterfaceModeLabelAccess string = "Access" - - // InterfaceModeLabelTagged captures enum value "Tagged" - InterfaceModeLabelTagged string = "Tagged" + // InterfaceRfRoleLabelAccessPoint captures enum value "Access point" + InterfaceRfRoleLabelAccessPoint string = "Access point" - // InterfaceModeLabelTaggedAll captures enum value "Tagged (All)" - InterfaceModeLabelTaggedAll string = "Tagged (All)" + // InterfaceRfRoleLabelStation captures enum value "Station" + InterfaceRfRoleLabelStation string = "Station" ) // prop value enum -func (m *InterfaceMode) validateLabelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceModeTypeLabelPropEnum, true); err != nil { +func (m *InterfaceRfRole) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceRfRoleTypeLabelPropEnum, true); err != nil { return err } return nil } -func (m *InterfaceMode) validateLabel(formats strfmt.Registry) error { +func (m *InterfaceRfRole) validateLabel(formats strfmt.Registry) error { - if err := validate.Required("mode"+"."+"label", "body", m.Label); err != nil { + if err := validate.Required("rf_role"+"."+"label", "body", m.Label); err != nil { return err } // value enum - if err := m.validateLabelEnum("mode"+"."+"label", "body", *m.Label); err != nil { + if err := m.validateLabelEnum("rf_role"+"."+"label", "body", *m.Label); err != nil { return err } return nil } -var interfaceModeTypeValuePropEnum []interface{} +var interfaceRfRoleTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["access","tagged","tagged-all"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ap","station"]`), &res); err != nil { panic(err) } for _, v := range res { - interfaceModeTypeValuePropEnum = append(interfaceModeTypeValuePropEnum, v) + interfaceRfRoleTypeValuePropEnum = append(interfaceRfRoleTypeValuePropEnum, v) } } const ( - // InterfaceModeValueAccess captures enum value "access" - InterfaceModeValueAccess string = "access" - - // InterfaceModeValueTagged captures enum value "tagged" - InterfaceModeValueTagged string = "tagged" + // InterfaceRfRoleValueAp captures enum value "ap" + InterfaceRfRoleValueAp string = "ap" - // InterfaceModeValueTaggedDashAll captures enum value "tagged-all" - InterfaceModeValueTaggedDashAll string = "tagged-all" + // InterfaceRfRoleValueStation captures enum value "station" + InterfaceRfRoleValueStation string = "station" ) // prop value enum -func (m *InterfaceMode) validateValueEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, interfaceModeTypeValuePropEnum, true); err != nil { +func (m *InterfaceRfRole) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, interfaceRfRoleTypeValuePropEnum, true); err != nil { return err } return nil } -func (m *InterfaceMode) validateValue(formats strfmt.Registry) error { +func (m *InterfaceRfRole) validateValue(formats strfmt.Registry) error { - if err := validate.Required("mode"+"."+"value", "body", m.Value); err != nil { + if err := validate.Required("rf_role"+"."+"value", "body", m.Value); err != nil { return err } // value enum - if err := m.validateValueEnum("mode"+"."+"value", "body", *m.Value); err != nil { + if err := m.validateValueEnum("rf_role"+"."+"value", "body", *m.Value); err != nil { return err } return nil } -// ContextValidate validates this interface mode based on context it is used -func (m *InterfaceMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this interface rf role based on context it is used +func (m *InterfaceRfRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *InterfaceMode) MarshalBinary() ([]byte, error) { +func (m *InterfaceRfRole) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -974,8 +3095,8 @@ func (m *InterfaceMode) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *InterfaceMode) UnmarshalBinary(b []byte) error { - var res InterfaceMode +func (m *InterfaceRfRole) UnmarshalBinary(b []byte) error { + var res InterfaceRfRole if err := swag.ReadJSON(b, &res); err != nil { return err } @@ -990,12 +3111,12 @@ type InterfaceType struct { // label // Required: true - // Enum: [Virtual Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] + // Enum: [Virtual Bridge Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax IEEE 802.15.1 (Bluetooth) GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) xDSL Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Cisco StackWise-80 Cisco StackWise-160 Cisco StackWise-320 Cisco StackWise-480 Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] Label *string `json:"label"` // value // Required: true - // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-sfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Value *string `json:"value"` } @@ -1021,7 +3142,7 @@ var interfaceTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Virtual","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Virtual","Bridge","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","IEEE 802.15.1 (Bluetooth)","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","xDSL","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Cisco StackWise-80","Cisco StackWise-160","Cisco StackWise-320","Cisco StackWise-480","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1034,6 +3155,9 @@ const ( // InterfaceTypeLabelVirtual captures enum value "Virtual" InterfaceTypeLabelVirtual string = "Virtual" + // InterfaceTypeLabelBridge captures enum value "Bridge" + InterfaceTypeLabelBridge string = "Bridge" + // InterfaceTypeLabelLinkAggregationGroupLAG captures enum value "Link Aggregation Group (LAG)" InterfaceTypeLabelLinkAggregationGroupLAG string = "Link Aggregation Group (LAG)" @@ -1130,6 +3254,9 @@ const ( // InterfaceTypeLabelIEEE802Dot11ax captures enum value "IEEE 802.11ax" InterfaceTypeLabelIEEE802Dot11ax string = "IEEE 802.11ax" + // InterfaceTypeLabelIEEE802Dot15Dot1Bluetooth captures enum value "IEEE 802.15.1 (Bluetooth)" + InterfaceTypeLabelIEEE802Dot15Dot1Bluetooth string = "IEEE 802.15.1 (Bluetooth)" + // InterfaceTypeLabelGSM captures enum value "GSM" InterfaceTypeLabelGSM string = "GSM" @@ -1223,6 +3350,9 @@ const ( // InterfaceTypeLabelE334Mbps captures enum value "E3 (34 Mbps)" InterfaceTypeLabelE334Mbps string = "E3 (34 Mbps)" + // InterfaceTypeLabelXDSL captures enum value "xDSL" + InterfaceTypeLabelXDSL string = "xDSL" + // InterfaceTypeLabelCiscoStackWise captures enum value "Cisco StackWise" InterfaceTypeLabelCiscoStackWise string = "Cisco StackWise" @@ -1235,6 +3365,18 @@ const ( // InterfaceTypeLabelCiscoFlexStackPlus captures enum value "Cisco FlexStack Plus" InterfaceTypeLabelCiscoFlexStackPlus string = "Cisco FlexStack Plus" + // InterfaceTypeLabelCiscoStackWiseDash80 captures enum value "Cisco StackWise-80" + InterfaceTypeLabelCiscoStackWiseDash80 string = "Cisco StackWise-80" + + // InterfaceTypeLabelCiscoStackWiseDash160 captures enum value "Cisco StackWise-160" + InterfaceTypeLabelCiscoStackWiseDash160 string = "Cisco StackWise-160" + + // InterfaceTypeLabelCiscoStackWiseDash320 captures enum value "Cisco StackWise-320" + InterfaceTypeLabelCiscoStackWiseDash320 string = "Cisco StackWise-320" + + // InterfaceTypeLabelCiscoStackWiseDash480 captures enum value "Cisco StackWise-480" + InterfaceTypeLabelCiscoStackWiseDash480 string = "Cisco StackWise-480" + // InterfaceTypeLabelJuniperVCP captures enum value "Juniper VCP" InterfaceTypeLabelJuniperVCP string = "Juniper VCP" @@ -1280,7 +3422,7 @@ var interfaceTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-sfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1293,6 +3435,9 @@ const ( // InterfaceTypeValueVirtual captures enum value "virtual" InterfaceTypeValueVirtual string = "virtual" + // InterfaceTypeValueBridge captures enum value "bridge" + InterfaceTypeValueBridge string = "bridge" + // InterfaceTypeValueLag captures enum value "lag" InterfaceTypeValueLag string = "lag" @@ -1389,6 +3534,9 @@ const ( // InterfaceTypeValueIeee802Dot11ax captures enum value "ieee802.11ax" InterfaceTypeValueIeee802Dot11ax string = "ieee802.11ax" + // InterfaceTypeValueIeee802Dot15Dot1 captures enum value "ieee802.15.1" + InterfaceTypeValueIeee802Dot15Dot1 string = "ieee802.15.1" + // InterfaceTypeValueGsm captures enum value "gsm" InterfaceTypeValueGsm string = "gsm" @@ -1440,8 +3588,8 @@ const ( // InterfaceTypeValueNr64gfcDashQsfpp captures enum value "64gfc-qsfpp" InterfaceTypeValueNr64gfcDashQsfpp string = "64gfc-qsfpp" - // InterfaceTypeValueNr128gfcDashSfp28 captures enum value "128gfc-sfp28" - InterfaceTypeValueNr128gfcDashSfp28 string = "128gfc-sfp28" + // InterfaceTypeValueNr128gfcDashQsfp28 captures enum value "128gfc-qsfp28" + InterfaceTypeValueNr128gfcDashQsfp28 string = "128gfc-qsfp28" // InterfaceTypeValueInfinibandDashSdr captures enum value "infiniband-sdr" InterfaceTypeValueInfinibandDashSdr string = "infiniband-sdr" @@ -1482,6 +3630,9 @@ const ( // InterfaceTypeValueE3 captures enum value "e3" InterfaceTypeValueE3 string = "e3" + // InterfaceTypeValueXdsl captures enum value "xdsl" + InterfaceTypeValueXdsl string = "xdsl" + // InterfaceTypeValueCiscoDashStackwise captures enum value "cisco-stackwise" InterfaceTypeValueCiscoDashStackwise string = "cisco-stackwise" @@ -1494,6 +3645,18 @@ const ( // InterfaceTypeValueCiscoDashFlexstackDashPlus captures enum value "cisco-flexstack-plus" InterfaceTypeValueCiscoDashFlexstackDashPlus string = "cisco-flexstack-plus" + // InterfaceTypeValueCiscoDashStackwiseDash80 captures enum value "cisco-stackwise-80" + InterfaceTypeValueCiscoDashStackwiseDash80 string = "cisco-stackwise-80" + + // InterfaceTypeValueCiscoDashStackwiseDash160 captures enum value "cisco-stackwise-160" + InterfaceTypeValueCiscoDashStackwiseDash160 string = "cisco-stackwise-160" + + // InterfaceTypeValueCiscoDashStackwiseDash320 captures enum value "cisco-stackwise-320" + InterfaceTypeValueCiscoDashStackwiseDash320 string = "cisco-stackwise-320" + + // InterfaceTypeValueCiscoDashStackwiseDash480 captures enum value "cisco-stackwise-480" + InterfaceTypeValueCiscoDashStackwiseDash480 string = "cisco-stackwise-480" + // InterfaceTypeValueJuniperDashVcp captures enum value "juniper-vcp" InterfaceTypeValueJuniperDashVcp string = "juniper-vcp" diff --git a/netbox/models/interface_template.go b/netbox/models/interface_template.go index eb7c1f0dd..20aad7033 100644 --- a/netbox/models/interface_template.go +++ b/netbox/models/interface_template.go @@ -37,8 +37,8 @@ type InterfaceTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -52,7 +52,7 @@ type InterfaceTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -133,7 +133,7 @@ func (m *InterfaceTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -162,6 +162,8 @@ func (m *InterfaceTemplate) validateDeviceType(formats strfmt.Registry) error { if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -221,6 +223,8 @@ func (m *InterfaceTemplate) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -281,7 +285,7 @@ func (m *InterfaceTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *InterfaceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -294,6 +298,8 @@ func (m *InterfaceTemplate) contextValidateDeviceType(ctx context.Context, forma if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -335,6 +341,8 @@ func (m *InterfaceTemplate) contextValidateType(ctx context.Context, formats str if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -377,12 +385,12 @@ type InterfaceTemplateType struct { // label // Required: true - // Enum: [Virtual Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] + // Enum: [Virtual Bridge Link Aggregation Group (LAG) 100BASE-TX (10/100ME) 1000BASE-T (1GE) 2.5GBASE-T (2.5GE) 5GBASE-T (5GE) 10GBASE-T (10GE) 10GBASE-CX4 (10GE) GBIC (1GE) SFP (1GE) SFP+ (10GE) XFP (10GE) XENPAK (10GE) X2 (10GE) SFP28 (25GE) SFP56 (50GE) QSFP+ (40GE) QSFP28 (50GE) CFP (100GE) CFP2 (100GE) CFP2 (200GE) CFP4 (100GE) Cisco CPAK (100GE) QSFP28 (100GE) QSFP56 (200GE) QSFP-DD (400GE) OSFP (400GE) IEEE 802.11a IEEE 802.11b/g IEEE 802.11n IEEE 802.11ac IEEE 802.11ad IEEE 802.11ax IEEE 802.15.1 (Bluetooth) GSM CDMA LTE OC-3/STM-1 OC-12/STM-4 OC-48/STM-16 OC-192/STM-64 OC-768/STM-256 OC-1920/STM-640 OC-3840/STM-1234 SFP (1GFC) SFP (2GFC) SFP (4GFC) SFP+ (8GFC) SFP+ (16GFC) SFP28 (32GFC) QSFP+ (64GFC) QSFP28 (128GFC) SDR (2 Gbps) DDR (4 Gbps) QDR (8 Gbps) FDR10 (10 Gbps) FDR (13.5 Gbps) EDR (25 Gbps) HDR (50 Gbps) NDR (100 Gbps) XDR (250 Gbps) T1 (1.544 Mbps) E1 (2.048 Mbps) T3 (45 Mbps) E3 (34 Mbps) xDSL Cisco StackWise Cisco StackWise Plus Cisco FlexStack Cisco FlexStack Plus Cisco StackWise-80 Cisco StackWise-160 Cisco StackWise-320 Cisco StackWise-480 Juniper VCP Extreme SummitStack Extreme SummitStack-128 Extreme SummitStack-256 Extreme SummitStack-512 Other] Label *string `json:"label"` // value // Required: true - // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-sfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Value *string `json:"value"` } @@ -408,7 +416,7 @@ var interfaceTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Virtual","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Virtual","Bridge","Link Aggregation Group (LAG)","100BASE-TX (10/100ME)","1000BASE-T (1GE)","2.5GBASE-T (2.5GE)","5GBASE-T (5GE)","10GBASE-T (10GE)","10GBASE-CX4 (10GE)","GBIC (1GE)","SFP (1GE)","SFP+ (10GE)","XFP (10GE)","XENPAK (10GE)","X2 (10GE)","SFP28 (25GE)","SFP56 (50GE)","QSFP+ (40GE)","QSFP28 (50GE)","CFP (100GE)","CFP2 (100GE)","CFP2 (200GE)","CFP4 (100GE)","Cisco CPAK (100GE)","QSFP28 (100GE)","QSFP56 (200GE)","QSFP-DD (400GE)","OSFP (400GE)","IEEE 802.11a","IEEE 802.11b/g","IEEE 802.11n","IEEE 802.11ac","IEEE 802.11ad","IEEE 802.11ax","IEEE 802.15.1 (Bluetooth)","GSM","CDMA","LTE","OC-3/STM-1","OC-12/STM-4","OC-48/STM-16","OC-192/STM-64","OC-768/STM-256","OC-1920/STM-640","OC-3840/STM-1234","SFP (1GFC)","SFP (2GFC)","SFP (4GFC)","SFP+ (8GFC)","SFP+ (16GFC)","SFP28 (32GFC)","QSFP+ (64GFC)","QSFP28 (128GFC)","SDR (2 Gbps)","DDR (4 Gbps)","QDR (8 Gbps)","FDR10 (10 Gbps)","FDR (13.5 Gbps)","EDR (25 Gbps)","HDR (50 Gbps)","NDR (100 Gbps)","XDR (250 Gbps)","T1 (1.544 Mbps)","E1 (2.048 Mbps)","T3 (45 Mbps)","E3 (34 Mbps)","xDSL","Cisco StackWise","Cisco StackWise Plus","Cisco FlexStack","Cisco FlexStack Plus","Cisco StackWise-80","Cisco StackWise-160","Cisco StackWise-320","Cisco StackWise-480","Juniper VCP","Extreme SummitStack","Extreme SummitStack-128","Extreme SummitStack-256","Extreme SummitStack-512","Other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -421,6 +429,9 @@ const ( // InterfaceTemplateTypeLabelVirtual captures enum value "Virtual" InterfaceTemplateTypeLabelVirtual string = "Virtual" + // InterfaceTemplateTypeLabelBridge captures enum value "Bridge" + InterfaceTemplateTypeLabelBridge string = "Bridge" + // InterfaceTemplateTypeLabelLinkAggregationGroupLAG captures enum value "Link Aggregation Group (LAG)" InterfaceTemplateTypeLabelLinkAggregationGroupLAG string = "Link Aggregation Group (LAG)" @@ -517,6 +528,9 @@ const ( // InterfaceTemplateTypeLabelIEEE802Dot11ax captures enum value "IEEE 802.11ax" InterfaceTemplateTypeLabelIEEE802Dot11ax string = "IEEE 802.11ax" + // InterfaceTemplateTypeLabelIEEE802Dot15Dot1Bluetooth captures enum value "IEEE 802.15.1 (Bluetooth)" + InterfaceTemplateTypeLabelIEEE802Dot15Dot1Bluetooth string = "IEEE 802.15.1 (Bluetooth)" + // InterfaceTemplateTypeLabelGSM captures enum value "GSM" InterfaceTemplateTypeLabelGSM string = "GSM" @@ -610,6 +624,9 @@ const ( // InterfaceTemplateTypeLabelE334Mbps captures enum value "E3 (34 Mbps)" InterfaceTemplateTypeLabelE334Mbps string = "E3 (34 Mbps)" + // InterfaceTemplateTypeLabelXDSL captures enum value "xDSL" + InterfaceTemplateTypeLabelXDSL string = "xDSL" + // InterfaceTemplateTypeLabelCiscoStackWise captures enum value "Cisco StackWise" InterfaceTemplateTypeLabelCiscoStackWise string = "Cisco StackWise" @@ -622,6 +639,18 @@ const ( // InterfaceTemplateTypeLabelCiscoFlexStackPlus captures enum value "Cisco FlexStack Plus" InterfaceTemplateTypeLabelCiscoFlexStackPlus string = "Cisco FlexStack Plus" + // InterfaceTemplateTypeLabelCiscoStackWiseDash80 captures enum value "Cisco StackWise-80" + InterfaceTemplateTypeLabelCiscoStackWiseDash80 string = "Cisco StackWise-80" + + // InterfaceTemplateTypeLabelCiscoStackWiseDash160 captures enum value "Cisco StackWise-160" + InterfaceTemplateTypeLabelCiscoStackWiseDash160 string = "Cisco StackWise-160" + + // InterfaceTemplateTypeLabelCiscoStackWiseDash320 captures enum value "Cisco StackWise-320" + InterfaceTemplateTypeLabelCiscoStackWiseDash320 string = "Cisco StackWise-320" + + // InterfaceTemplateTypeLabelCiscoStackWiseDash480 captures enum value "Cisco StackWise-480" + InterfaceTemplateTypeLabelCiscoStackWiseDash480 string = "Cisco StackWise-480" + // InterfaceTemplateTypeLabelJuniperVCP captures enum value "Juniper VCP" InterfaceTemplateTypeLabelJuniperVCP string = "Juniper VCP" @@ -667,7 +696,7 @@ var interfaceTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-sfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -680,6 +709,9 @@ const ( // InterfaceTemplateTypeValueVirtual captures enum value "virtual" InterfaceTemplateTypeValueVirtual string = "virtual" + // InterfaceTemplateTypeValueBridge captures enum value "bridge" + InterfaceTemplateTypeValueBridge string = "bridge" + // InterfaceTemplateTypeValueLag captures enum value "lag" InterfaceTemplateTypeValueLag string = "lag" @@ -776,6 +808,9 @@ const ( // InterfaceTemplateTypeValueIeee802Dot11ax captures enum value "ieee802.11ax" InterfaceTemplateTypeValueIeee802Dot11ax string = "ieee802.11ax" + // InterfaceTemplateTypeValueIeee802Dot15Dot1 captures enum value "ieee802.15.1" + InterfaceTemplateTypeValueIeee802Dot15Dot1 string = "ieee802.15.1" + // InterfaceTemplateTypeValueGsm captures enum value "gsm" InterfaceTemplateTypeValueGsm string = "gsm" @@ -827,8 +862,8 @@ const ( // InterfaceTemplateTypeValueNr64gfcDashQsfpp captures enum value "64gfc-qsfpp" InterfaceTemplateTypeValueNr64gfcDashQsfpp string = "64gfc-qsfpp" - // InterfaceTemplateTypeValueNr128gfcDashSfp28 captures enum value "128gfc-sfp28" - InterfaceTemplateTypeValueNr128gfcDashSfp28 string = "128gfc-sfp28" + // InterfaceTemplateTypeValueNr128gfcDashQsfp28 captures enum value "128gfc-qsfp28" + InterfaceTemplateTypeValueNr128gfcDashQsfp28 string = "128gfc-qsfp28" // InterfaceTemplateTypeValueInfinibandDashSdr captures enum value "infiniband-sdr" InterfaceTemplateTypeValueInfinibandDashSdr string = "infiniband-sdr" @@ -869,6 +904,9 @@ const ( // InterfaceTemplateTypeValueE3 captures enum value "e3" InterfaceTemplateTypeValueE3 string = "e3" + // InterfaceTemplateTypeValueXdsl captures enum value "xdsl" + InterfaceTemplateTypeValueXdsl string = "xdsl" + // InterfaceTemplateTypeValueCiscoDashStackwise captures enum value "cisco-stackwise" InterfaceTemplateTypeValueCiscoDashStackwise string = "cisco-stackwise" @@ -881,6 +919,18 @@ const ( // InterfaceTemplateTypeValueCiscoDashFlexstackDashPlus captures enum value "cisco-flexstack-plus" InterfaceTemplateTypeValueCiscoDashFlexstackDashPlus string = "cisco-flexstack-plus" + // InterfaceTemplateTypeValueCiscoDashStackwiseDash80 captures enum value "cisco-stackwise-80" + InterfaceTemplateTypeValueCiscoDashStackwiseDash80 string = "cisco-stackwise-80" + + // InterfaceTemplateTypeValueCiscoDashStackwiseDash160 captures enum value "cisco-stackwise-160" + InterfaceTemplateTypeValueCiscoDashStackwiseDash160 string = "cisco-stackwise-160" + + // InterfaceTemplateTypeValueCiscoDashStackwiseDash320 captures enum value "cisco-stackwise-320" + InterfaceTemplateTypeValueCiscoDashStackwiseDash320 string = "cisco-stackwise-320" + + // InterfaceTemplateTypeValueCiscoDashStackwiseDash480 captures enum value "cisco-stackwise-480" + InterfaceTemplateTypeValueCiscoDashStackwiseDash480 string = "cisco-stackwise-480" + // InterfaceTemplateTypeValueJuniperDashVcp captures enum value "juniper-vcp" InterfaceTemplateTypeValueJuniperDashVcp string = "juniper-vcp" diff --git a/netbox/models/inventory_item.go b/netbox/models/inventory_item.go index 3d450ca55..6e22addcb 100644 --- a/netbox/models/inventory_item.go +++ b/netbox/models/inventory_item.go @@ -45,10 +45,22 @@ type InventoryItem struct { // Max Length: 50 AssetTag *string `json:"asset_tag,omitempty"` + // Component + // Read Only: true + Component map[string]*string `json:"component,omitempty"` + + // Component id + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + ComponentID *int64 `json:"component_id,omitempty"` + + // Component type + ComponentType *string `json:"component_type,omitempty"` + // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,7 +82,7 @@ type InventoryItem struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -103,6 +115,9 @@ type InventoryItem struct { // Max Length: 50 PartID string `json:"part_id,omitempty"` + // role + Role *NestedInventoryItemRole `json:"role,omitempty"` + // Serial number // Max Length: 50 Serial string `json:"serial,omitempty"` @@ -124,6 +139,10 @@ func (m *InventoryItem) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateComponentID(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -156,6 +175,10 @@ func (m *InventoryItem) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRole(formats); err != nil { + res = append(res, err) + } + if err := m.validateSerial(formats); err != nil { res = append(res, err) } @@ -186,12 +209,28 @@ func (m *InventoryItem) validateAssetTag(formats strfmt.Registry) error { return nil } +func (m *InventoryItem) validateComponentID(formats strfmt.Registry) error { + if swag.IsZero(m.ComponentID) { // not required + return nil + } + + if err := validate.MinimumInt("component_id", "body", *m.ComponentID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("component_id", "body", *m.ComponentID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + func (m *InventoryItem) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -220,6 +259,8 @@ func (m *InventoryItem) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -261,6 +302,8 @@ func (m *InventoryItem) validateManufacturer(formats strfmt.Registry) error { if err := m.Manufacturer.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } @@ -298,6 +341,25 @@ func (m *InventoryItem) validatePartID(formats strfmt.Registry) error { return nil } +func (m *InventoryItem) validateRole(formats strfmt.Registry) error { + if swag.IsZero(m.Role) { // not required + return nil + } + + if m.Role != nil { + if err := m.Role.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") + } + return err + } + } + + return nil +} + func (m *InventoryItem) validateSerial(formats strfmt.Registry) error { if swag.IsZero(m.Serial) { // not required return nil @@ -324,6 +386,8 @@ func (m *InventoryItem) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -354,6 +418,10 @@ func (m *InventoryItem) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateComponent(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -378,6 +446,10 @@ func (m *InventoryItem) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateRole(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -401,9 +473,14 @@ func (m *InventoryItem) contextValidateDepth(ctx context.Context, formats strfmt return nil } +func (m *InventoryItem) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *InventoryItem) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -416,6 +493,8 @@ func (m *InventoryItem) contextValidateDevice(ctx context.Context, formats strfm if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -457,6 +536,24 @@ func (m *InventoryItem) contextValidateManufacturer(ctx context.Context, formats if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *InventoryItem) contextValidateRole(ctx context.Context, formats strfmt.Registry) error { + + if m.Role != nil { + if err := m.Role.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -473,6 +570,8 @@ func (m *InventoryItem) contextValidateTags(ctx context.Context, formats strfmt. if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/inventory_item_role.go b/netbox/models/inventory_item_role.go new file mode 100644 index 000000000..e0935b9b0 --- /dev/null +++ b/netbox/models/inventory_item_role.go @@ -0,0 +1,397 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// InventoryItemRole inventory item role +// +// swagger:model InventoryItemRole +type InventoryItemRole struct { + + // Color + // Max Length: 6 + // Min Length: 1 + // Pattern: ^[0-9a-f]{6}$ + Color string `json:"color,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Inventoryitem count + // Read Only: true + InventoryitemCount int64 `json:"inventoryitem_count,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this inventory item role +func (m *InventoryItemRole) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateColor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InventoryItemRole) validateColor(formats strfmt.Registry) error { + if swag.IsZero(m.Color) { // not required + return nil + } + + if err := validate.MinLength("color", "body", m.Color, 1); err != nil { + return err + } + + if err := validate.MaxLength("color", "body", m.Color, 6); err != nil { + return err + } + + if err := validate.Pattern("color", "body", m.Color, `^[0-9a-f]{6}$`); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *InventoryItemRole) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this inventory item role based on the context it is used +func (m *InventoryItemRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInventoryitemCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InventoryItemRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) contextValidateInventoryitemCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "inventoryitem_count", "body", int64(m.InventoryitemCount)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemRole) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *InventoryItemRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *InventoryItemRole) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InventoryItemRole) UnmarshalBinary(b []byte) error { + var res InventoryItemRole + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/inventory_item_template.go b/netbox/models/inventory_item_template.go new file mode 100644 index 000000000..d1318ffcb --- /dev/null +++ b/netbox/models/inventory_item_template.go @@ -0,0 +1,502 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// InventoryItemTemplate inventory item template +// +// swagger:model InventoryItemTemplate +type InventoryItemTemplate struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Component + // Read Only: true + Component map[string]*string `json:"component,omitempty"` + + // Component id + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + ComponentID *int64 `json:"component_id,omitempty"` + + // Component type + ComponentType *string `json:"component_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // device type + // Required: true + DeviceType *NestedDeviceType `json:"device_type"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Label + // + // Physical label + // Max Length: 64 + Label string `json:"label,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // manufacturer + Manufacturer *NestedManufacturer `json:"manufacturer,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Parent + Parent *int64 `json:"parent,omitempty"` + + // Part ID + // + // Manufacturer-assigned part identifier + // Max Length: 50 + PartID string `json:"part_id,omitempty"` + + // role + Role *NestedInventoryItemRole `json:"role,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this inventory item template +func (m *InventoryItemTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComponentID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeviceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManufacturer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePartID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InventoryItemTemplate) validateComponentID(formats strfmt.Registry) error { + if swag.IsZero(m.ComponentID) { // not required + return nil + } + + if err := validate.MinimumInt("component_id", "body", *m.ComponentID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("component_id", "body", *m.ComponentID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validateDeviceType(formats strfmt.Registry) error { + + if err := validate.Required("device_type", "body", m.DeviceType); err != nil { + return err + } + + if m.DeviceType != nil { + if err := m.DeviceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") + } + return err + } + } + + return nil +} + +func (m *InventoryItemTemplate) validateLabel(formats strfmt.Registry) error { + if swag.IsZero(m.Label) { // not required + return nil + } + + if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validateManufacturer(formats strfmt.Registry) error { + if swag.IsZero(m.Manufacturer) { // not required + return nil + } + + if m.Manufacturer != nil { + if err := m.Manufacturer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *InventoryItemTemplate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validatePartID(formats strfmt.Registry) error { + if swag.IsZero(m.PartID) { // not required + return nil + } + + if err := validate.MaxLength("part_id", "body", m.PartID, 50); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) validateRole(formats strfmt.Registry) error { + if swag.IsZero(m.Role) { // not required + return nil + } + + if m.Role != nil { + if err := m.Role.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *InventoryItemTemplate) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this inventory item template based on the context it is used +func (m *InventoryItemTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateComponent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDeviceType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateManufacturer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRole(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InventoryItemTemplate) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *InventoryItemTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateDeviceType(ctx context.Context, formats strfmt.Registry) error { + + if m.DeviceType != nil { + if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") + } + return err + } + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateManufacturer(ctx context.Context, formats strfmt.Registry) error { + + if m.Manufacturer != nil { + if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateRole(ctx context.Context, formats strfmt.Registry) error { + + if m.Role != nil { + if err := m.Role.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *InventoryItemTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *InventoryItemTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InventoryItemTemplate) UnmarshalBinary(b []byte) error { + var res InventoryItemTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/ip_address.go b/netbox/models/ip_address.go index 6801273bc..05e53e64b 100644 --- a/netbox/models/ip_address.go +++ b/netbox/models/ip_address.go @@ -44,10 +44,10 @@ type IPAddress struct { // Assigned object // Read Only: true - AssignedObject interface{} `json:"assigned_object,omitempty"` + AssignedObject map[string]*string `json:"assigned_object,omitempty"` // Assigned object id - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 AssignedObjectID *int64 `json:"assigned_object_id,omitempty"` @@ -56,8 +56,8 @@ type IPAddress struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -74,13 +74,13 @@ type IPAddress struct { // // Hostname or FQDN (not case-sensitive) // Max Length: 255 - // Pattern: ^[0-9A-Za-z._-]+$ + // Pattern: ^([0-9A-Za-z_-]+|\*)(\.[0-9A-Za-z_-]+)*\.?$ DNSName string `json:"dns_name,omitempty"` // family Family *IPAddressFamily `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -204,7 +204,7 @@ func (m *IPAddress) validateAssignedObjectID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 9.223372036854776e+18, false); err != nil { return err } @@ -216,7 +216,7 @@ func (m *IPAddress) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -244,7 +244,7 @@ func (m *IPAddress) validateDNSName(formats strfmt.Registry) error { return err } - if err := validate.Pattern("dns_name", "body", m.DNSName, `^[0-9A-Za-z._-]+$`); err != nil { + if err := validate.Pattern("dns_name", "body", m.DNSName, `^([0-9A-Za-z_-]+|\*)(\.[0-9A-Za-z_-]+)*\.?$`); err != nil { return err } @@ -260,6 +260,8 @@ func (m *IPAddress) validateFamily(formats strfmt.Registry) error { if err := m.Family.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -289,6 +291,8 @@ func (m *IPAddress) validateNatInside(formats strfmt.Registry) error { if err := m.NatInside.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nat_inside") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_inside") } return err } @@ -306,6 +310,8 @@ func (m *IPAddress) validateNatOutside(formats strfmt.Registry) error { if err := m.NatOutside.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nat_outside") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_outside") } return err } @@ -323,6 +329,8 @@ func (m *IPAddress) validateRole(formats strfmt.Registry) error { if err := m.Role.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -340,6 +348,8 @@ func (m *IPAddress) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -362,6 +372,8 @@ func (m *IPAddress) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -381,6 +393,8 @@ func (m *IPAddress) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -410,6 +424,8 @@ func (m *IPAddress) validateVrf(formats strfmt.Registry) error { if err := m.Vrf.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -422,6 +438,10 @@ func (m *IPAddress) validateVrf(formats strfmt.Registry) error { func (m *IPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAssignedObject(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -480,9 +500,14 @@ func (m *IPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry return nil } +func (m *IPAddress) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *IPAddress) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -504,6 +529,8 @@ func (m *IPAddress) contextValidateFamily(ctx context.Context, formats strfmt.Re if err := m.Family.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -536,6 +563,8 @@ func (m *IPAddress) contextValidateNatInside(ctx context.Context, formats strfmt if err := m.NatInside.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nat_inside") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_inside") } return err } @@ -550,6 +579,8 @@ func (m *IPAddress) contextValidateNatOutside(ctx context.Context, formats strfm if err := m.NatOutside.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("nat_outside") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nat_outside") } return err } @@ -564,6 +595,8 @@ func (m *IPAddress) contextValidateRole(ctx context.Context, formats strfmt.Regi if err := m.Role.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -578,6 +611,8 @@ func (m *IPAddress) contextValidateStatus(ctx context.Context, formats strfmt.Re if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -594,6 +629,8 @@ func (m *IPAddress) contextValidateTags(ctx context.Context, formats strfmt.Regi if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -610,6 +647,8 @@ func (m *IPAddress) contextValidateTenant(ctx context.Context, formats strfmt.Re if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -633,6 +672,8 @@ func (m *IPAddress) contextValidateVrf(ctx context.Context, formats strfmt.Regis if err := m.Vrf.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -805,12 +846,12 @@ type IPAddressRole struct { // label // Required: true - // Enum: [Loopback Secondary Anycast VIP VRRP HSRP GLBP CARP] + // Enum: [Loopback Secondary Anycast VIP VRRP HSRP GLBP CARP r] Label *string `json:"label"` // value // Required: true - // Enum: [loopback secondary anycast vip vrrp hsrp glbp carp] + // Enum: [loopback secondary anycast vip vrrp hsrp glbp carp g] Value *string `json:"value"` } @@ -836,7 +877,7 @@ var ipAddressRoleTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["Loopback","Secondary","Anycast","VIP","VRRP","HSRP","GLBP","CARP"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["Loopback","Secondary","Anycast","VIP","VRRP","HSRP","GLBP","CARP","r"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -869,6 +910,9 @@ const ( // IPAddressRoleLabelCARP captures enum value "CARP" IPAddressRoleLabelCARP string = "CARP" + + // IPAddressRoleLabelR captures enum value "r" + IPAddressRoleLabelR string = "r" ) // prop value enum @@ -897,7 +941,7 @@ var ipAddressRoleTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["loopback","secondary","anycast","vip","vrrp","hsrp","glbp","carp"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["loopback","secondary","anycast","vip","vrrp","hsrp","glbp","carp","g"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -930,6 +974,9 @@ const ( // IPAddressRoleValueCarp captures enum value "carp" IPAddressRoleValueCarp string = "carp" + + // IPAddressRoleValueG captures enum value "g" + IPAddressRoleValueG string = "g" ) // prop value enum diff --git a/netbox/models/ip_range.go b/netbox/models/ip_range.go index d3d75957e..54ecae9c5 100644 --- a/netbox/models/ip_range.go +++ b/netbox/models/ip_range.go @@ -42,8 +42,8 @@ type IPRange struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -65,7 +65,7 @@ type IPRange struct { // family Family *IPRangeFamily `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -168,7 +168,7 @@ func (m *IPRange) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -205,6 +205,8 @@ func (m *IPRange) validateFamily(formats strfmt.Registry) error { if err := m.Family.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -234,6 +236,8 @@ func (m *IPRange) validateRole(formats strfmt.Registry) error { if err := m.Role.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -260,6 +264,8 @@ func (m *IPRange) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -282,6 +288,8 @@ func (m *IPRange) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -301,6 +309,8 @@ func (m *IPRange) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -330,6 +340,8 @@ func (m *IPRange) validateVrf(formats strfmt.Registry) error { if err := m.Vrf.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -411,7 +423,7 @@ func (m *IPRange) contextValidateChildren(ctx context.Context, formats strfmt.Re func (m *IPRange) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -433,6 +445,8 @@ func (m *IPRange) contextValidateFamily(ctx context.Context, formats strfmt.Regi if err := m.Family.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -465,6 +479,8 @@ func (m *IPRange) contextValidateRole(ctx context.Context, formats strfmt.Regist if err := m.Role.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -488,6 +504,8 @@ func (m *IPRange) contextValidateStatus(ctx context.Context, formats strfmt.Regi if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -504,6 +522,8 @@ func (m *IPRange) contextValidateTags(ctx context.Context, formats strfmt.Regist if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -520,6 +540,8 @@ func (m *IPRange) contextValidateTenant(ctx context.Context, formats strfmt.Regi if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -543,6 +565,8 @@ func (m *IPRange) contextValidateVrf(ctx context.Context, formats strfmt.Registr if err := m.Vrf.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } diff --git a/netbox/models/job_result.go b/netbox/models/job_result.go index 147def84e..099ae70f0 100644 --- a/netbox/models/job_result.go +++ b/netbox/models/job_result.go @@ -51,7 +51,7 @@ type JobResult struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -183,6 +183,8 @@ func (m *JobResult) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -212,6 +214,8 @@ func (m *JobResult) validateUser(formats strfmt.Registry) error { if err := m.User.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } @@ -300,6 +304,8 @@ func (m *JobResult) contextValidateStatus(ctx context.Context, formats strfmt.Re if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -323,6 +329,8 @@ func (m *JobResult) contextValidateUser(ctx context.Context, formats strfmt.Regi if err := m.User.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } diff --git a/netbox/models/journal_entry.go b/netbox/models/journal_entry.go index e1f1b4fa5..68455fccb 100644 --- a/netbox/models/journal_entry.go +++ b/netbox/models/journal_entry.go @@ -23,6 +23,7 @@ package models import ( "context" "encoding/json" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -37,11 +38,11 @@ type JournalEntry struct { // Assigned object // Read Only: true - AssignedObject interface{} `json:"assigned_object,omitempty"` + AssignedObject map[string]*string `json:"assigned_object,omitempty"` // Assigned object id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 AssignedObjectID *int64 `json:"assigned_object_id"` @@ -62,17 +63,23 @@ type JournalEntry struct { // Created by CreatedBy *int64 `json:"created_by,omitempty"` + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + // Display // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` // kind Kind *JournalEntryKind `json:"kind,omitempty"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -103,6 +110,10 @@ func (m *JournalEntry) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -123,7 +134,7 @@ func (m *JournalEntry) validateAssignedObjectID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 9.223372036854776e+18, false); err != nil { return err } @@ -173,6 +184,8 @@ func (m *JournalEntry) validateKind(formats strfmt.Registry) error { if err := m.Kind.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("kind") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("kind") } return err } @@ -181,6 +194,32 @@ func (m *JournalEntry) validateKind(formats strfmt.Registry) error { return nil } +func (m *JournalEntry) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *JournalEntry) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -197,6 +236,10 @@ func (m *JournalEntry) validateURL(formats strfmt.Registry) error { func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAssignedObject(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -213,6 +256,10 @@ func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -223,6 +270,11 @@ func (m *JournalEntry) ContextValidate(ctx context.Context, formats strfmt.Regis return nil } +func (m *JournalEntry) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *JournalEntry) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { @@ -256,6 +308,8 @@ func (m *JournalEntry) contextValidateKind(ctx context.Context, formats strfmt.R if err := m.Kind.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("kind") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("kind") } return err } @@ -264,6 +318,26 @@ func (m *JournalEntry) contextValidateKind(ctx context.Context, formats strfmt.R return nil } +func (m *JournalEntry) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *JournalEntry) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/location.go b/netbox/models/location.go index 1957924bc..6039a0ff9 100644 --- a/netbox/models/location.go +++ b/netbox/models/location.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type Location struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +59,7 @@ type Location struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -91,6 +92,12 @@ type Location struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + + // tenant + Tenant *NestedTenant `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri @@ -129,6 +136,14 @@ func (m *Location) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -144,7 +159,7 @@ func (m *Location) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -201,6 +216,8 @@ func (m *Location) validateParent(formats strfmt.Registry) error { if err := m.Parent.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -219,6 +236,8 @@ func (m *Location) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -248,6 +267,51 @@ func (m *Location) validateSlug(formats strfmt.Registry) error { return nil } +func (m *Location) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Location) validateTenant(formats strfmt.Registry) error { + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") + } + return err + } + } + + return nil +} + func (m *Location) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -300,6 +364,14 @@ func (m *Location) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTenant(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -321,7 +393,7 @@ func (m *Location) contextValidateDepth(ctx context.Context, formats strfmt.Regi func (m *Location) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -370,6 +442,8 @@ func (m *Location) contextValidateParent(ctx context.Context, formats strfmt.Reg if err := m.Parent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -393,6 +467,44 @@ func (m *Location) contextValidateSite(ctx context.Context, formats strfmt.Regis if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") + } + return err + } + } + + return nil +} + +func (m *Location) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Location) contextValidateTenant(ctx context.Context, formats strfmt.Registry) error { + + if m.Tenant != nil { + if err := m.Tenant.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/manufacturer.go b/netbox/models/manufacturer.go index 0479fc8a8..b656a834d 100644 --- a/netbox/models/manufacturer.go +++ b/netbox/models/manufacturer.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -36,8 +37,8 @@ type Manufacturer struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type Manufacturer struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -84,6 +85,9 @@ type Manufacturer struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -114,6 +118,10 @@ func (m *Manufacturer) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -129,7 +137,7 @@ func (m *Manufacturer) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -198,6 +206,32 @@ func (m *Manufacturer) validateSlug(formats strfmt.Registry) error { return nil } +func (m *Manufacturer) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Manufacturer) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -242,6 +276,10 @@ func (m *Manufacturer) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -254,7 +292,7 @@ func (m *Manufacturer) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *Manufacturer) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -315,6 +353,26 @@ func (m *Manufacturer) contextValidatePlatformCount(ctx context.Context, formats return nil } +func (m *Manufacturer) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Manufacturer) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/module.go b/netbox/models/module.go new file mode 100644 index 000000000..3052e4888 --- /dev/null +++ b/netbox/models/module.go @@ -0,0 +1,460 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Module module +// +// swagger:model Module +type Module struct { + + // Asset tag + // + // A unique tag used to identify this device + // Max Length: 50 + AssetTag *string `json:"asset_tag,omitempty"` + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // device + // Required: true + Device *NestedDevice `json:"device"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // module bay + // Required: true + ModuleBay *NestedModuleBay `json:"module_bay"` + + // module type + // Required: true + ModuleType *NestedModuleType `json:"module_type"` + + // Serial number + // Max Length: 50 + Serial string `json:"serial,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this module +func (m *Module) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssetTag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleBay(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSerial(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Module) validateAssetTag(formats strfmt.Registry) error { + if swag.IsZero(m.AssetTag) { // not required + return nil + } + + if err := validate.MaxLength("asset_tag", "body", *m.AssetTag, 50); err != nil { + return err + } + + return nil +} + +func (m *Module) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Module) validateDevice(formats strfmt.Registry) error { + + if err := validate.Required("device", "body", m.Device); err != nil { + return err + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *Module) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Module) validateModuleBay(formats strfmt.Registry) error { + + if err := validate.Required("module_bay", "body", m.ModuleBay); err != nil { + return err + } + + if m.ModuleBay != nil { + if err := m.ModuleBay.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_bay") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_bay") + } + return err + } + } + + return nil +} + +func (m *Module) validateModuleType(formats strfmt.Registry) error { + + if err := validate.Required("module_type", "body", m.ModuleType); err != nil { + return err + } + + if m.ModuleType != nil { + if err := m.ModuleType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_type") + } + return err + } + } + + return nil +} + +func (m *Module) validateSerial(formats strfmt.Registry) error { + if swag.IsZero(m.Serial) { // not required + return nil + } + + if err := validate.MaxLength("serial", "body", m.Serial, 50); err != nil { + return err + } + + return nil +} + +func (m *Module) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Module) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this module based on the context it is used +func (m *Module) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDevice(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModuleBay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModuleType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Module) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *Module) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { + + if m.Device != nil { + if err := m.Device.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *Module) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *Module) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *Module) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *Module) contextValidateModuleBay(ctx context.Context, formats strfmt.Registry) error { + + if m.ModuleBay != nil { + if err := m.ModuleBay.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_bay") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_bay") + } + return err + } + } + + return nil +} + +func (m *Module) contextValidateModuleType(ctx context.Context, formats strfmt.Registry) error { + + if m.ModuleType != nil { + if err := m.ModuleType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_type") + } + return err + } + } + + return nil +} + +func (m *Module) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Module) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Module) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Module) UnmarshalBinary(b []byte) error { + var res Module + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/module_bay.go b/netbox/models/module_bay.go new file mode 100644 index 000000000..3f4d1eefc --- /dev/null +++ b/netbox/models/module_bay.go @@ -0,0 +1,410 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ModuleBay module bay +// +// swagger:model ModuleBay +type ModuleBay struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // device + // Required: true + Device *NestedDevice `json:"device"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Label + // + // Physical label + // Max Length: 64 + Label string `json:"label,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Position + // + // Identifier to reference when renaming installed components + // Max Length: 30 + Position string `json:"position,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this module bay +func (m *ModuleBay) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePosition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleBay) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) validateDevice(formats strfmt.Registry) error { + + if err := validate.Required("device", "body", m.Device); err != nil { + return err + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *ModuleBay) validateLabel(formats strfmt.Registry) error { + if swag.IsZero(m.Label) { // not required + return nil + } + + if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) validatePosition(formats strfmt.Registry) error { + if swag.IsZero(m.Position) { // not required + return nil + } + + if err := validate.MaxLength("position", "body", m.Position, 30); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ModuleBay) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this module bay based on the context it is used +func (m *ModuleBay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDevice(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { + + if m.Device != nil { + if err := m.Device.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *ModuleBay) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBay) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ModuleBay) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ModuleBay) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ModuleBay) UnmarshalBinary(b []byte) error { + var res ModuleBay + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/module_bay_template.go b/netbox/models/module_bay_template.go new file mode 100644 index 000000000..064d7fc80 --- /dev/null +++ b/netbox/models/module_bay_template.go @@ -0,0 +1,349 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ModuleBayTemplate module bay template +// +// swagger:model ModuleBayTemplate +type ModuleBayTemplate struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // device type + // Required: true + DeviceType *NestedDeviceType `json:"device_type"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Label + // + // Physical label + // Max Length: 64 + Label string `json:"label,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Position + // + // Identifier to reference when renaming installed components + // Max Length: 30 + Position string `json:"position,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this module bay template +func (m *ModuleBayTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeviceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePosition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleBayTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) validateDeviceType(formats strfmt.Registry) error { + + if err := validate.Required("device_type", "body", m.DeviceType); err != nil { + return err + } + + if m.DeviceType != nil { + if err := m.DeviceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") + } + return err + } + } + + return nil +} + +func (m *ModuleBayTemplate) validateLabel(formats strfmt.Registry) error { + if swag.IsZero(m.Label) { // not required + return nil + } + + if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) validatePosition(formats strfmt.Registry) error { + if swag.IsZero(m.Position) { // not required + return nil + } + + if err := validate.MaxLength("position", "body", m.Position, 30); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this module bay template based on the context it is used +func (m *ModuleBayTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDeviceType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) contextValidateDeviceType(ctx context.Context, formats strfmt.Registry) error { + + if m.DeviceType != nil { + if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") + } + return err + } + } + + return nil +} + +func (m *ModuleBayTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ModuleBayTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ModuleBayTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ModuleBayTemplate) UnmarshalBinary(b []byte) error { + var res ModuleBayTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/module_nested_module_bay.go b/netbox/models/module_nested_module_bay.go new file mode 100644 index 000000000..9d358e7d5 --- /dev/null +++ b/netbox/models/module_nested_module_bay.go @@ -0,0 +1,169 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ModuleNestedModuleBay module nested module bay +// +// swagger:model ModuleNestedModuleBay +type ModuleNestedModuleBay struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this module nested module bay +func (m *ModuleNestedModuleBay) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleNestedModuleBay) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *ModuleNestedModuleBay) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this module nested module bay based on the context it is used +func (m *ModuleNestedModuleBay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleNestedModuleBay) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ModuleNestedModuleBay) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ModuleNestedModuleBay) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ModuleNestedModuleBay) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ModuleNestedModuleBay) UnmarshalBinary(b []byte) error { + var res ModuleNestedModuleBay + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/module_type.go b/netbox/models/module_type.go new file mode 100644 index 000000000..dd3ab6bc5 --- /dev/null +++ b/netbox/models/module_type.go @@ -0,0 +1,371 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ModuleType module type +// +// swagger:model ModuleType +type ModuleType struct { + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // manufacturer + // Required: true + Manufacturer *NestedManufacturer `json:"manufacturer"` + + // Model + // Required: true + // Max Length: 100 + // Min Length: 1 + Model *string `json:"model"` + + // Part number + // + // Discrete part number (optional) + // Max Length: 50 + PartNumber string `json:"part_number,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this module type +func (m *ModuleType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManufacturer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModel(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePartNumber(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleType) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) validateManufacturer(formats strfmt.Registry) error { + + if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil { + return err + } + + if m.Manufacturer != nil { + if err := m.Manufacturer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *ModuleType) validateModel(formats strfmt.Registry) error { + + if err := validate.Required("model", "body", m.Model); err != nil { + return err + } + + if err := validate.MinLength("model", "body", *m.Model, 1); err != nil { + return err + } + + if err := validate.MaxLength("model", "body", *m.Model, 100); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) validatePartNumber(formats strfmt.Registry) error { + if swag.IsZero(m.PartNumber) { // not required + return nil + } + + if err := validate.MaxLength("part_number", "body", m.PartNumber, 50); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ModuleType) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this module type based on the context it is used +func (m *ModuleType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateManufacturer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ModuleType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ModuleType) contextValidateManufacturer(ctx context.Context, formats strfmt.Registry) error { + + if m.Manufacturer != nil { + if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *ModuleType) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ModuleType) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ModuleType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ModuleType) UnmarshalBinary(b []byte) error { + var res ModuleType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_a_s_n.go b/netbox/models/nested_a_s_n.go new file mode 100644 index 000000000..b769888ed --- /dev/null +++ b/netbox/models/nested_a_s_n.go @@ -0,0 +1,171 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedASN nested a s n +// +// swagger:model NestedASN +type NestedASN struct { + + // ASN + // + // 32-bit autonomous system number + // Required: true + // Maximum: 4.294967295e+09 + // Minimum: 1 + Asn *int64 `json:"asn"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested a s n +func (m *NestedASN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAsn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedASN) validateAsn(formats strfmt.Registry) error { + + if err := validate.Required("asn", "body", m.Asn); err != nil { + return err + } + + if err := validate.MinimumInt("asn", "body", *m.Asn, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("asn", "body", *m.Asn, 4.294967295e+09, false); err != nil { + return err + } + + return nil +} + +func (m *NestedASN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested a s n based on the context it is used +func (m *NestedASN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedASN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedASN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedASN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedASN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedASN) UnmarshalBinary(b []byte) error { + var res NestedASN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_cable.go b/netbox/models/nested_cable.go index 6d4570f3c..251ceccf2 100644 --- a/netbox/models/nested_cable.go +++ b/netbox/models/nested_cable.go @@ -38,7 +38,7 @@ type NestedCable struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_circuit.go b/netbox/models/nested_circuit.go index bf9cc99b2..668afd8ec 100644 --- a/netbox/models/nested_circuit.go +++ b/netbox/models/nested_circuit.go @@ -44,7 +44,7 @@ type NestedCircuit struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_circuit_type.go b/netbox/models/nested_circuit_type.go index b54d5a5ea..e51cf0ef8 100644 --- a/netbox/models/nested_circuit_type.go +++ b/netbox/models/nested_circuit_type.go @@ -42,7 +42,7 @@ type NestedCircuitType struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_cluster.go b/netbox/models/nested_cluster.go index acc533358..075574156 100644 --- a/netbox/models/nested_cluster.go +++ b/netbox/models/nested_cluster.go @@ -38,7 +38,7 @@ type NestedCluster struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_cluster_group.go b/netbox/models/nested_cluster_group.go index af1e8b6cc..2cbfe6590 100644 --- a/netbox/models/nested_cluster_group.go +++ b/netbox/models/nested_cluster_group.go @@ -42,7 +42,7 @@ type NestedClusterGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_cluster_type.go b/netbox/models/nested_cluster_type.go index 43f22641e..7d6bb45b9 100644 --- a/netbox/models/nested_cluster_type.go +++ b/netbox/models/nested_cluster_type.go @@ -42,7 +42,7 @@ type NestedClusterType struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_contact.go b/netbox/models/nested_contact.go new file mode 100644 index 000000000..2b737e9ee --- /dev/null +++ b/netbox/models/nested_contact.go @@ -0,0 +1,169 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedContact nested contact +// +// swagger:model NestedContact +type NestedContact struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested contact +func (m *NestedContact) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedContact) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedContact) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested contact based on the context it is used +func (m *NestedContact) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedContact) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedContact) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedContact) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedContact) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedContact) UnmarshalBinary(b []byte) error { + var res NestedContact + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_contact_group.go b/netbox/models/nested_contact_group.go new file mode 100644 index 000000000..3d9fdc135 --- /dev/null +++ b/netbox/models/nested_contact_group.go @@ -0,0 +1,235 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedContactGroup nested contact group +// +// swagger:model NestedContactGroup +type NestedContactGroup struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Contact count + // Read Only: true + ContactCount int64 `json:"contact_count,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested contact group +func (m *NestedContactGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedContactGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedContactGroup) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *NestedContactGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested contact group based on the context it is used +func (m *NestedContactGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateContactCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedContactGroup) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *NestedContactGroup) contextValidateContactCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "contact_count", "body", int64(m.ContactCount)); err != nil { + return err + } + + return nil +} + +func (m *NestedContactGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedContactGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedContactGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedContactGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedContactGroup) UnmarshalBinary(b []byte) error { + var res NestedContactGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_contact_role.go b/netbox/models/nested_contact_role.go new file mode 100644 index 000000000..bf2dfec5e --- /dev/null +++ b/netbox/models/nested_contact_role.go @@ -0,0 +1,201 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedContactRole nested contact role +// +// swagger:model NestedContactRole +type NestedContactRole struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested contact role +func (m *NestedContactRole) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedContactRole) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedContactRole) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *NestedContactRole) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested contact role based on the context it is used +func (m *NestedContactRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedContactRole) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedContactRole) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedContactRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedContactRole) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedContactRole) UnmarshalBinary(b []byte) error { + var res NestedContactRole + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_device.go b/netbox/models/nested_device.go index 2419d4ac9..574d85346 100644 --- a/netbox/models/nested_device.go +++ b/netbox/models/nested_device.go @@ -38,7 +38,7 @@ type NestedDevice struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_device_role.go b/netbox/models/nested_device_role.go index e3a9e45cb..ea432b811 100644 --- a/netbox/models/nested_device_role.go +++ b/netbox/models/nested_device_role.go @@ -42,7 +42,7 @@ type NestedDeviceRole struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_device_type.go b/netbox/models/nested_device_type.go index ec95a6b4a..6a89d433e 100644 --- a/netbox/models/nested_device_type.go +++ b/netbox/models/nested_device_type.go @@ -42,7 +42,7 @@ type NestedDeviceType struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -103,6 +103,8 @@ func (m *NestedDeviceType) validateManufacturer(formats strfmt.Registry) error { if err := m.Manufacturer.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } @@ -224,6 +226,8 @@ func (m *NestedDeviceType) contextValidateManufacturer(ctx context.Context, form if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } diff --git a/netbox/models/nested_f_h_r_p_group.go b/netbox/models/nested_f_h_r_p_group.go new file mode 100644 index 000000000..bc31e7a6f --- /dev/null +++ b/netbox/models/nested_f_h_r_p_group.go @@ -0,0 +1,237 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedFHRPGroup nested f h r p group +// +// swagger:model NestedFHRPGroup +type NestedFHRPGroup struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Group ID + // Required: true + // Maximum: 32767 + // Minimum: 0 + GroupID *int64 `json:"group_id"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Protocol + // Required: true + // Enum: [vrrp2 vrrp3 carp clusterxl hsrp glbp other] + Protocol *string `json:"protocol"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested f h r p group +func (m *NestedFHRPGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProtocol(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedFHRPGroup) validateGroupID(formats strfmt.Registry) error { + + if err := validate.Required("group_id", "body", m.GroupID); err != nil { + return err + } + + if err := validate.MinimumInt("group_id", "body", *m.GroupID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("group_id", "body", *m.GroupID, 32767, false); err != nil { + return err + } + + return nil +} + +var nestedFHRPGroupTypeProtocolPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["vrrp2","vrrp3","carp","clusterxl","hsrp","glbp","other"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + nestedFHRPGroupTypeProtocolPropEnum = append(nestedFHRPGroupTypeProtocolPropEnum, v) + } +} + +const ( + + // NestedFHRPGroupProtocolVrrp2 captures enum value "vrrp2" + NestedFHRPGroupProtocolVrrp2 string = "vrrp2" + + // NestedFHRPGroupProtocolVrrp3 captures enum value "vrrp3" + NestedFHRPGroupProtocolVrrp3 string = "vrrp3" + + // NestedFHRPGroupProtocolCarp captures enum value "carp" + NestedFHRPGroupProtocolCarp string = "carp" + + // NestedFHRPGroupProtocolClusterxl captures enum value "clusterxl" + NestedFHRPGroupProtocolClusterxl string = "clusterxl" + + // NestedFHRPGroupProtocolHsrp captures enum value "hsrp" + NestedFHRPGroupProtocolHsrp string = "hsrp" + + // NestedFHRPGroupProtocolGlbp captures enum value "glbp" + NestedFHRPGroupProtocolGlbp string = "glbp" + + // NestedFHRPGroupProtocolOther captures enum value "other" + NestedFHRPGroupProtocolOther string = "other" +) + +// prop value enum +func (m *NestedFHRPGroup) validateProtocolEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, nestedFHRPGroupTypeProtocolPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *NestedFHRPGroup) validateProtocol(formats strfmt.Registry) error { + + if err := validate.Required("protocol", "body", m.Protocol); err != nil { + return err + } + + // value enum + if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { + return err + } + + return nil +} + +func (m *NestedFHRPGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested f h r p group based on the context it is used +func (m *NestedFHRPGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedFHRPGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedFHRPGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedFHRPGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedFHRPGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedFHRPGroup) UnmarshalBinary(b []byte) error { + var res NestedFHRPGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_interface.go b/netbox/models/nested_interface.go index 89c8a2ab3..7b5322fcf 100644 --- a/netbox/models/nested_interface.go +++ b/netbox/models/nested_interface.go @@ -48,7 +48,7 @@ type NestedInterface struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -95,6 +95,8 @@ func (m *NestedInterface) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -177,6 +179,8 @@ func (m *NestedInterface) contextValidateDevice(ctx context.Context, formats str if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } diff --git a/netbox/models/nested_inventory_item_role.go b/netbox/models/nested_inventory_item_role.go new file mode 100644 index 000000000..b294b2f2c --- /dev/null +++ b/netbox/models/nested_inventory_item_role.go @@ -0,0 +1,218 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedInventoryItemRole nested inventory item role +// +// swagger:model NestedInventoryItemRole +type NestedInventoryItemRole struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Inventoryitem count + // Read Only: true + InventoryitemCount int64 `json:"inventoryitem_count,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested inventory item role +func (m *NestedInventoryItemRole) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedInventoryItemRole) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedInventoryItemRole) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *NestedInventoryItemRole) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested inventory item role based on the context it is used +func (m *NestedInventoryItemRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInventoryitemCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedInventoryItemRole) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedInventoryItemRole) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedInventoryItemRole) contextValidateInventoryitemCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "inventoryitem_count", "body", int64(m.InventoryitemCount)); err != nil { + return err + } + + return nil +} + +func (m *NestedInventoryItemRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedInventoryItemRole) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedInventoryItemRole) UnmarshalBinary(b []byte) error { + var res NestedInventoryItemRole + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_ip_address.go b/netbox/models/nested_ip_address.go index 1de68747b..1543c89ff 100644 --- a/netbox/models/nested_ip_address.go +++ b/netbox/models/nested_ip_address.go @@ -48,7 +48,7 @@ type NestedIPAddress struct { // Read Only: true Family int64 `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_location.go b/netbox/models/nested_location.go index 9c875ff1b..7a816376b 100644 --- a/netbox/models/nested_location.go +++ b/netbox/models/nested_location.go @@ -42,7 +42,7 @@ type NestedLocation struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_manufacturer.go b/netbox/models/nested_manufacturer.go index 59b4981ae..1bc84606a 100644 --- a/netbox/models/nested_manufacturer.go +++ b/netbox/models/nested_manufacturer.go @@ -42,7 +42,7 @@ type NestedManufacturer struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_module.go b/netbox/models/nested_module.go new file mode 100644 index 000000000..68d104504 --- /dev/null +++ b/netbox/models/nested_module.go @@ -0,0 +1,280 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedModule nested module +// +// swagger:model NestedModule +type NestedModule struct { + + // device + Device *NestedDevice `json:"device,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // module bay + ModuleBay *ModuleNestedModuleBay `json:"module_bay,omitempty"` + + // module type + ModuleType *NestedModuleType `json:"module_type,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested module +func (m *NestedModule) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleBay(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedModule) validateDevice(formats strfmt.Registry) error { + if swag.IsZero(m.Device) { // not required + return nil + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *NestedModule) validateModuleBay(formats strfmt.Registry) error { + if swag.IsZero(m.ModuleBay) { // not required + return nil + } + + if m.ModuleBay != nil { + if err := m.ModuleBay.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_bay") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_bay") + } + return err + } + } + + return nil +} + +func (m *NestedModule) validateModuleType(formats strfmt.Registry) error { + if swag.IsZero(m.ModuleType) { // not required + return nil + } + + if m.ModuleType != nil { + if err := m.ModuleType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_type") + } + return err + } + } + + return nil +} + +func (m *NestedModule) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested module based on the context it is used +func (m *NestedModule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDevice(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModuleBay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModuleType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedModule) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { + + if m.Device != nil { + if err := m.Device.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *NestedModule) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedModule) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedModule) contextValidateModuleBay(ctx context.Context, formats strfmt.Registry) error { + + if m.ModuleBay != nil { + if err := m.ModuleBay.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_bay") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_bay") + } + return err + } + } + + return nil +} + +func (m *NestedModule) contextValidateModuleType(ctx context.Context, formats strfmt.Registry) error { + + if m.ModuleType != nil { + if err := m.ModuleType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module_type") + } + return err + } + } + + return nil +} + +func (m *NestedModule) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedModule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedModule) UnmarshalBinary(b []byte) error { + var res NestedModule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_module_bay.go b/netbox/models/nested_module_bay.go new file mode 100644 index 000000000..b3fba1150 --- /dev/null +++ b/netbox/models/nested_module_bay.go @@ -0,0 +1,215 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedModuleBay nested module bay +// +// swagger:model NestedModuleBay +type NestedModuleBay struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // module + Module *NestedModule `json:"module,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested module bay +func (m *NestedModuleBay) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedModuleBay) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + +func (m *NestedModuleBay) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *NestedModuleBay) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested module bay based on the context it is used +func (m *NestedModuleBay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedModuleBay) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedModuleBay) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedModuleBay) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + +func (m *NestedModuleBay) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedModuleBay) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedModuleBay) UnmarshalBinary(b []byte) error { + var res NestedModuleBay + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_module_type.go b/netbox/models/nested_module_type.go new file mode 100644 index 000000000..cc36876a4 --- /dev/null +++ b/netbox/models/nested_module_type.go @@ -0,0 +1,215 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedModuleType nested module type +// +// swagger:model NestedModuleType +type NestedModuleType struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // manufacturer + Manufacturer *NestedManufacturer `json:"manufacturer,omitempty"` + + // Model + // Required: true + // Max Length: 100 + // Min Length: 1 + Model *string `json:"model"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested module type +func (m *NestedModuleType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManufacturer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedModuleType) validateManufacturer(formats strfmt.Registry) error { + if swag.IsZero(m.Manufacturer) { // not required + return nil + } + + if m.Manufacturer != nil { + if err := m.Manufacturer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *NestedModuleType) validateModel(formats strfmt.Registry) error { + + if err := validate.Required("model", "body", m.Model); err != nil { + return err + } + + if err := validate.MinLength("model", "body", *m.Model, 1); err != nil { + return err + } + + if err := validate.MaxLength("model", "body", *m.Model, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedModuleType) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested module type based on the context it is used +func (m *NestedModuleType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateManufacturer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedModuleType) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedModuleType) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedModuleType) contextValidateManufacturer(ctx context.Context, formats strfmt.Registry) error { + + if m.Manufacturer != nil { + if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") + } + return err + } + } + + return nil +} + +func (m *NestedModuleType) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedModuleType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedModuleType) UnmarshalBinary(b []byte) error { + var res NestedModuleType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_platform.go b/netbox/models/nested_platform.go index 730bcf4a7..05a99cef5 100644 --- a/netbox/models/nested_platform.go +++ b/netbox/models/nested_platform.go @@ -42,7 +42,7 @@ type NestedPlatform struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_power_panel.go b/netbox/models/nested_power_panel.go index 2f874cff0..bc4fea09c 100644 --- a/netbox/models/nested_power_panel.go +++ b/netbox/models/nested_power_panel.go @@ -38,7 +38,7 @@ type NestedPowerPanel struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_power_port.go b/netbox/models/nested_power_port.go index ea4729c00..a69a42019 100644 --- a/netbox/models/nested_power_port.go +++ b/netbox/models/nested_power_port.go @@ -48,7 +48,7 @@ type NestedPowerPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -95,6 +95,8 @@ func (m *NestedPowerPort) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -177,6 +179,8 @@ func (m *NestedPowerPort) contextValidateDevice(ctx context.Context, formats str if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } diff --git a/netbox/models/nested_power_port_template.go b/netbox/models/nested_power_port_template.go index 32757ccab..aab4e2f03 100644 --- a/netbox/models/nested_power_port_template.go +++ b/netbox/models/nested_power_port_template.go @@ -38,7 +38,7 @@ type NestedPowerPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_provider.go b/netbox/models/nested_provider.go index 5d4d786e9..091fe1a5e 100644 --- a/netbox/models/nested_provider.go +++ b/netbox/models/nested_provider.go @@ -42,7 +42,7 @@ type NestedProvider struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_provider_network.go b/netbox/models/nested_provider_network.go index 8244e9818..f90670482 100644 --- a/netbox/models/nested_provider_network.go +++ b/netbox/models/nested_provider_network.go @@ -38,7 +38,7 @@ type NestedProviderNetwork struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_r_i_r.go b/netbox/models/nested_r_i_r.go index a684b468e..91b5b02b6 100644 --- a/netbox/models/nested_r_i_r.go +++ b/netbox/models/nested_r_i_r.go @@ -42,7 +42,7 @@ type NestedRIR struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_rack.go b/netbox/models/nested_rack.go index 69b3aff79..df1afe9c7 100644 --- a/netbox/models/nested_rack.go +++ b/netbox/models/nested_rack.go @@ -42,7 +42,7 @@ type NestedRack struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_rack_role.go b/netbox/models/nested_rack_role.go index 7e2462824..137992af7 100644 --- a/netbox/models/nested_rack_role.go +++ b/netbox/models/nested_rack_role.go @@ -38,7 +38,7 @@ type NestedRackRole struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_rear_port_template.go b/netbox/models/nested_rear_port_template.go index 162b221d5..d2f7fc3f7 100644 --- a/netbox/models/nested_rear_port_template.go +++ b/netbox/models/nested_rear_port_template.go @@ -38,7 +38,7 @@ type NestedRearPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_region.go b/netbox/models/nested_region.go index b0237c799..205dfc7ff 100644 --- a/netbox/models/nested_region.go +++ b/netbox/models/nested_region.go @@ -42,7 +42,7 @@ type NestedRegion struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_role.go b/netbox/models/nested_role.go index c7bb78e0f..39a2eba84 100644 --- a/netbox/models/nested_role.go +++ b/netbox/models/nested_role.go @@ -38,7 +38,7 @@ type NestedRole struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_route_target.go b/netbox/models/nested_route_target.go index 651537672..7b6cc27eb 100644 --- a/netbox/models/nested_route_target.go +++ b/netbox/models/nested_route_target.go @@ -38,7 +38,7 @@ type NestedRouteTarget struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_site.go b/netbox/models/nested_site.go index 8aa3d215e..09a308ed6 100644 --- a/netbox/models/nested_site.go +++ b/netbox/models/nested_site.go @@ -38,7 +38,7 @@ type NestedSite struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_site_group.go b/netbox/models/nested_site_group.go index 45506175d..d718357e7 100644 --- a/netbox/models/nested_site_group.go +++ b/netbox/models/nested_site_group.go @@ -42,7 +42,7 @@ type NestedSiteGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_tenant.go b/netbox/models/nested_tenant.go index 8900b8bfa..24a1802b6 100644 --- a/netbox/models/nested_tenant.go +++ b/netbox/models/nested_tenant.go @@ -38,7 +38,7 @@ type NestedTenant struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_tenant_group.go b/netbox/models/nested_tenant_group.go index 052e6fe1f..85499d358 100644 --- a/netbox/models/nested_tenant_group.go +++ b/netbox/models/nested_tenant_group.go @@ -42,7 +42,7 @@ type NestedTenantGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_v_l_a_n.go b/netbox/models/nested_v_l_a_n.go index 71043014d..178701a83 100644 --- a/netbox/models/nested_v_l_a_n.go +++ b/netbox/models/nested_v_l_a_n.go @@ -38,7 +38,7 @@ type NestedVLAN struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_v_l_a_n_group.go b/netbox/models/nested_v_l_a_n_group.go index 7c8ea9cec..0b4057a83 100644 --- a/netbox/models/nested_v_l_a_n_group.go +++ b/netbox/models/nested_v_l_a_n_group.go @@ -38,7 +38,7 @@ type NestedVLANGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_v_r_f.go b/netbox/models/nested_v_r_f.go index 4250633bf..4889a81c4 100644 --- a/netbox/models/nested_v_r_f.go +++ b/netbox/models/nested_v_r_f.go @@ -38,7 +38,7 @@ type NestedVRF struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_virtual_chassis.go b/netbox/models/nested_virtual_chassis.go index d78dfe66a..436b45671 100644 --- a/netbox/models/nested_virtual_chassis.go +++ b/netbox/models/nested_virtual_chassis.go @@ -34,7 +34,11 @@ import ( // swagger:model NestedVirtualChassis type NestedVirtualChassis struct { - // Id + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -90,6 +94,8 @@ func (m *NestedVirtualChassis) validateMaster(formats strfmt.Registry) error { if err := m.Master.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("master") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("master") } return err } @@ -131,6 +137,10 @@ func (m *NestedVirtualChassis) validateURL(formats strfmt.Registry) error { func (m *NestedVirtualChassis) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateID(ctx, formats); err != nil { res = append(res, err) } @@ -153,6 +163,15 @@ func (m *NestedVirtualChassis) ContextValidate(ctx context.Context, formats strf return nil } +func (m *NestedVirtualChassis) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + func (m *NestedVirtualChassis) contextValidateID(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { @@ -168,6 +187,8 @@ func (m *NestedVirtualChassis) contextValidateMaster(ctx context.Context, format if err := m.Master.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("master") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("master") } return err } diff --git a/netbox/models/nested_virtual_machine.go b/netbox/models/nested_virtual_machine.go index 8687f0fe5..fb9b09664 100644 --- a/netbox/models/nested_virtual_machine.go +++ b/netbox/models/nested_virtual_machine.go @@ -38,7 +38,7 @@ type NestedVirtualMachine struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/nested_vm_interface.go b/netbox/models/nested_vm_interface.go index ddef89f12..6fd98cfad 100644 --- a/netbox/models/nested_vm_interface.go +++ b/netbox/models/nested_vm_interface.go @@ -38,7 +38,7 @@ type NestedVMInterface struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -117,6 +117,8 @@ func (m *NestedVMInterface) validateVirtualMachine(formats strfmt.Registry) erro if err := m.VirtualMachine.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_machine") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_machine") } return err } @@ -184,6 +186,8 @@ func (m *NestedVMInterface) contextValidateVirtualMachine(ctx context.Context, f if err := m.VirtualMachine.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_machine") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_machine") } return err } diff --git a/netbox/models/nested_wireless_l_a_n.go b/netbox/models/nested_wireless_l_a_n.go new file mode 100644 index 000000000..e03bffd4c --- /dev/null +++ b/netbox/models/nested_wireless_l_a_n.go @@ -0,0 +1,169 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedWirelessLAN nested wireless l a n +// +// swagger:model NestedWirelessLAN +type NestedWirelessLAN struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // SSID + // Required: true + // Max Length: 32 + // Min Length: 1 + Ssid *string `json:"ssid"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested wireless l a n +func (m *NestedWirelessLAN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSsid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedWirelessLAN) validateSsid(formats strfmt.Registry) error { + + if err := validate.Required("ssid", "body", m.Ssid); err != nil { + return err + } + + if err := validate.MinLength("ssid", "body", *m.Ssid, 1); err != nil { + return err + } + + if err := validate.MaxLength("ssid", "body", *m.Ssid, 32); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLAN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested wireless l a n based on the context it is used +func (m *NestedWirelessLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedWirelessLAN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLAN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLAN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedWirelessLAN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedWirelessLAN) UnmarshalBinary(b []byte) error { + var res NestedWirelessLAN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_wireless_l_a_n_group.go b/netbox/models/nested_wireless_l_a_n_group.go new file mode 100644 index 000000000..10058ea7c --- /dev/null +++ b/netbox/models/nested_wireless_l_a_n_group.go @@ -0,0 +1,235 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedWirelessLANGroup nested wireless l a n group +// +// swagger:model NestedWirelessLANGroup +type NestedWirelessLANGroup struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // Wirelesslan count + // Read Only: true + WirelesslanCount int64 `json:"wirelesslan_count,omitempty"` +} + +// Validate validates this nested wireless l a n group +func (m *NestedWirelessLANGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedWirelessLANGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLANGroup) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLANGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested wireless l a n group based on the context it is used +func (m *NestedWirelessLANGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWirelesslanCount(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedWirelessLANGroup) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLANGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLANGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLANGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLANGroup) contextValidateWirelesslanCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "wirelesslan_count", "body", int64(m.WirelesslanCount)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedWirelessLANGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedWirelessLANGroup) UnmarshalBinary(b []byte) error { + var res NestedWirelessLANGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/nested_wireless_link.go b/netbox/models/nested_wireless_link.go new file mode 100644 index 000000000..3a154150f --- /dev/null +++ b/netbox/models/nested_wireless_link.go @@ -0,0 +1,162 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// NestedWirelessLink nested wireless link +// +// swagger:model NestedWirelessLink +type NestedWirelessLink struct { + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // SSID + // Max Length: 32 + Ssid string `json:"ssid,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this nested wireless link +func (m *NestedWirelessLink) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSsid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedWirelessLink) validateSsid(formats strfmt.Registry) error { + if swag.IsZero(m.Ssid) { // not required + return nil + } + + if err := validate.MaxLength("ssid", "body", m.Ssid, 32); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLink) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this nested wireless link based on the context it is used +func (m *NestedWirelessLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NestedWirelessLink) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLink) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *NestedWirelessLink) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NestedWirelessLink) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NestedWirelessLink) UnmarshalBinary(b []byte) error { + var res NestedWirelessLink + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/object_change.go b/netbox/models/object_change.go index be7936d4a..699843c04 100644 --- a/netbox/models/object_change.go +++ b/netbox/models/object_change.go @@ -44,11 +44,11 @@ type ObjectChange struct { // Serialize a nested representation of the changed object. // // Read Only: true - ChangedObject interface{} `json:"changed_object,omitempty"` + ChangedObject map[string]*string `json:"changed_object,omitempty"` // Changed object id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 ChangedObjectID *int64 `json:"changed_object_id"` @@ -60,7 +60,7 @@ type ObjectChange struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -143,6 +143,8 @@ func (m *ObjectChange) validateAction(formats strfmt.Registry) error { if err := m.Action.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("action") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("action") } return err } @@ -161,7 +163,7 @@ func (m *ObjectChange) validateChangedObjectID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("changed_object_id", "body", *m.ChangedObjectID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("changed_object_id", "body", *m.ChangedObjectID, 9.223372036854776e+18, false); err != nil { return err } @@ -213,6 +215,8 @@ func (m *ObjectChange) validateUser(formats strfmt.Registry) error { if err := m.User.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } @@ -241,6 +245,10 @@ func (m *ObjectChange) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := m.contextValidateChangedObject(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateChangedObjectType(ctx, formats); err != nil { res = append(res, err) } @@ -293,6 +301,8 @@ func (m *ObjectChange) contextValidateAction(ctx context.Context, formats strfmt if err := m.Action.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("action") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("action") } return err } @@ -301,6 +311,11 @@ func (m *ObjectChange) contextValidateAction(ctx context.Context, formats strfmt return nil } +func (m *ObjectChange) contextValidateChangedObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *ObjectChange) contextValidateChangedObjectType(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "changed_object_type", "body", string(m.ChangedObjectType)); err != nil { @@ -379,6 +394,8 @@ func (m *ObjectChange) contextValidateUser(ctx context.Context, formats strfmt.R if err := m.User.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } diff --git a/netbox/models/object_permission.go b/netbox/models/object_permission.go index 8785d6faa..f6516a1e5 100644 --- a/netbox/models/object_permission.go +++ b/netbox/models/object_permission.go @@ -59,7 +59,7 @@ type ObjectPermission struct { // Unique: true Groups []*NestedGroup `json:"groups"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -173,6 +173,8 @@ func (m *ObjectPermission) validateGroups(formats strfmt.Registry) error { if err := m.Groups[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("groups" + "." + strconv.Itoa(i)) } return err } @@ -243,6 +245,8 @@ func (m *ObjectPermission) validateUsers(formats strfmt.Registry) error { if err := m.Users[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("users" + "." + strconv.Itoa(i)) } return err } @@ -300,6 +304,8 @@ func (m *ObjectPermission) contextValidateGroups(ctx context.Context, formats st if err := m.Groups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("groups" + "." + strconv.Itoa(i)) } return err } @@ -336,6 +342,8 @@ func (m *ObjectPermission) contextValidateUsers(ctx context.Context, formats str if err := m.Users[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("users" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/platform.go b/netbox/models/platform.go index d41d16b1e..dbadccb4c 100644 --- a/netbox/models/platform.go +++ b/netbox/models/platform.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -36,8 +37,8 @@ type Platform struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type Platform struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -90,6 +91,9 @@ type Platform struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -132,6 +136,10 @@ func (m *Platform) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -147,7 +155,7 @@ func (m *Platform) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -187,6 +195,8 @@ func (m *Platform) validateManufacturer(formats strfmt.Registry) error { if err := m.Manufacturer.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } @@ -245,6 +255,32 @@ func (m *Platform) validateSlug(formats strfmt.Registry) error { return nil } +func (m *Platform) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Platform) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -285,6 +321,10 @@ func (m *Platform) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -301,7 +341,7 @@ func (m *Platform) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Platform) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -350,6 +390,8 @@ func (m *Platform) contextValidateManufacturer(ctx context.Context, formats strf if err := m.Manufacturer.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("manufacturer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("manufacturer") } return err } @@ -358,6 +400,26 @@ func (m *Platform) contextValidateManufacturer(ctx context.Context, formats strf return nil } +func (m *Platform) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Platform) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/power_feed.go b/netbox/models/power_feed.go index 80b23f08e..353ed10ec 100644 --- a/netbox/models/power_feed.go +++ b/netbox/models/power_feed.go @@ -48,18 +48,6 @@ type PowerFeed struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Comments Comments string `json:"comments,omitempty"` @@ -69,7 +57,7 @@ type PowerFeed struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -81,8 +69,8 @@ type PowerFeed struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -91,7 +79,7 @@ type PowerFeed struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -100,6 +88,18 @@ type PowerFeed struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected @@ -246,6 +246,8 @@ func (m *PowerFeed) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -259,7 +261,7 @@ func (m *PowerFeed) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -320,6 +322,8 @@ func (m *PowerFeed) validatePhase(formats strfmt.Registry) error { if err := m.Phase.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("phase") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("phase") } return err } @@ -338,6 +342,8 @@ func (m *PowerFeed) validatePowerPanel(formats strfmt.Registry) error { if err := m.PowerPanel.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("power_panel") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("power_panel") } return err } @@ -355,6 +361,8 @@ func (m *PowerFeed) validateRack(formats strfmt.Registry) error { if err := m.Rack.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -372,6 +380,8 @@ func (m *PowerFeed) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -389,6 +399,8 @@ func (m *PowerFeed) validateSupply(formats strfmt.Registry) error { if err := m.Supply.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("supply") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("supply") } return err } @@ -411,6 +423,8 @@ func (m *PowerFeed) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -430,6 +444,8 @@ func (m *PowerFeed) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -478,7 +494,7 @@ func (m *PowerFeed) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -506,6 +522,14 @@ func (m *PowerFeed) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidatePhase(ctx, formats); err != nil { res = append(res, err) } @@ -559,6 +583,8 @@ func (m *PowerFeed) contextValidateCable(ctx context.Context, formats strfmt.Reg if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -567,11 +593,7 @@ func (m *PowerFeed) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *PowerFeed) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *PowerFeed) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -596,7 +618,7 @@ func (m *PowerFeed) contextValidateConnectedEndpointType(ctx context.Context, fo func (m *PowerFeed) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -630,12 +652,28 @@ func (m *PowerFeed) contextValidateLastUpdated(ctx context.Context, formats strf return nil } +func (m *PowerFeed) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PowerFeed) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *PowerFeed) contextValidatePhase(ctx context.Context, formats strfmt.Registry) error { if m.Phase != nil { if err := m.Phase.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("phase") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("phase") } return err } @@ -650,6 +688,8 @@ func (m *PowerFeed) contextValidatePowerPanel(ctx context.Context, formats strfm if err := m.PowerPanel.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("power_panel") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("power_panel") } return err } @@ -664,6 +704,8 @@ func (m *PowerFeed) contextValidateRack(ctx context.Context, formats strfmt.Regi if err := m.Rack.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -678,6 +720,8 @@ func (m *PowerFeed) contextValidateStatus(ctx context.Context, formats strfmt.Re if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -692,6 +736,8 @@ func (m *PowerFeed) contextValidateSupply(ctx context.Context, formats strfmt.Re if err := m.Supply.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("supply") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("supply") } return err } @@ -708,6 +754,8 @@ func (m *PowerFeed) contextValidateTags(ctx context.Context, formats strfmt.Regi if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -724,6 +772,8 @@ func (m *PowerFeed) contextValidateType(ctx context.Context, formats strfmt.Regi if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } diff --git a/netbox/models/power_outlet.go b/netbox/models/power_outlet.go index eff412581..902e1adae 100644 --- a/netbox/models/power_outlet.go +++ b/netbox/models/power_outlet.go @@ -43,25 +43,13 @@ type PowerOutlet struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -73,8 +61,8 @@ type PowerOutlet struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -94,7 +82,7 @@ type PowerOutlet struct { // feed leg FeedLeg *PowerOutletFeedLeg `json:"feed_leg,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -109,11 +97,26 @@ type PowerOutlet struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -167,6 +170,10 @@ func (m *PowerOutlet) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -202,6 +209,8 @@ func (m *PowerOutlet) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -215,7 +224,7 @@ func (m *PowerOutlet) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -244,6 +253,8 @@ func (m *PowerOutlet) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -261,6 +272,8 @@ func (m *PowerOutlet) validateFeedLeg(formats strfmt.Registry) error { if err := m.FeedLeg.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("feed_leg") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("feed_leg") } return err } @@ -293,6 +306,25 @@ func (m *PowerOutlet) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *PowerOutlet) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *PowerOutlet) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -319,6 +351,8 @@ func (m *PowerOutlet) validatePowerPort(formats strfmt.Registry) error { if err := m.PowerPort.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("power_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("power_port") } return err } @@ -341,6 +375,8 @@ func (m *PowerOutlet) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -360,6 +396,8 @@ func (m *PowerOutlet) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -392,7 +430,7 @@ func (m *PowerOutlet) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -428,6 +466,18 @@ func (m *PowerOutlet) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidatePowerPort(ctx, formats); err != nil { res = append(res, err) } @@ -465,6 +515,8 @@ func (m *PowerOutlet) contextValidateCable(ctx context.Context, formats strfmt.R if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -473,11 +525,7 @@ func (m *PowerOutlet) contextValidateCable(ctx context.Context, formats strfmt.R return nil } -func (m *PowerOutlet) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *PowerOutlet) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -502,7 +550,7 @@ func (m *PowerOutlet) contextValidateConnectedEndpointType(ctx context.Context, func (m *PowerOutlet) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -515,6 +563,8 @@ func (m *PowerOutlet) contextValidateDevice(ctx context.Context, formats strfmt. if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -538,6 +588,8 @@ func (m *PowerOutlet) contextValidateFeedLeg(ctx context.Context, formats strfmt if err := m.FeedLeg.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("feed_leg") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("feed_leg") } return err } @@ -564,12 +616,44 @@ func (m *PowerOutlet) contextValidateLastUpdated(ctx context.Context, formats st return nil } +func (m *PowerOutlet) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PowerOutlet) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *PowerOutlet) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *PowerOutlet) contextValidatePowerPort(ctx context.Context, formats strfmt.Registry) error { if m.PowerPort != nil { if err := m.PowerPort.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("power_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("power_port") } return err } @@ -586,6 +670,8 @@ func (m *PowerOutlet) contextValidateTags(ctx context.Context, formats strfmt.Re if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -602,6 +688,8 @@ func (m *PowerOutlet) contextValidateType(ctx context.Context, formats strfmt.Re if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -793,12 +881,12 @@ type PowerOutletType struct { // label // Required: true - // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE7/5) ITA Type F (CEE7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid Hardwired] + // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R NEMA L22-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE 7/5) ITA Type F (CEE 7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O ITA Multistandard USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid Neutrik powerCON (20A) Neutrik powerCON (32A) Neutrik powerCON TRUE1 Neutrik powerCON TRUE1 TOP Hardwired] Label *string `json:"label"` // value // Required: true - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r nema-l22-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o ita-multistandard usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid neutrik-powercon-20a neutrik-powercon-32a neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Value *string `json:"value"` } @@ -824,7 +912,7 @@ var powerOutletTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE7/5)","ITA Type F (CEE7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid","Hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","NEMA L22-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE 7/5)","ITA Type F (CEE 7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","ITA Multistandard","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid","Neutrik powerCON (20A)","Neutrik powerCON (32A)","Neutrik powerCON TRUE1","Neutrik powerCON TRUE1 TOP","Hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1008,6 +1096,9 @@ const ( // PowerOutletTypeLabelNEMAL21Dash30R captures enum value "NEMA L21-30R" PowerOutletTypeLabelNEMAL21Dash30R string = "NEMA L21-30R" + // PowerOutletTypeLabelNEMAL22Dash30R captures enum value "NEMA L22-30R" + PowerOutletTypeLabelNEMAL22Dash30R string = "NEMA L22-30R" + // PowerOutletTypeLabelCS6360C captures enum value "CS6360C" PowerOutletTypeLabelCS6360C string = "CS6360C" @@ -1026,11 +1117,11 @@ const ( // PowerOutletTypeLabelCS8464C captures enum value "CS8464C" PowerOutletTypeLabelCS8464C string = "CS8464C" - // PowerOutletTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE7/5)" - PowerOutletTypeLabelITATypeECEE75 string = "ITA Type E (CEE7/5)" + // PowerOutletTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE 7/5)" + PowerOutletTypeLabelITATypeECEE75 string = "ITA Type E (CEE 7/5)" - // PowerOutletTypeLabelITATypeFCEE73 captures enum value "ITA Type F (CEE7/3)" - PowerOutletTypeLabelITATypeFCEE73 string = "ITA Type F (CEE7/3)" + // PowerOutletTypeLabelITATypeFCEE73 captures enum value "ITA Type F (CEE 7/3)" + PowerOutletTypeLabelITATypeFCEE73 string = "ITA Type F (CEE 7/3)" // PowerOutletTypeLabelITATypeGBS1363 captures enum value "ITA Type G (BS 1363)" PowerOutletTypeLabelITATypeGBS1363 string = "ITA Type G (BS 1363)" @@ -1059,6 +1150,9 @@ const ( // PowerOutletTypeLabelITATypeO captures enum value "ITA Type O" PowerOutletTypeLabelITATypeO string = "ITA Type O" + // PowerOutletTypeLabelITAMultistandard captures enum value "ITA Multistandard" + PowerOutletTypeLabelITAMultistandard string = "ITA Multistandard" + // PowerOutletTypeLabelUSBTypeA captures enum value "USB Type A" PowerOutletTypeLabelUSBTypeA string = "USB Type A" @@ -1077,6 +1171,18 @@ const ( // PowerOutletTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" PowerOutletTypeLabelSafDashDDashGrid string = "Saf-D-Grid" + // PowerOutletTypeLabelNeutrikPowerCON20A captures enum value "Neutrik powerCON (20A)" + PowerOutletTypeLabelNeutrikPowerCON20A string = "Neutrik powerCON (20A)" + + // PowerOutletTypeLabelNeutrikPowerCON32A captures enum value "Neutrik powerCON (32A)" + PowerOutletTypeLabelNeutrikPowerCON32A string = "Neutrik powerCON (32A)" + + // PowerOutletTypeLabelNeutrikPowerCONTRUE1 captures enum value "Neutrik powerCON TRUE1" + PowerOutletTypeLabelNeutrikPowerCONTRUE1 string = "Neutrik powerCON TRUE1" + + // PowerOutletTypeLabelNeutrikPowerCONTRUE1TOP captures enum value "Neutrik powerCON TRUE1 TOP" + PowerOutletTypeLabelNeutrikPowerCONTRUE1TOP string = "Neutrik powerCON TRUE1 TOP" + // PowerOutletTypeLabelHardwired captures enum value "Hardwired" PowerOutletTypeLabelHardwired string = "Hardwired" ) @@ -1107,7 +1213,7 @@ var powerOutletTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","nema-l22-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","ita-multistandard","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","neutrik-powercon-20a","neutrik-powercon-32a","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1291,6 +1397,9 @@ const ( // PowerOutletTypeValueNemaDashL21Dash30r captures enum value "nema-l21-30r" PowerOutletTypeValueNemaDashL21Dash30r string = "nema-l21-30r" + // PowerOutletTypeValueNemaDashL22Dash30r captures enum value "nema-l22-30r" + PowerOutletTypeValueNemaDashL22Dash30r string = "nema-l22-30r" + // PowerOutletTypeValueCS6360C captures enum value "CS6360C" PowerOutletTypeValueCS6360C string = "CS6360C" @@ -1342,6 +1451,9 @@ const ( // PowerOutletTypeValueItaDasho captures enum value "ita-o" PowerOutletTypeValueItaDasho string = "ita-o" + // PowerOutletTypeValueItaDashMultistandard captures enum value "ita-multistandard" + PowerOutletTypeValueItaDashMultistandard string = "ita-multistandard" + // PowerOutletTypeValueUsbDasha captures enum value "usb-a" PowerOutletTypeValueUsbDasha string = "usb-a" @@ -1360,6 +1472,18 @@ const ( // PowerOutletTypeValueSafDashdDashGrid captures enum value "saf-d-grid" PowerOutletTypeValueSafDashdDashGrid string = "saf-d-grid" + // PowerOutletTypeValueNeutrikDashPowerconDash20a captures enum value "neutrik-powercon-20a" + PowerOutletTypeValueNeutrikDashPowerconDash20a string = "neutrik-powercon-20a" + + // PowerOutletTypeValueNeutrikDashPowerconDash32a captures enum value "neutrik-powercon-32a" + PowerOutletTypeValueNeutrikDashPowerconDash32a string = "neutrik-powercon-32a" + + // PowerOutletTypeValueNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + PowerOutletTypeValueNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // PowerOutletTypeValueNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + PowerOutletTypeValueNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // PowerOutletTypeValueHardwired captures enum value "hardwired" PowerOutletTypeValueHardwired string = "hardwired" ) diff --git a/netbox/models/power_outlet_template.go b/netbox/models/power_outlet_template.go index b7cc817c3..6f6169dec 100644 --- a/netbox/models/power_outlet_template.go +++ b/netbox/models/power_outlet_template.go @@ -37,8 +37,8 @@ type PowerOutletTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -55,7 +55,7 @@ type PowerOutletTemplate struct { // feed leg FeedLeg *PowerOutletTemplateFeedLeg `json:"feed_leg,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -143,7 +143,7 @@ func (m *PowerOutletTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -172,6 +172,8 @@ func (m *PowerOutletTemplate) validateDeviceType(formats strfmt.Registry) error if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -189,6 +191,8 @@ func (m *PowerOutletTemplate) validateFeedLeg(formats strfmt.Registry) error { if err := m.FeedLeg.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("feed_leg") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("feed_leg") } return err } @@ -247,6 +251,8 @@ func (m *PowerOutletTemplate) validatePowerPort(formats strfmt.Registry) error { if err := m.PowerPort.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("power_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("power_port") } return err } @@ -264,6 +270,8 @@ func (m *PowerOutletTemplate) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -332,7 +340,7 @@ func (m *PowerOutletTemplate) ContextValidate(ctx context.Context, formats strfm func (m *PowerOutletTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -345,6 +353,8 @@ func (m *PowerOutletTemplate) contextValidateDeviceType(ctx context.Context, for if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -368,6 +378,8 @@ func (m *PowerOutletTemplate) contextValidateFeedLeg(ctx context.Context, format if err := m.FeedLeg.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("feed_leg") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("feed_leg") } return err } @@ -400,6 +412,8 @@ func (m *PowerOutletTemplate) contextValidatePowerPort(ctx context.Context, form if err := m.PowerPort.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("power_port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("power_port") } return err } @@ -414,6 +428,8 @@ func (m *PowerOutletTemplate) contextValidateType(ctx context.Context, formats s if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -605,12 +621,12 @@ type PowerOutletTemplateType struct { // label // Required: true - // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE7/5) ITA Type F (CEE7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid Hardwired] + // Enum: [C5 C7 C13 C15 C19 C21 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15R NEMA 5-15R NEMA 5-20R NEMA 5-30R NEMA 5-50R NEMA 6-15R NEMA 6-20R NEMA 6-30R NEMA 6-50R NEMA 10-30R NEMA 10-50R NEMA 14-20R NEMA 14-30R NEMA 14-50R NEMA 14-60R NEMA 15-15R NEMA 15-20R NEMA 15-30R NEMA 15-50R NEMA 15-60R NEMA L1-15R NEMA L5-15R NEMA L5-20R NEMA L5-30R NEMA L5-50R NEMA L6-15R NEMA L6-20R NEMA L6-30R NEMA L6-50R NEMA L10-30R NEMA L14-20R NEMA L14-30R NEMA L14-50R NEMA L14-60R NEMA L15-20R NEMA L15-30R NEMA L15-50R NEMA L15-60R NEMA L21-20R NEMA L21-30R NEMA L22-30R CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ITA Type E (CEE 7/5) ITA Type F (CEE 7/3) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O ITA Multistandard USB Type A USB Micro B USB Type C DC Terminal HDOT Cx Saf-D-Grid Neutrik powerCON (20A) Neutrik powerCON (32A) Neutrik powerCON TRUE1 Neutrik powerCON TRUE1 TOP Hardwired] Label *string `json:"label"` // value // Required: true - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r nema-l22-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o ita-multistandard usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid neutrik-powercon-20a neutrik-powercon-32a neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Value *string `json:"value"` } @@ -636,7 +652,7 @@ var powerOutletTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE7/5)","ITA Type F (CEE7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid","Hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["C5","C7","C13","C15","C19","C21","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15R","NEMA 5-15R","NEMA 5-20R","NEMA 5-30R","NEMA 5-50R","NEMA 6-15R","NEMA 6-20R","NEMA 6-30R","NEMA 6-50R","NEMA 10-30R","NEMA 10-50R","NEMA 14-20R","NEMA 14-30R","NEMA 14-50R","NEMA 14-60R","NEMA 15-15R","NEMA 15-20R","NEMA 15-30R","NEMA 15-50R","NEMA 15-60R","NEMA L1-15R","NEMA L5-15R","NEMA L5-20R","NEMA L5-30R","NEMA L5-50R","NEMA L6-15R","NEMA L6-20R","NEMA L6-30R","NEMA L6-50R","NEMA L10-30R","NEMA L14-20R","NEMA L14-30R","NEMA L14-50R","NEMA L14-60R","NEMA L15-20R","NEMA L15-30R","NEMA L15-50R","NEMA L15-60R","NEMA L21-20R","NEMA L21-30R","NEMA L22-30R","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ITA Type E (CEE 7/5)","ITA Type F (CEE 7/3)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","ITA Multistandard","USB Type A","USB Micro B","USB Type C","DC Terminal","HDOT Cx","Saf-D-Grid","Neutrik powerCON (20A)","Neutrik powerCON (32A)","Neutrik powerCON TRUE1","Neutrik powerCON TRUE1 TOP","Hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -820,6 +836,9 @@ const ( // PowerOutletTemplateTypeLabelNEMAL21Dash30R captures enum value "NEMA L21-30R" PowerOutletTemplateTypeLabelNEMAL21Dash30R string = "NEMA L21-30R" + // PowerOutletTemplateTypeLabelNEMAL22Dash30R captures enum value "NEMA L22-30R" + PowerOutletTemplateTypeLabelNEMAL22Dash30R string = "NEMA L22-30R" + // PowerOutletTemplateTypeLabelCS6360C captures enum value "CS6360C" PowerOutletTemplateTypeLabelCS6360C string = "CS6360C" @@ -838,11 +857,11 @@ const ( // PowerOutletTemplateTypeLabelCS8464C captures enum value "CS8464C" PowerOutletTemplateTypeLabelCS8464C string = "CS8464C" - // PowerOutletTemplateTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE7/5)" - PowerOutletTemplateTypeLabelITATypeECEE75 string = "ITA Type E (CEE7/5)" + // PowerOutletTemplateTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE 7/5)" + PowerOutletTemplateTypeLabelITATypeECEE75 string = "ITA Type E (CEE 7/5)" - // PowerOutletTemplateTypeLabelITATypeFCEE73 captures enum value "ITA Type F (CEE7/3)" - PowerOutletTemplateTypeLabelITATypeFCEE73 string = "ITA Type F (CEE7/3)" + // PowerOutletTemplateTypeLabelITATypeFCEE73 captures enum value "ITA Type F (CEE 7/3)" + PowerOutletTemplateTypeLabelITATypeFCEE73 string = "ITA Type F (CEE 7/3)" // PowerOutletTemplateTypeLabelITATypeGBS1363 captures enum value "ITA Type G (BS 1363)" PowerOutletTemplateTypeLabelITATypeGBS1363 string = "ITA Type G (BS 1363)" @@ -871,6 +890,9 @@ const ( // PowerOutletTemplateTypeLabelITATypeO captures enum value "ITA Type O" PowerOutletTemplateTypeLabelITATypeO string = "ITA Type O" + // PowerOutletTemplateTypeLabelITAMultistandard captures enum value "ITA Multistandard" + PowerOutletTemplateTypeLabelITAMultistandard string = "ITA Multistandard" + // PowerOutletTemplateTypeLabelUSBTypeA captures enum value "USB Type A" PowerOutletTemplateTypeLabelUSBTypeA string = "USB Type A" @@ -889,6 +911,18 @@ const ( // PowerOutletTemplateTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" PowerOutletTemplateTypeLabelSafDashDDashGrid string = "Saf-D-Grid" + // PowerOutletTemplateTypeLabelNeutrikPowerCON20A captures enum value "Neutrik powerCON (20A)" + PowerOutletTemplateTypeLabelNeutrikPowerCON20A string = "Neutrik powerCON (20A)" + + // PowerOutletTemplateTypeLabelNeutrikPowerCON32A captures enum value "Neutrik powerCON (32A)" + PowerOutletTemplateTypeLabelNeutrikPowerCON32A string = "Neutrik powerCON (32A)" + + // PowerOutletTemplateTypeLabelNeutrikPowerCONTRUE1 captures enum value "Neutrik powerCON TRUE1" + PowerOutletTemplateTypeLabelNeutrikPowerCONTRUE1 string = "Neutrik powerCON TRUE1" + + // PowerOutletTemplateTypeLabelNeutrikPowerCONTRUE1TOP captures enum value "Neutrik powerCON TRUE1 TOP" + PowerOutletTemplateTypeLabelNeutrikPowerCONTRUE1TOP string = "Neutrik powerCON TRUE1 TOP" + // PowerOutletTemplateTypeLabelHardwired captures enum value "Hardwired" PowerOutletTemplateTypeLabelHardwired string = "Hardwired" ) @@ -919,7 +953,7 @@ var powerOutletTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","nema-l22-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","ita-multistandard","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","neutrik-powercon-20a","neutrik-powercon-32a","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1103,6 +1137,9 @@ const ( // PowerOutletTemplateTypeValueNemaDashL21Dash30r captures enum value "nema-l21-30r" PowerOutletTemplateTypeValueNemaDashL21Dash30r string = "nema-l21-30r" + // PowerOutletTemplateTypeValueNemaDashL22Dash30r captures enum value "nema-l22-30r" + PowerOutletTemplateTypeValueNemaDashL22Dash30r string = "nema-l22-30r" + // PowerOutletTemplateTypeValueCS6360C captures enum value "CS6360C" PowerOutletTemplateTypeValueCS6360C string = "CS6360C" @@ -1154,6 +1191,9 @@ const ( // PowerOutletTemplateTypeValueItaDasho captures enum value "ita-o" PowerOutletTemplateTypeValueItaDasho string = "ita-o" + // PowerOutletTemplateTypeValueItaDashMultistandard captures enum value "ita-multistandard" + PowerOutletTemplateTypeValueItaDashMultistandard string = "ita-multistandard" + // PowerOutletTemplateTypeValueUsbDasha captures enum value "usb-a" PowerOutletTemplateTypeValueUsbDasha string = "usb-a" @@ -1172,6 +1212,18 @@ const ( // PowerOutletTemplateTypeValueSafDashdDashGrid captures enum value "saf-d-grid" PowerOutletTemplateTypeValueSafDashdDashGrid string = "saf-d-grid" + // PowerOutletTemplateTypeValueNeutrikDashPowerconDash20a captures enum value "neutrik-powercon-20a" + PowerOutletTemplateTypeValueNeutrikDashPowerconDash20a string = "neutrik-powercon-20a" + + // PowerOutletTemplateTypeValueNeutrikDashPowerconDash32a captures enum value "neutrik-powercon-32a" + PowerOutletTemplateTypeValueNeutrikDashPowerconDash32a string = "neutrik-powercon-32a" + + // PowerOutletTemplateTypeValueNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + PowerOutletTemplateTypeValueNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // PowerOutletTemplateTypeValueNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + PowerOutletTemplateTypeValueNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // PowerOutletTemplateTypeValueHardwired captures enum value "hardwired" PowerOutletTemplateTypeValueHardwired string = "hardwired" ) diff --git a/netbox/models/power_panel.go b/netbox/models/power_panel.go index 23258ae98..e5650ba8e 100644 --- a/netbox/models/power_panel.go +++ b/netbox/models/power_panel.go @@ -35,6 +35,11 @@ import ( // swagger:model PowerPanel type PowerPanel struct { + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -42,10 +47,15 @@ type PowerPanel struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // location Location *NestedLocation `json:"location,omitempty"` @@ -76,6 +86,14 @@ type PowerPanel struct { func (m *PowerPanel) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateLocation(formats); err != nil { res = append(res, err) } @@ -102,6 +120,30 @@ func (m *PowerPanel) Validate(formats strfmt.Registry) error { return nil } +func (m *PowerPanel) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PowerPanel) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PowerPanel) validateLocation(formats strfmt.Registry) error { if swag.IsZero(m.Location) { // not required return nil @@ -111,6 +153,8 @@ func (m *PowerPanel) validateLocation(formats strfmt.Registry) error { if err := m.Location.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -146,6 +190,8 @@ func (m *PowerPanel) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -168,6 +214,8 @@ func (m *PowerPanel) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -194,6 +242,10 @@ func (m *PowerPanel) validateURL(formats strfmt.Registry) error { func (m *PowerPanel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -202,6 +254,10 @@ func (m *PowerPanel) ContextValidate(ctx context.Context, formats strfmt.Registr res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLocation(ctx, formats); err != nil { res = append(res, err) } @@ -228,6 +284,15 @@ func (m *PowerPanel) ContextValidate(ctx context.Context, formats strfmt.Registr return nil } +func (m *PowerPanel) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *PowerPanel) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -246,12 +311,23 @@ func (m *PowerPanel) contextValidateID(ctx context.Context, formats strfmt.Regis return nil } +func (m *PowerPanel) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *PowerPanel) contextValidateLocation(ctx context.Context, formats strfmt.Registry) error { if m.Location != nil { if err := m.Location.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -275,6 +351,8 @@ func (m *PowerPanel) contextValidateSite(ctx context.Context, formats strfmt.Reg if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -291,6 +369,8 @@ func (m *PowerPanel) contextValidateTags(ctx context.Context, formats strfmt.Reg if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/power_port.go b/netbox/models/power_port.go index 3b469e3a5..7870dd793 100644 --- a/netbox/models/power_port.go +++ b/netbox/models/power_port.go @@ -50,25 +50,13 @@ type PowerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -80,8 +68,8 @@ type PowerPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -98,7 +86,7 @@ type PowerPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -113,6 +101,18 @@ type PowerPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected @@ -125,6 +125,9 @@ type PowerPort struct { // Minimum: 1 MaximumDraw *int64 `json:"maximum_draw,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -179,6 +182,10 @@ func (m *PowerPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -226,6 +233,8 @@ func (m *PowerPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -239,7 +248,7 @@ func (m *PowerPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -268,6 +277,8 @@ func (m *PowerPort) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -316,6 +327,25 @@ func (m *PowerPort) validateMaximumDraw(formats strfmt.Registry) error { return nil } +func (m *PowerPort) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *PowerPort) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -347,6 +377,8 @@ func (m *PowerPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -366,6 +398,8 @@ func (m *PowerPort) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -398,7 +432,7 @@ func (m *PowerPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -430,6 +464,18 @@ func (m *PowerPort) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -463,6 +509,8 @@ func (m *PowerPort) contextValidateCable(ctx context.Context, formats strfmt.Reg if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -471,11 +519,7 @@ func (m *PowerPort) contextValidateCable(ctx context.Context, formats strfmt.Reg return nil } -func (m *PowerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *PowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -500,7 +544,7 @@ func (m *PowerPort) contextValidateConnectedEndpointType(ctx context.Context, fo func (m *PowerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -513,6 +557,8 @@ func (m *PowerPort) contextValidateDevice(ctx context.Context, formats strfmt.Re if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -548,6 +594,36 @@ func (m *PowerPort) contextValidateLastUpdated(ctx context.Context, formats strf return nil } +func (m *PowerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PowerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *PowerPort) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *PowerPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -556,6 +632,8 @@ func (m *PowerPort) contextValidateTags(ctx context.Context, formats strfmt.Regi if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -572,6 +650,8 @@ func (m *PowerPort) contextValidateType(ctx context.Context, formats strfmt.Regi if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -614,12 +694,12 @@ type PowerPortType struct { // label // Required: true - // Enum: [C6 C8 C14 C16 C20 C22 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15P NEMA 5-15P NEMA 5-20P NEMA 5-30P NEMA 5-50P NEMA 6-15P NEMA 6-20P NEMA 6-30P NEMA 6-50P NEMA 10-30P NEMA 10-50P NEMA 14-20P NEMA 14-30P NEMA 14-50P NEMA 14-60P NEMA 15-15P NEMA 15-20P NEMA 15-30P NEMA 15-50P NEMA 15-60P NEMA L1-15P NEMA L5-15P NEMA L5-20P NEMA L5-30P NEMA L5-50P NEMA L6-15P NEMA L6-20P NEMA L6-30P NEMA L6-50P NEMA L10-30P NEMA L14-20P NEMA L14-30P NEMA L14-50P NEMA L14-60P NEMA L15-20P NEMA L15-30P NEMA L15-50P NEMA L15-60P NEMA L21-20P NEMA L21-30P CS6361C CS6365C CS8165C CS8265C CS8365C CS8465C ITA Type E (CEE 7/5) ITA Type F (CEE 7/4) ITA Type E/F (CEE 7/7) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB 3.0 Type B USB 3.0 Micro B DC Terminal Saf-D-Grid Hardwired] + // Enum: [C6 C8 C14 C16 C20 C22 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15P NEMA 5-15P NEMA 5-20P NEMA 5-30P NEMA 5-50P NEMA 6-15P NEMA 6-20P NEMA 6-30P NEMA 6-50P NEMA 10-30P NEMA 10-50P NEMA 14-20P NEMA 14-30P NEMA 14-50P NEMA 14-60P NEMA 15-15P NEMA 15-20P NEMA 15-30P NEMA 15-50P NEMA 15-60P NEMA L1-15P NEMA L5-15P NEMA L5-20P NEMA L5-30P NEMA L5-50P NEMA L6-15P NEMA L6-20P NEMA L6-30P NEMA L6-50P NEMA L10-30P NEMA L14-20P NEMA L14-30P NEMA L14-50P NEMA L14-60P NEMA L15-20P NEMA L15-30P NEMA L15-50P NEMA L15-60P NEMA L21-20P NEMA L21-30P NEMA L22-30P CS6361C CS6365C CS8165C CS8265C CS8365C CS8465C ITA Type C (CEE 7/16) ITA Type E (CEE 7/6) ITA Type F (CEE 7/4) ITA Type E/F (CEE 7/7) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB Micro AB USB 3.0 Type B USB 3.0 Micro B DC Terminal Saf-D-Grid Neutrik powerCON (20A) Neutrik powerCON (32A) Neutrik powerCON TRUE1 Neutrik powerCON TRUE1 TOP Hardwired] Label *string `json:"label"` // value // Required: true - // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-3-b usb-3-micro-b dc-terminal saf-d-grid hardwired] + // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p nema-l22-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab usb-3-b usb-3-micro-b dc-terminal saf-d-grid neutrik-powercon-20 neutrik-powercon-32 neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Value *string `json:"value"` } @@ -645,7 +725,7 @@ var powerPortTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["C6","C8","C14","C16","C20","C22","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15P","NEMA 5-15P","NEMA 5-20P","NEMA 5-30P","NEMA 5-50P","NEMA 6-15P","NEMA 6-20P","NEMA 6-30P","NEMA 6-50P","NEMA 10-30P","NEMA 10-50P","NEMA 14-20P","NEMA 14-30P","NEMA 14-50P","NEMA 14-60P","NEMA 15-15P","NEMA 15-20P","NEMA 15-30P","NEMA 15-50P","NEMA 15-60P","NEMA L1-15P","NEMA L5-15P","NEMA L5-20P","NEMA L5-30P","NEMA L5-50P","NEMA L6-15P","NEMA L6-20P","NEMA L6-30P","NEMA L6-50P","NEMA L10-30P","NEMA L14-20P","NEMA L14-30P","NEMA L14-50P","NEMA L14-60P","NEMA L15-20P","NEMA L15-30P","NEMA L15-50P","NEMA L15-60P","NEMA L21-20P","NEMA L21-30P","CS6361C","CS6365C","CS8165C","CS8265C","CS8365C","CS8465C","ITA Type E (CEE 7/5)","ITA Type F (CEE 7/4)","ITA Type E/F (CEE 7/7)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB 3.0 Type B","USB 3.0 Micro B","DC Terminal","Saf-D-Grid","Hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["C6","C8","C14","C16","C20","C22","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15P","NEMA 5-15P","NEMA 5-20P","NEMA 5-30P","NEMA 5-50P","NEMA 6-15P","NEMA 6-20P","NEMA 6-30P","NEMA 6-50P","NEMA 10-30P","NEMA 10-50P","NEMA 14-20P","NEMA 14-30P","NEMA 14-50P","NEMA 14-60P","NEMA 15-15P","NEMA 15-20P","NEMA 15-30P","NEMA 15-50P","NEMA 15-60P","NEMA L1-15P","NEMA L5-15P","NEMA L5-20P","NEMA L5-30P","NEMA L5-50P","NEMA L6-15P","NEMA L6-20P","NEMA L6-30P","NEMA L6-50P","NEMA L10-30P","NEMA L14-20P","NEMA L14-30P","NEMA L14-50P","NEMA L14-60P","NEMA L15-20P","NEMA L15-30P","NEMA L15-50P","NEMA L15-60P","NEMA L21-20P","NEMA L21-30P","NEMA L22-30P","CS6361C","CS6365C","CS8165C","CS8265C","CS8365C","CS8465C","ITA Type C (CEE 7/16)","ITA Type E (CEE 7/6)","ITA Type F (CEE 7/4)","ITA Type E/F (CEE 7/7)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB Micro AB","USB 3.0 Type B","USB 3.0 Micro B","DC Terminal","Saf-D-Grid","Neutrik powerCON (20A)","Neutrik powerCON (32A)","Neutrik powerCON TRUE1","Neutrik powerCON TRUE1 TOP","Hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -829,6 +909,9 @@ const ( // PowerPortTypeLabelNEMAL21Dash30P captures enum value "NEMA L21-30P" PowerPortTypeLabelNEMAL21Dash30P string = "NEMA L21-30P" + // PowerPortTypeLabelNEMAL22Dash30P captures enum value "NEMA L22-30P" + PowerPortTypeLabelNEMAL22Dash30P string = "NEMA L22-30P" + // PowerPortTypeLabelCS6361C captures enum value "CS6361C" PowerPortTypeLabelCS6361C string = "CS6361C" @@ -847,8 +930,11 @@ const ( // PowerPortTypeLabelCS8465C captures enum value "CS8465C" PowerPortTypeLabelCS8465C string = "CS8465C" - // PowerPortTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE 7/5)" - PowerPortTypeLabelITATypeECEE75 string = "ITA Type E (CEE 7/5)" + // PowerPortTypeLabelITATypeCCEE716 captures enum value "ITA Type C (CEE 7/16)" + PowerPortTypeLabelITATypeCCEE716 string = "ITA Type C (CEE 7/16)" + + // PowerPortTypeLabelITATypeECEE76 captures enum value "ITA Type E (CEE 7/6)" + PowerPortTypeLabelITATypeECEE76 string = "ITA Type E (CEE 7/6)" // PowerPortTypeLabelITATypeFCEE74 captures enum value "ITA Type F (CEE 7/4)" PowerPortTypeLabelITATypeFCEE74 string = "ITA Type F (CEE 7/4)" @@ -904,6 +990,9 @@ const ( // PowerPortTypeLabelUSBMicroB captures enum value "USB Micro B" PowerPortTypeLabelUSBMicroB string = "USB Micro B" + // PowerPortTypeLabelUSBMicroAB captures enum value "USB Micro AB" + PowerPortTypeLabelUSBMicroAB string = "USB Micro AB" + // PowerPortTypeLabelUSB3Dot0TypeB captures enum value "USB 3.0 Type B" PowerPortTypeLabelUSB3Dot0TypeB string = "USB 3.0 Type B" @@ -916,6 +1005,18 @@ const ( // PowerPortTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" PowerPortTypeLabelSafDashDDashGrid string = "Saf-D-Grid" + // PowerPortTypeLabelNeutrikPowerCON20A captures enum value "Neutrik powerCON (20A)" + PowerPortTypeLabelNeutrikPowerCON20A string = "Neutrik powerCON (20A)" + + // PowerPortTypeLabelNeutrikPowerCON32A captures enum value "Neutrik powerCON (32A)" + PowerPortTypeLabelNeutrikPowerCON32A string = "Neutrik powerCON (32A)" + + // PowerPortTypeLabelNeutrikPowerCONTRUE1 captures enum value "Neutrik powerCON TRUE1" + PowerPortTypeLabelNeutrikPowerCONTRUE1 string = "Neutrik powerCON TRUE1" + + // PowerPortTypeLabelNeutrikPowerCONTRUE1TOP captures enum value "Neutrik powerCON TRUE1 TOP" + PowerPortTypeLabelNeutrikPowerCONTRUE1TOP string = "Neutrik powerCON TRUE1 TOP" + // PowerPortTypeLabelHardwired captures enum value "Hardwired" PowerPortTypeLabelHardwired string = "Hardwired" ) @@ -946,7 +1047,7 @@ var powerPortTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","nema-l22-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","neutrik-powercon-20","neutrik-powercon-32","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -1130,6 +1231,9 @@ const ( // PowerPortTypeValueNemaDashL21Dash30p captures enum value "nema-l21-30p" PowerPortTypeValueNemaDashL21Dash30p string = "nema-l21-30p" + // PowerPortTypeValueNemaDashL22Dash30p captures enum value "nema-l22-30p" + PowerPortTypeValueNemaDashL22Dash30p string = "nema-l22-30p" + // PowerPortTypeValueCs6361c captures enum value "cs6361c" PowerPortTypeValueCs6361c string = "cs6361c" @@ -1148,6 +1252,9 @@ const ( // PowerPortTypeValueCs8465c captures enum value "cs8465c" PowerPortTypeValueCs8465c string = "cs8465c" + // PowerPortTypeValueItaDashc captures enum value "ita-c" + PowerPortTypeValueItaDashc string = "ita-c" + // PowerPortTypeValueItaDashe captures enum value "ita-e" PowerPortTypeValueItaDashe string = "ita-e" @@ -1205,6 +1312,9 @@ const ( // PowerPortTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" PowerPortTypeValueUsbDashMicroDashb string = "usb-micro-b" + // PowerPortTypeValueUsbDashMicroDashAb captures enum value "usb-micro-ab" + PowerPortTypeValueUsbDashMicroDashAb string = "usb-micro-ab" + // PowerPortTypeValueUsbDash3Dashb captures enum value "usb-3-b" PowerPortTypeValueUsbDash3Dashb string = "usb-3-b" @@ -1217,6 +1327,18 @@ const ( // PowerPortTypeValueSafDashdDashGrid captures enum value "saf-d-grid" PowerPortTypeValueSafDashdDashGrid string = "saf-d-grid" + // PowerPortTypeValueNeutrikDashPowerconDash20 captures enum value "neutrik-powercon-20" + PowerPortTypeValueNeutrikDashPowerconDash20 string = "neutrik-powercon-20" + + // PowerPortTypeValueNeutrikDashPowerconDash32 captures enum value "neutrik-powercon-32" + PowerPortTypeValueNeutrikDashPowerconDash32 string = "neutrik-powercon-32" + + // PowerPortTypeValueNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + PowerPortTypeValueNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // PowerPortTypeValueNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + PowerPortTypeValueNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // PowerPortTypeValueHardwired captures enum value "hardwired" PowerPortTypeValueHardwired string = "hardwired" ) diff --git a/netbox/models/power_port_template.go b/netbox/models/power_port_template.go index 526f36f5a..38505ec6d 100644 --- a/netbox/models/power_port_template.go +++ b/netbox/models/power_port_template.go @@ -44,8 +44,8 @@ type PowerPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -59,7 +59,7 @@ type PowerPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -167,7 +167,7 @@ func (m *PowerPortTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -196,6 +196,8 @@ func (m *PowerPortTemplate) validateDeviceType(formats strfmt.Registry) error { if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -270,6 +272,8 @@ func (m *PowerPortTemplate) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -330,7 +334,7 @@ func (m *PowerPortTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *PowerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -343,6 +347,8 @@ func (m *PowerPortTemplate) contextValidateDeviceType(ctx context.Context, forma if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -384,6 +390,8 @@ func (m *PowerPortTemplate) contextValidateType(ctx context.Context, formats str if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -426,12 +434,12 @@ type PowerPortTemplateType struct { // label // Required: true - // Enum: [C6 C8 C14 C16 C20 C22 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15P NEMA 5-15P NEMA 5-20P NEMA 5-30P NEMA 5-50P NEMA 6-15P NEMA 6-20P NEMA 6-30P NEMA 6-50P NEMA 10-30P NEMA 10-50P NEMA 14-20P NEMA 14-30P NEMA 14-50P NEMA 14-60P NEMA 15-15P NEMA 15-20P NEMA 15-30P NEMA 15-50P NEMA 15-60P NEMA L1-15P NEMA L5-15P NEMA L5-20P NEMA L5-30P NEMA L5-50P NEMA L6-15P NEMA L6-20P NEMA L6-30P NEMA L6-50P NEMA L10-30P NEMA L14-20P NEMA L14-30P NEMA L14-50P NEMA L14-60P NEMA L15-20P NEMA L15-30P NEMA L15-50P NEMA L15-60P NEMA L21-20P NEMA L21-30P CS6361C CS6365C CS8165C CS8265C CS8365C CS8465C ITA Type E (CEE 7/5) ITA Type F (CEE 7/4) ITA Type E/F (CEE 7/7) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB 3.0 Type B USB 3.0 Micro B DC Terminal Saf-D-Grid Hardwired] + // Enum: [C6 C8 C14 C16 C20 C22 P+N+E 4H P+N+E 6H P+N+E 9H 2P+E 4H 2P+E 6H 2P+E 9H 3P+E 4H 3P+E 6H 3P+E 9H 3P+N+E 4H 3P+N+E 6H 3P+N+E 9H NEMA 1-15P NEMA 5-15P NEMA 5-20P NEMA 5-30P NEMA 5-50P NEMA 6-15P NEMA 6-20P NEMA 6-30P NEMA 6-50P NEMA 10-30P NEMA 10-50P NEMA 14-20P NEMA 14-30P NEMA 14-50P NEMA 14-60P NEMA 15-15P NEMA 15-20P NEMA 15-30P NEMA 15-50P NEMA 15-60P NEMA L1-15P NEMA L5-15P NEMA L5-20P NEMA L5-30P NEMA L5-50P NEMA L6-15P NEMA L6-20P NEMA L6-30P NEMA L6-50P NEMA L10-30P NEMA L14-20P NEMA L14-30P NEMA L14-50P NEMA L14-60P NEMA L15-20P NEMA L15-30P NEMA L15-50P NEMA L15-60P NEMA L21-20P NEMA L21-30P NEMA L22-30P CS6361C CS6365C CS8165C CS8265C CS8365C CS8465C ITA Type C (CEE 7/16) ITA Type E (CEE 7/6) ITA Type F (CEE 7/4) ITA Type E/F (CEE 7/7) ITA Type G (BS 1363) ITA Type H ITA Type I ITA Type J ITA Type K ITA Type L (CEI 23-50) ITA Type M (BS 546) ITA Type N ITA Type O USB Type A USB Type B USB Type C USB Mini A USB Mini B USB Micro A USB Micro B USB Micro AB USB 3.0 Type B USB 3.0 Micro B DC Terminal Saf-D-Grid Neutrik powerCON (20A) Neutrik powerCON (32A) Neutrik powerCON TRUE1 Neutrik powerCON TRUE1 TOP Hardwired] Label *string `json:"label"` // value // Required: true - // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-3-b usb-3-micro-b dc-terminal saf-d-grid hardwired] + // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p nema-l22-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab usb-3-b usb-3-micro-b dc-terminal saf-d-grid neutrik-powercon-20 neutrik-powercon-32 neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Value *string `json:"value"` } @@ -457,7 +465,7 @@ var powerPortTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["C6","C8","C14","C16","C20","C22","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15P","NEMA 5-15P","NEMA 5-20P","NEMA 5-30P","NEMA 5-50P","NEMA 6-15P","NEMA 6-20P","NEMA 6-30P","NEMA 6-50P","NEMA 10-30P","NEMA 10-50P","NEMA 14-20P","NEMA 14-30P","NEMA 14-50P","NEMA 14-60P","NEMA 15-15P","NEMA 15-20P","NEMA 15-30P","NEMA 15-50P","NEMA 15-60P","NEMA L1-15P","NEMA L5-15P","NEMA L5-20P","NEMA L5-30P","NEMA L5-50P","NEMA L6-15P","NEMA L6-20P","NEMA L6-30P","NEMA L6-50P","NEMA L10-30P","NEMA L14-20P","NEMA L14-30P","NEMA L14-50P","NEMA L14-60P","NEMA L15-20P","NEMA L15-30P","NEMA L15-50P","NEMA L15-60P","NEMA L21-20P","NEMA L21-30P","CS6361C","CS6365C","CS8165C","CS8265C","CS8365C","CS8465C","ITA Type E (CEE 7/5)","ITA Type F (CEE 7/4)","ITA Type E/F (CEE 7/7)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB 3.0 Type B","USB 3.0 Micro B","DC Terminal","Saf-D-Grid","Hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["C6","C8","C14","C16","C20","C22","P+N+E 4H","P+N+E 6H","P+N+E 9H","2P+E 4H","2P+E 6H","2P+E 9H","3P+E 4H","3P+E 6H","3P+E 9H","3P+N+E 4H","3P+N+E 6H","3P+N+E 9H","NEMA 1-15P","NEMA 5-15P","NEMA 5-20P","NEMA 5-30P","NEMA 5-50P","NEMA 6-15P","NEMA 6-20P","NEMA 6-30P","NEMA 6-50P","NEMA 10-30P","NEMA 10-50P","NEMA 14-20P","NEMA 14-30P","NEMA 14-50P","NEMA 14-60P","NEMA 15-15P","NEMA 15-20P","NEMA 15-30P","NEMA 15-50P","NEMA 15-60P","NEMA L1-15P","NEMA L5-15P","NEMA L5-20P","NEMA L5-30P","NEMA L5-50P","NEMA L6-15P","NEMA L6-20P","NEMA L6-30P","NEMA L6-50P","NEMA L10-30P","NEMA L14-20P","NEMA L14-30P","NEMA L14-50P","NEMA L14-60P","NEMA L15-20P","NEMA L15-30P","NEMA L15-50P","NEMA L15-60P","NEMA L21-20P","NEMA L21-30P","NEMA L22-30P","CS6361C","CS6365C","CS8165C","CS8265C","CS8365C","CS8465C","ITA Type C (CEE 7/16)","ITA Type E (CEE 7/6)","ITA Type F (CEE 7/4)","ITA Type E/F (CEE 7/7)","ITA Type G (BS 1363)","ITA Type H","ITA Type I","ITA Type J","ITA Type K","ITA Type L (CEI 23-50)","ITA Type M (BS 546)","ITA Type N","ITA Type O","USB Type A","USB Type B","USB Type C","USB Mini A","USB Mini B","USB Micro A","USB Micro B","USB Micro AB","USB 3.0 Type B","USB 3.0 Micro B","DC Terminal","Saf-D-Grid","Neutrik powerCON (20A)","Neutrik powerCON (32A)","Neutrik powerCON TRUE1","Neutrik powerCON TRUE1 TOP","Hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -641,6 +649,9 @@ const ( // PowerPortTemplateTypeLabelNEMAL21Dash30P captures enum value "NEMA L21-30P" PowerPortTemplateTypeLabelNEMAL21Dash30P string = "NEMA L21-30P" + // PowerPortTemplateTypeLabelNEMAL22Dash30P captures enum value "NEMA L22-30P" + PowerPortTemplateTypeLabelNEMAL22Dash30P string = "NEMA L22-30P" + // PowerPortTemplateTypeLabelCS6361C captures enum value "CS6361C" PowerPortTemplateTypeLabelCS6361C string = "CS6361C" @@ -659,8 +670,11 @@ const ( // PowerPortTemplateTypeLabelCS8465C captures enum value "CS8465C" PowerPortTemplateTypeLabelCS8465C string = "CS8465C" - // PowerPortTemplateTypeLabelITATypeECEE75 captures enum value "ITA Type E (CEE 7/5)" - PowerPortTemplateTypeLabelITATypeECEE75 string = "ITA Type E (CEE 7/5)" + // PowerPortTemplateTypeLabelITATypeCCEE716 captures enum value "ITA Type C (CEE 7/16)" + PowerPortTemplateTypeLabelITATypeCCEE716 string = "ITA Type C (CEE 7/16)" + + // PowerPortTemplateTypeLabelITATypeECEE76 captures enum value "ITA Type E (CEE 7/6)" + PowerPortTemplateTypeLabelITATypeECEE76 string = "ITA Type E (CEE 7/6)" // PowerPortTemplateTypeLabelITATypeFCEE74 captures enum value "ITA Type F (CEE 7/4)" PowerPortTemplateTypeLabelITATypeFCEE74 string = "ITA Type F (CEE 7/4)" @@ -716,6 +730,9 @@ const ( // PowerPortTemplateTypeLabelUSBMicroB captures enum value "USB Micro B" PowerPortTemplateTypeLabelUSBMicroB string = "USB Micro B" + // PowerPortTemplateTypeLabelUSBMicroAB captures enum value "USB Micro AB" + PowerPortTemplateTypeLabelUSBMicroAB string = "USB Micro AB" + // PowerPortTemplateTypeLabelUSB3Dot0TypeB captures enum value "USB 3.0 Type B" PowerPortTemplateTypeLabelUSB3Dot0TypeB string = "USB 3.0 Type B" @@ -728,6 +745,18 @@ const ( // PowerPortTemplateTypeLabelSafDashDDashGrid captures enum value "Saf-D-Grid" PowerPortTemplateTypeLabelSafDashDDashGrid string = "Saf-D-Grid" + // PowerPortTemplateTypeLabelNeutrikPowerCON20A captures enum value "Neutrik powerCON (20A)" + PowerPortTemplateTypeLabelNeutrikPowerCON20A string = "Neutrik powerCON (20A)" + + // PowerPortTemplateTypeLabelNeutrikPowerCON32A captures enum value "Neutrik powerCON (32A)" + PowerPortTemplateTypeLabelNeutrikPowerCON32A string = "Neutrik powerCON (32A)" + + // PowerPortTemplateTypeLabelNeutrikPowerCONTRUE1 captures enum value "Neutrik powerCON TRUE1" + PowerPortTemplateTypeLabelNeutrikPowerCONTRUE1 string = "Neutrik powerCON TRUE1" + + // PowerPortTemplateTypeLabelNeutrikPowerCONTRUE1TOP captures enum value "Neutrik powerCON TRUE1 TOP" + PowerPortTemplateTypeLabelNeutrikPowerCONTRUE1TOP string = "Neutrik powerCON TRUE1 TOP" + // PowerPortTemplateTypeLabelHardwired captures enum value "Hardwired" PowerPortTemplateTypeLabelHardwired string = "Hardwired" ) @@ -758,7 +787,7 @@ var powerPortTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","nema-l22-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","neutrik-powercon-20","neutrik-powercon-32","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -942,6 +971,9 @@ const ( // PowerPortTemplateTypeValueNemaDashL21Dash30p captures enum value "nema-l21-30p" PowerPortTemplateTypeValueNemaDashL21Dash30p string = "nema-l21-30p" + // PowerPortTemplateTypeValueNemaDashL22Dash30p captures enum value "nema-l22-30p" + PowerPortTemplateTypeValueNemaDashL22Dash30p string = "nema-l22-30p" + // PowerPortTemplateTypeValueCs6361c captures enum value "cs6361c" PowerPortTemplateTypeValueCs6361c string = "cs6361c" @@ -960,6 +992,9 @@ const ( // PowerPortTemplateTypeValueCs8465c captures enum value "cs8465c" PowerPortTemplateTypeValueCs8465c string = "cs8465c" + // PowerPortTemplateTypeValueItaDashc captures enum value "ita-c" + PowerPortTemplateTypeValueItaDashc string = "ita-c" + // PowerPortTemplateTypeValueItaDashe captures enum value "ita-e" PowerPortTemplateTypeValueItaDashe string = "ita-e" @@ -1017,6 +1052,9 @@ const ( // PowerPortTemplateTypeValueUsbDashMicroDashb captures enum value "usb-micro-b" PowerPortTemplateTypeValueUsbDashMicroDashb string = "usb-micro-b" + // PowerPortTemplateTypeValueUsbDashMicroDashAb captures enum value "usb-micro-ab" + PowerPortTemplateTypeValueUsbDashMicroDashAb string = "usb-micro-ab" + // PowerPortTemplateTypeValueUsbDash3Dashb captures enum value "usb-3-b" PowerPortTemplateTypeValueUsbDash3Dashb string = "usb-3-b" @@ -1029,6 +1067,18 @@ const ( // PowerPortTemplateTypeValueSafDashdDashGrid captures enum value "saf-d-grid" PowerPortTemplateTypeValueSafDashdDashGrid string = "saf-d-grid" + // PowerPortTemplateTypeValueNeutrikDashPowerconDash20 captures enum value "neutrik-powercon-20" + PowerPortTemplateTypeValueNeutrikDashPowerconDash20 string = "neutrik-powercon-20" + + // PowerPortTemplateTypeValueNeutrikDashPowerconDash32 captures enum value "neutrik-powercon-32" + PowerPortTemplateTypeValueNeutrikDashPowerconDash32 string = "neutrik-powercon-32" + + // PowerPortTemplateTypeValueNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + PowerPortTemplateTypeValueNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // PowerPortTemplateTypeValueNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + PowerPortTemplateTypeValueNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // PowerPortTemplateTypeValueHardwired captures enum value "hardwired" PowerPortTemplateTypeValueHardwired string = "hardwired" ) diff --git a/netbox/models/prefix.go b/netbox/models/prefix.go index 765b5113f..b7a342dcb 100644 --- a/netbox/models/prefix.go +++ b/netbox/models/prefix.go @@ -46,8 +46,8 @@ type Prefix struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -63,7 +63,7 @@ type Prefix struct { // family Family *PrefixFamily `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -182,7 +182,7 @@ func (m *Prefix) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -210,6 +210,8 @@ func (m *Prefix) validateFamily(formats strfmt.Registry) error { if err := m.Family.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -248,6 +250,8 @@ func (m *Prefix) validateRole(formats strfmt.Registry) error { if err := m.Role.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -265,6 +269,8 @@ func (m *Prefix) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -282,6 +288,8 @@ func (m *Prefix) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -304,6 +312,8 @@ func (m *Prefix) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -323,6 +333,8 @@ func (m *Prefix) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -352,6 +364,8 @@ func (m *Prefix) validateVlan(formats strfmt.Registry) error { if err := m.Vlan.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vlan") } return err } @@ -369,6 +383,8 @@ func (m *Prefix) validateVrf(formats strfmt.Registry) error { if err := m.Vrf.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -467,7 +483,7 @@ func (m *Prefix) contextValidateChildren(ctx context.Context, formats strfmt.Reg func (m *Prefix) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -489,6 +505,8 @@ func (m *Prefix) contextValidateFamily(ctx context.Context, formats strfmt.Regis if err := m.Family.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("family") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("family") } return err } @@ -521,6 +539,8 @@ func (m *Prefix) contextValidateRole(ctx context.Context, formats strfmt.Registr if err := m.Role.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -535,6 +555,8 @@ func (m *Prefix) contextValidateSite(ctx context.Context, formats strfmt.Registr if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -549,6 +571,8 @@ func (m *Prefix) contextValidateStatus(ctx context.Context, formats strfmt.Regis if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -565,6 +589,8 @@ func (m *Prefix) contextValidateTags(ctx context.Context, formats strfmt.Registr if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -581,6 +607,8 @@ func (m *Prefix) contextValidateTenant(ctx context.Context, formats strfmt.Regis if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -604,6 +632,8 @@ func (m *Prefix) contextValidateVlan(ctx context.Context, formats strfmt.Registr if err := m.Vlan.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vlan") } return err } @@ -618,6 +648,8 @@ func (m *Prefix) contextValidateVrf(ctx context.Context, formats strfmt.Registry if err := m.Vrf.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } diff --git a/netbox/models/provider.go b/netbox/models/provider.go index f4b4f5ef6..3c6e20fa1 100644 --- a/netbox/models/provider.go +++ b/netbox/models/provider.go @@ -49,6 +49,10 @@ type Provider struct { // Minimum: 1 Asn *int64 `json:"asn,omitempty"` + // asns + // Unique: true + Asns []*NestedASN `json:"asns"` + // Circuit count // Read Only: true CircuitCount int64 `json:"circuit_count,omitempty"` @@ -58,8 +62,8 @@ type Provider struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -68,7 +72,7 @@ type Provider struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -119,6 +123,10 @@ func (m *Provider) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateAsns(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -181,12 +189,42 @@ func (m *Provider) validateAsn(formats strfmt.Registry) error { return nil } +func (m *Provider) validateAsns(formats strfmt.Registry) error { + if swag.IsZero(m.Asns) { // not required + return nil + } + + if err := validate.UniqueItems("asns", "body", m.Asns); err != nil { + return err + } + + for i := 0; i < len(m.Asns); i++ { + if swag.IsZero(m.Asns[i]) { // not required + continue + } + + if m.Asns[i] != nil { + if err := m.Asns[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("asns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("asns" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Provider) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -273,6 +311,8 @@ func (m *Provider) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -299,6 +339,10 @@ func (m *Provider) validateURL(formats strfmt.Registry) error { func (m *Provider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAsns(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCircuitCount(ctx, formats); err != nil { res = append(res, err) } @@ -333,6 +377,26 @@ func (m *Provider) ContextValidate(ctx context.Context, formats strfmt.Registry) return nil } +func (m *Provider) contextValidateAsns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Asns); i++ { + + if m.Asns[i] != nil { + if err := m.Asns[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("asns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("asns" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Provider) contextValidateCircuitCount(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "circuit_count", "body", int64(m.CircuitCount)); err != nil { @@ -344,7 +408,7 @@ func (m *Provider) contextValidateCircuitCount(ctx context.Context, formats strf func (m *Provider) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -386,6 +450,8 @@ func (m *Provider) contextValidateTags(ctx context.Context, formats strfmt.Regis if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/provider_network.go b/netbox/models/provider_network.go index c91a2013e..fba0e848e 100644 --- a/netbox/models/provider_network.go +++ b/netbox/models/provider_network.go @@ -40,8 +40,8 @@ type ProviderNetwork struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +54,7 @@ type ProviderNetwork struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -73,6 +73,10 @@ type ProviderNetwork struct { // Required: true Provider *NestedProvider `json:"provider"` + // Service ID + // Max Length: 100 + ServiceID string `json:"service_id,omitempty"` + // tags Tags []*NestedTag `json:"tags"` @@ -106,6 +110,10 @@ func (m *ProviderNetwork) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateServiceID(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -125,7 +133,7 @@ func (m *ProviderNetwork) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -183,6 +191,8 @@ func (m *ProviderNetwork) validateProvider(formats strfmt.Registry) error { if err := m.Provider.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider") } return err } @@ -191,6 +201,18 @@ func (m *ProviderNetwork) validateProvider(formats strfmt.Registry) error { return nil } +func (m *ProviderNetwork) validateServiceID(formats strfmt.Registry) error { + if swag.IsZero(m.ServiceID) { // not required + return nil + } + + if err := validate.MaxLength("service_id", "body", m.ServiceID, 100); err != nil { + return err + } + + return nil +} + func (m *ProviderNetwork) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -205,6 +227,8 @@ func (m *ProviderNetwork) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -267,7 +291,7 @@ func (m *ProviderNetwork) ContextValidate(ctx context.Context, formats strfmt.Re func (m *ProviderNetwork) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -307,6 +331,8 @@ func (m *ProviderNetwork) contextValidateProvider(ctx context.Context, formats s if err := m.Provider.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("provider") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("provider") } return err } @@ -323,6 +349,8 @@ func (m *ProviderNetwork) contextValidateTags(ctx context.Context, formats strfm if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/r_i_r.go b/netbox/models/r_i_r.go index 9adab156e..1fa824177 100644 --- a/netbox/models/r_i_r.go +++ b/netbox/models/r_i_r.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type RIR struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type RIR struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -81,6 +82,9 @@ type RIR struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -111,6 +115,10 @@ func (m *RIR) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -126,7 +134,7 @@ func (m *RIR) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -195,6 +203,32 @@ func (m *RIR) validateSlug(formats strfmt.Registry) error { return nil } +func (m *RIR) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RIR) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -231,6 +265,10 @@ func (m *RIR) ContextValidate(ctx context.Context, formats strfmt.Registry) erro res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -252,7 +290,7 @@ func (m *RIR) contextValidateAggregateCount(ctx context.Context, formats strfmt. func (m *RIR) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -286,6 +324,26 @@ func (m *RIR) contextValidateLastUpdated(ctx context.Context, formats strfmt.Reg return nil } +func (m *RIR) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RIR) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/rack.go b/netbox/models/rack.go index 409d2b9de..a64820de6 100644 --- a/netbox/models/rack.go +++ b/netbox/models/rack.go @@ -47,8 +47,8 @@ type Rack struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -67,12 +67,10 @@ type Rack struct { Display string `json:"display,omitempty"` // Facility ID - // - // Locally-assigned identifier // Max Length: 50 FacilityID *string `json:"facility_id,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -253,7 +251,7 @@ func (m *Rack) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -293,6 +291,8 @@ func (m *Rack) validateLocation(formats strfmt.Registry) error { if err := m.Location.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -343,6 +343,8 @@ func (m *Rack) validateOuterUnit(formats strfmt.Registry) error { if err := m.OuterUnit.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("outer_unit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("outer_unit") } return err } @@ -376,6 +378,8 @@ func (m *Rack) validateRole(formats strfmt.Registry) error { if err := m.Role.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -406,6 +410,8 @@ func (m *Rack) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -423,6 +429,8 @@ func (m *Rack) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -445,6 +453,8 @@ func (m *Rack) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -464,6 +474,8 @@ func (m *Rack) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -481,6 +493,8 @@ func (m *Rack) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -526,6 +540,8 @@ func (m *Rack) validateWidth(formats strfmt.Registry) error { if err := m.Width.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("width") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("width") } return err } @@ -610,7 +626,7 @@ func (m *Rack) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *Rack) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -659,6 +675,8 @@ func (m *Rack) contextValidateLocation(ctx context.Context, formats strfmt.Regis if err := m.Location.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") } return err } @@ -673,6 +691,8 @@ func (m *Rack) contextValidateOuterUnit(ctx context.Context, formats strfmt.Regi if err := m.OuterUnit.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("outer_unit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("outer_unit") } return err } @@ -696,6 +716,8 @@ func (m *Rack) contextValidateRole(ctx context.Context, formats strfmt.Registry) if err := m.Role.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -710,6 +732,8 @@ func (m *Rack) contextValidateSite(ctx context.Context, formats strfmt.Registry) if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -724,6 +748,8 @@ func (m *Rack) contextValidateStatus(ctx context.Context, formats strfmt.Registr if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -740,6 +766,8 @@ func (m *Rack) contextValidateTags(ctx context.Context, formats strfmt.Registry) if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -756,6 +784,8 @@ func (m *Rack) contextValidateTenant(ctx context.Context, formats strfmt.Registr if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -770,6 +800,8 @@ func (m *Rack) contextValidateType(ctx context.Context, formats strfmt.Registry) if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -793,6 +825,8 @@ func (m *Rack) contextValidateWidth(ctx context.Context, formats strfmt.Registry if err := m.Width.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("width") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("width") } return err } diff --git a/netbox/models/rack_reservation.go b/netbox/models/rack_reservation.go index 421671086..9ff954817 100644 --- a/netbox/models/rack_reservation.go +++ b/netbox/models/rack_reservation.go @@ -37,8 +37,8 @@ type RackReservation struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -53,10 +53,15 @@ type RackReservation struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // rack // Required: true Rack *NestedRack `json:"rack"` @@ -93,6 +98,10 @@ func (m *RackReservation) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateRack(formats); err != nil { res = append(res, err) } @@ -128,7 +137,7 @@ func (m *RackReservation) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -152,6 +161,18 @@ func (m *RackReservation) validateDescription(formats strfmt.Registry) error { return nil } +func (m *RackReservation) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *RackReservation) validateRack(formats strfmt.Registry) error { if err := validate.Required("rack", "body", m.Rack); err != nil { @@ -162,6 +183,8 @@ func (m *RackReservation) validateRack(formats strfmt.Registry) error { if err := m.Rack.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -184,6 +207,8 @@ func (m *RackReservation) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -203,6 +228,8 @@ func (m *RackReservation) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -257,6 +284,8 @@ func (m *RackReservation) validateUser(formats strfmt.Registry) error { if err := m.User.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } @@ -281,6 +310,10 @@ func (m *RackReservation) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRack(ctx, formats); err != nil { res = append(res, err) } @@ -309,7 +342,7 @@ func (m *RackReservation) ContextValidate(ctx context.Context, formats strfmt.Re func (m *RackReservation) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -334,12 +367,23 @@ func (m *RackReservation) contextValidateID(ctx context.Context, formats strfmt. return nil } +func (m *RackReservation) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *RackReservation) contextValidateRack(ctx context.Context, formats strfmt.Registry) error { if m.Rack != nil { if err := m.Rack.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("rack") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rack") } return err } @@ -356,6 +400,8 @@ func (m *RackReservation) contextValidateTags(ctx context.Context, formats strfm if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -372,6 +418,8 @@ func (m *RackReservation) contextValidateTenant(ctx context.Context, formats str if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -395,6 +443,8 @@ func (m *RackReservation) contextValidateUser(ctx context.Context, formats strfm if err := m.User.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } diff --git a/netbox/models/rack_role.go b/netbox/models/rack_role.go index accecaa15..4f1c38c3f 100644 --- a/netbox/models/rack_role.go +++ b/netbox/models/rack_role.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -42,8 +43,8 @@ type RackRole struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -56,7 +57,7 @@ type RackRole struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -82,6 +83,9 @@ type RackRole struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -116,6 +120,10 @@ func (m *RackRole) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -151,7 +159,7 @@ func (m *RackRole) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -220,6 +228,32 @@ func (m *RackRole) validateSlug(formats strfmt.Registry) error { return nil } +func (m *RackRole) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RackRole) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -256,6 +290,10 @@ func (m *RackRole) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -268,7 +306,7 @@ func (m *RackRole) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *RackRole) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -311,6 +349,26 @@ func (m *RackRole) contextValidateRackCount(ctx context.Context, formats strfmt. return nil } +func (m *RackRole) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RackRole) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/rack_unit.go b/netbox/models/rack_unit.go index 5c97f7520..747daa542 100644 --- a/netbox/models/rack_unit.go +++ b/netbox/models/rack_unit.go @@ -90,6 +90,8 @@ func (m *RackUnit) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -107,6 +109,8 @@ func (m *RackUnit) validateFace(formats strfmt.Registry) error { if err := m.Face.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("face") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("face") } return err } @@ -167,6 +171,8 @@ func (m *RackUnit) contextValidateDevice(ctx context.Context, formats strfmt.Reg if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -190,6 +196,8 @@ func (m *RackUnit) contextValidateFace(ctx context.Context, formats strfmt.Regis if err := m.Face.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("face") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("face") } return err } diff --git a/netbox/models/rear_port.go b/netbox/models/rear_port.go index 96d8be890..a58f400b3 100644 --- a/netbox/models/rear_port.go +++ b/netbox/models/rear_port.go @@ -43,18 +43,6 @@ type RearPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -62,8 +50,8 @@ type RearPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -80,7 +68,7 @@ type RearPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -95,11 +83,26 @@ type RearPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // module + Module *ComponentNestedModule `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -156,6 +159,10 @@ func (m *RearPort) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateModule(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -191,6 +198,8 @@ func (m *RearPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -220,7 +229,7 @@ func (m *RearPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -249,6 +258,8 @@ func (m *RearPort) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -281,6 +292,25 @@ func (m *RearPort) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *RearPort) validateModule(formats strfmt.Registry) error { + if swag.IsZero(m.Module) { // not required + return nil + } + + if m.Module != nil { + if err := m.Module.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *RearPort) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -328,6 +358,8 @@ func (m *RearPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -348,6 +380,8 @@ func (m *RearPort) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -380,10 +414,6 @@ func (m *RearPort) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -404,6 +434,18 @@ func (m *RearPort) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModule(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -437,6 +479,8 @@ func (m *RearPort) contextValidateCable(ctx context.Context, formats strfmt.Regi if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -445,18 +489,9 @@ func (m *RearPort) contextValidateCable(ctx context.Context, formats strfmt.Regi return nil } -func (m *RearPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } - - return nil -} - func (m *RearPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -469,6 +504,8 @@ func (m *RearPort) contextValidateDevice(ctx context.Context, formats strfmt.Reg if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -504,6 +541,36 @@ func (m *RearPort) contextValidateLastUpdated(ctx context.Context, formats strfm return nil } +func (m *RearPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *RearPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + +func (m *RearPort) contextValidateModule(ctx context.Context, formats strfmt.Registry) error { + + if m.Module != nil { + if err := m.Module.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("module") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("module") + } + return err + } + } + + return nil +} + func (m *RearPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -512,6 +579,8 @@ func (m *RearPort) contextValidateTags(ctx context.Context, formats strfmt.Regis if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -528,6 +597,8 @@ func (m *RearPort) contextValidateType(ctx context.Context, formats strfmt.Regis if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -570,12 +641,12 @@ type RearPortType struct { // label // Required: true - // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/APC LSH LSH/APC MPO MTRJ SC SC/APC ST CS SN Splice] + // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/PC LC/UPC LC/APC LSH LSH/PC LSH/UPC LSH/APC MPO MTRJ SC SC/PC SC/UPC SC/APC ST CS SN SMA 905 SMA 906 URM-P2 URM-P4 URM-P8 Splice] Label *string `json:"label"` // value // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Value *string `json:"value"` } @@ -601,7 +672,7 @@ var rearPortTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/APC","LSH","LSH/APC","MPO","MTRJ","SC","SC/APC","ST","CS","SN","Splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/PC","LC/UPC","LC/APC","LSH","LSH/PC","LSH/UPC","LSH/APC","MPO","MTRJ","SC","SC/PC","SC/UPC","SC/APC","ST","CS","SN","SMA 905","SMA 906","URM-P2","URM-P4","URM-P8","Splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -671,12 +742,24 @@ const ( // RearPortTypeLabelLC captures enum value "LC" RearPortTypeLabelLC string = "LC" + // RearPortTypeLabelLCPC captures enum value "LC/PC" + RearPortTypeLabelLCPC string = "LC/PC" + + // RearPortTypeLabelLCUPC captures enum value "LC/UPC" + RearPortTypeLabelLCUPC string = "LC/UPC" + // RearPortTypeLabelLCAPC captures enum value "LC/APC" RearPortTypeLabelLCAPC string = "LC/APC" // RearPortTypeLabelLSH captures enum value "LSH" RearPortTypeLabelLSH string = "LSH" + // RearPortTypeLabelLSHPC captures enum value "LSH/PC" + RearPortTypeLabelLSHPC string = "LSH/PC" + + // RearPortTypeLabelLSHUPC captures enum value "LSH/UPC" + RearPortTypeLabelLSHUPC string = "LSH/UPC" + // RearPortTypeLabelLSHAPC captures enum value "LSH/APC" RearPortTypeLabelLSHAPC string = "LSH/APC" @@ -689,6 +772,12 @@ const ( // RearPortTypeLabelSC captures enum value "SC" RearPortTypeLabelSC string = "SC" + // RearPortTypeLabelSCPC captures enum value "SC/PC" + RearPortTypeLabelSCPC string = "SC/PC" + + // RearPortTypeLabelSCUPC captures enum value "SC/UPC" + RearPortTypeLabelSCUPC string = "SC/UPC" + // RearPortTypeLabelSCAPC captures enum value "SC/APC" RearPortTypeLabelSCAPC string = "SC/APC" @@ -701,6 +790,21 @@ const ( // RearPortTypeLabelSN captures enum value "SN" RearPortTypeLabelSN string = "SN" + // RearPortTypeLabelSMA905 captures enum value "SMA 905" + RearPortTypeLabelSMA905 string = "SMA 905" + + // RearPortTypeLabelSMA906 captures enum value "SMA 906" + RearPortTypeLabelSMA906 string = "SMA 906" + + // RearPortTypeLabelURMDashP2 captures enum value "URM-P2" + RearPortTypeLabelURMDashP2 string = "URM-P2" + + // RearPortTypeLabelURMDashP4 captures enum value "URM-P4" + RearPortTypeLabelURMDashP4 string = "URM-P4" + + // RearPortTypeLabelURMDashP8 captures enum value "URM-P8" + RearPortTypeLabelURMDashP8 string = "URM-P8" + // RearPortTypeLabelSplice captures enum value "Splice" RearPortTypeLabelSplice string = "Splice" ) @@ -731,7 +835,7 @@ var rearPortTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -801,12 +905,24 @@ const ( // RearPortTypeValueLc captures enum value "lc" RearPortTypeValueLc string = "lc" + // RearPortTypeValueLcDashPc captures enum value "lc-pc" + RearPortTypeValueLcDashPc string = "lc-pc" + + // RearPortTypeValueLcDashUpc captures enum value "lc-upc" + RearPortTypeValueLcDashUpc string = "lc-upc" + // RearPortTypeValueLcDashApc captures enum value "lc-apc" RearPortTypeValueLcDashApc string = "lc-apc" // RearPortTypeValueLsh captures enum value "lsh" RearPortTypeValueLsh string = "lsh" + // RearPortTypeValueLshDashPc captures enum value "lsh-pc" + RearPortTypeValueLshDashPc string = "lsh-pc" + + // RearPortTypeValueLshDashUpc captures enum value "lsh-upc" + RearPortTypeValueLshDashUpc string = "lsh-upc" + // RearPortTypeValueLshDashApc captures enum value "lsh-apc" RearPortTypeValueLshDashApc string = "lsh-apc" @@ -819,6 +935,12 @@ const ( // RearPortTypeValueSc captures enum value "sc" RearPortTypeValueSc string = "sc" + // RearPortTypeValueScDashPc captures enum value "sc-pc" + RearPortTypeValueScDashPc string = "sc-pc" + + // RearPortTypeValueScDashUpc captures enum value "sc-upc" + RearPortTypeValueScDashUpc string = "sc-upc" + // RearPortTypeValueScDashApc captures enum value "sc-apc" RearPortTypeValueScDashApc string = "sc-apc" @@ -831,6 +953,21 @@ const ( // RearPortTypeValueSn captures enum value "sn" RearPortTypeValueSn string = "sn" + // RearPortTypeValueSmaDash905 captures enum value "sma-905" + RearPortTypeValueSmaDash905 string = "sma-905" + + // RearPortTypeValueSmaDash906 captures enum value "sma-906" + RearPortTypeValueSmaDash906 string = "sma-906" + + // RearPortTypeValueUrmDashP2 captures enum value "urm-p2" + RearPortTypeValueUrmDashP2 string = "urm-p2" + + // RearPortTypeValueUrmDashP4 captures enum value "urm-p4" + RearPortTypeValueUrmDashP4 string = "urm-p4" + + // RearPortTypeValueUrmDashP8 captures enum value "urm-p8" + RearPortTypeValueUrmDashP8 string = "urm-p8" + // RearPortTypeValueSplice captures enum value "splice" RearPortTypeValueSplice string = "splice" ) diff --git a/netbox/models/rear_port_template.go b/netbox/models/rear_port_template.go index 64bb7e781..0da37e709 100644 --- a/netbox/models/rear_port_template.go +++ b/netbox/models/rear_port_template.go @@ -42,8 +42,8 @@ type RearPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -57,7 +57,7 @@ type RearPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -164,7 +164,7 @@ func (m *RearPortTemplate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -193,6 +193,8 @@ func (m *RearPortTemplate) validateDeviceType(formats strfmt.Registry) error { if err := m.DeviceType.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -268,6 +270,8 @@ func (m *RearPortTemplate) validateType(formats strfmt.Registry) error { if err := m.Type.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -328,7 +332,7 @@ func (m *RearPortTemplate) ContextValidate(ctx context.Context, formats strfmt.R func (m *RearPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -341,6 +345,8 @@ func (m *RearPortTemplate) contextValidateDeviceType(ctx context.Context, format if err := m.DeviceType.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device_type") } return err } @@ -382,6 +388,8 @@ func (m *RearPortTemplate) contextValidateType(ctx context.Context, formats strf if err := m.Type.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") } return err } @@ -424,12 +432,12 @@ type RearPortTemplateType struct { // label // Required: true - // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/APC LSH LSH/APC MPO MTRJ SC SC/APC ST CS SN Splice] + // Enum: [8P8C 8P6C 8P4C 8P2C 6P6C 6P4C 6P2C 4P4C 4P2C GG45 TERA 4P TERA 2P TERA 1P 110 Punch BNC F Connector N Connector MRJ21 FC LC LC/PC LC/UPC LC/APC LSH LSH/PC LSH/UPC LSH/APC MPO MTRJ SC SC/PC SC/UPC SC/APC ST CS SN SMA 905 SMA 906 URM-P2 URM-P4 URM-P8 Splice] Label *string `json:"label"` // value // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Value *string `json:"value"` } @@ -455,7 +463,7 @@ var rearPortTemplateTypeTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/APC","LSH","LSH/APC","MPO","MTRJ","SC","SC/APC","ST","CS","SN","Splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8P8C","8P6C","8P4C","8P2C","6P6C","6P4C","6P2C","4P4C","4P2C","GG45","TERA 4P","TERA 2P","TERA 1P","110 Punch","BNC","F Connector","N Connector","MRJ21","FC","LC","LC/PC","LC/UPC","LC/APC","LSH","LSH/PC","LSH/UPC","LSH/APC","MPO","MTRJ","SC","SC/PC","SC/UPC","SC/APC","ST","CS","SN","SMA 905","SMA 906","URM-P2","URM-P4","URM-P8","Splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -525,12 +533,24 @@ const ( // RearPortTemplateTypeLabelLC captures enum value "LC" RearPortTemplateTypeLabelLC string = "LC" + // RearPortTemplateTypeLabelLCPC captures enum value "LC/PC" + RearPortTemplateTypeLabelLCPC string = "LC/PC" + + // RearPortTemplateTypeLabelLCUPC captures enum value "LC/UPC" + RearPortTemplateTypeLabelLCUPC string = "LC/UPC" + // RearPortTemplateTypeLabelLCAPC captures enum value "LC/APC" RearPortTemplateTypeLabelLCAPC string = "LC/APC" // RearPortTemplateTypeLabelLSH captures enum value "LSH" RearPortTemplateTypeLabelLSH string = "LSH" + // RearPortTemplateTypeLabelLSHPC captures enum value "LSH/PC" + RearPortTemplateTypeLabelLSHPC string = "LSH/PC" + + // RearPortTemplateTypeLabelLSHUPC captures enum value "LSH/UPC" + RearPortTemplateTypeLabelLSHUPC string = "LSH/UPC" + // RearPortTemplateTypeLabelLSHAPC captures enum value "LSH/APC" RearPortTemplateTypeLabelLSHAPC string = "LSH/APC" @@ -543,6 +563,12 @@ const ( // RearPortTemplateTypeLabelSC captures enum value "SC" RearPortTemplateTypeLabelSC string = "SC" + // RearPortTemplateTypeLabelSCPC captures enum value "SC/PC" + RearPortTemplateTypeLabelSCPC string = "SC/PC" + + // RearPortTemplateTypeLabelSCUPC captures enum value "SC/UPC" + RearPortTemplateTypeLabelSCUPC string = "SC/UPC" + // RearPortTemplateTypeLabelSCAPC captures enum value "SC/APC" RearPortTemplateTypeLabelSCAPC string = "SC/APC" @@ -555,6 +581,21 @@ const ( // RearPortTemplateTypeLabelSN captures enum value "SN" RearPortTemplateTypeLabelSN string = "SN" + // RearPortTemplateTypeLabelSMA905 captures enum value "SMA 905" + RearPortTemplateTypeLabelSMA905 string = "SMA 905" + + // RearPortTemplateTypeLabelSMA906 captures enum value "SMA 906" + RearPortTemplateTypeLabelSMA906 string = "SMA 906" + + // RearPortTemplateTypeLabelURMDashP2 captures enum value "URM-P2" + RearPortTemplateTypeLabelURMDashP2 string = "URM-P2" + + // RearPortTemplateTypeLabelURMDashP4 captures enum value "URM-P4" + RearPortTemplateTypeLabelURMDashP4 string = "URM-P4" + + // RearPortTemplateTypeLabelURMDashP8 captures enum value "URM-P8" + RearPortTemplateTypeLabelURMDashP8 string = "URM-P8" + // RearPortTemplateTypeLabelSplice captures enum value "Splice" RearPortTemplateTypeLabelSplice string = "Splice" ) @@ -585,7 +626,7 @@ var rearPortTemplateTypeTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -655,12 +696,24 @@ const ( // RearPortTemplateTypeValueLc captures enum value "lc" RearPortTemplateTypeValueLc string = "lc" + // RearPortTemplateTypeValueLcDashPc captures enum value "lc-pc" + RearPortTemplateTypeValueLcDashPc string = "lc-pc" + + // RearPortTemplateTypeValueLcDashUpc captures enum value "lc-upc" + RearPortTemplateTypeValueLcDashUpc string = "lc-upc" + // RearPortTemplateTypeValueLcDashApc captures enum value "lc-apc" RearPortTemplateTypeValueLcDashApc string = "lc-apc" // RearPortTemplateTypeValueLsh captures enum value "lsh" RearPortTemplateTypeValueLsh string = "lsh" + // RearPortTemplateTypeValueLshDashPc captures enum value "lsh-pc" + RearPortTemplateTypeValueLshDashPc string = "lsh-pc" + + // RearPortTemplateTypeValueLshDashUpc captures enum value "lsh-upc" + RearPortTemplateTypeValueLshDashUpc string = "lsh-upc" + // RearPortTemplateTypeValueLshDashApc captures enum value "lsh-apc" RearPortTemplateTypeValueLshDashApc string = "lsh-apc" @@ -673,6 +726,12 @@ const ( // RearPortTemplateTypeValueSc captures enum value "sc" RearPortTemplateTypeValueSc string = "sc" + // RearPortTemplateTypeValueScDashPc captures enum value "sc-pc" + RearPortTemplateTypeValueScDashPc string = "sc-pc" + + // RearPortTemplateTypeValueScDashUpc captures enum value "sc-upc" + RearPortTemplateTypeValueScDashUpc string = "sc-upc" + // RearPortTemplateTypeValueScDashApc captures enum value "sc-apc" RearPortTemplateTypeValueScDashApc string = "sc-apc" @@ -685,6 +744,21 @@ const ( // RearPortTemplateTypeValueSn captures enum value "sn" RearPortTemplateTypeValueSn string = "sn" + // RearPortTemplateTypeValueSmaDash905 captures enum value "sma-905" + RearPortTemplateTypeValueSmaDash905 string = "sma-905" + + // RearPortTemplateTypeValueSmaDash906 captures enum value "sma-906" + RearPortTemplateTypeValueSmaDash906 string = "sma-906" + + // RearPortTemplateTypeValueUrmDashP2 captures enum value "urm-p2" + RearPortTemplateTypeValueUrmDashP2 string = "urm-p2" + + // RearPortTemplateTypeValueUrmDashP4 captures enum value "urm-p4" + RearPortTemplateTypeValueUrmDashP4 string = "urm-p4" + + // RearPortTemplateTypeValueUrmDashP8 captures enum value "urm-p8" + RearPortTemplateTypeValueUrmDashP8 string = "urm-p8" + // RearPortTemplateTypeValueSplice captures enum value "splice" RearPortTemplateTypeValueSplice string = "splice" ) diff --git a/netbox/models/region.go b/netbox/models/region.go index 110f0cf0c..49a402c80 100644 --- a/netbox/models/region.go +++ b/netbox/models/region.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type Region struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type Region struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -83,6 +84,9 @@ type Region struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -117,6 +121,10 @@ func (m *Region) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -132,7 +140,7 @@ func (m *Region) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -189,6 +197,8 @@ func (m *Region) validateParent(formats strfmt.Registry) error { if err := m.Parent.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -218,6 +228,32 @@ func (m *Region) validateSlug(formats strfmt.Registry) error { return nil } +func (m *Region) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Region) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -262,6 +298,10 @@ func (m *Region) ContextValidate(ctx context.Context, formats strfmt.Registry) e res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -283,7 +323,7 @@ func (m *Region) contextValidateDepth(ctx context.Context, formats strfmt.Regist func (m *Region) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -323,6 +363,8 @@ func (m *Region) contextValidateParent(ctx context.Context, formats strfmt.Regis if err := m.Parent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -340,6 +382,26 @@ func (m *Region) contextValidateSiteCount(ctx context.Context, formats strfmt.Re return nil } +func (m *Region) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Region) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/role.go b/netbox/models/role.go index 917ec1092..d4717470d 100644 --- a/netbox/models/role.go +++ b/netbox/models/role.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -36,8 +37,8 @@ type Role struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -50,7 +51,7 @@ type Role struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -76,6 +77,9 @@ type Role struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -115,6 +119,10 @@ func (m *Role) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -134,7 +142,7 @@ func (m *Role) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -203,6 +211,32 @@ func (m *Role) validateSlug(formats strfmt.Registry) error { return nil } +func (m *Role) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Role) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -255,6 +289,10 @@ func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -271,7 +309,7 @@ func (m *Role) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *Role) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -314,6 +352,26 @@ func (m *Role) contextValidatePrefixCount(ctx context.Context, formats strfmt.Re return nil } +func (m *Role) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Role) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/route_target.go b/netbox/models/route_target.go index 176b82e7f..0b6214cdf 100644 --- a/netbox/models/route_target.go +++ b/netbox/models/route_target.go @@ -37,8 +37,8 @@ type RouteTarget struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -51,7 +51,7 @@ type RouteTarget struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -123,7 +123,7 @@ func (m *RouteTarget) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -185,6 +185,8 @@ func (m *RouteTarget) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -204,6 +206,8 @@ func (m *RouteTarget) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -264,7 +268,7 @@ func (m *RouteTarget) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *RouteTarget) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -306,6 +310,8 @@ func (m *RouteTarget) contextValidateTags(ctx context.Context, formats strfmt.Re if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -322,6 +328,8 @@ func (m *RouteTarget) contextValidateTenant(ctx context.Context, formats strfmt. if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/saved_topology.go b/netbox/models/saved_topology.go deleted file mode 100644 index dacc519f8..000000000 --- a/netbox/models/saved_topology.go +++ /dev/null @@ -1,199 +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 models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// SavedTopology saved topology -// -// swagger:model SavedTopology -type SavedTopology struct { - - // Created by - // Read Only: true - // Min Length: 1 - CreatedBy string `json:"created_by,omitempty"` - - // ID - // Read Only: true - ID int64 `json:"id,omitempty"` - - // Layout context - LayoutContext *string `json:"layout_context,omitempty"` - - // Name - // Max Length: 100 - Name string `json:"name,omitempty"` - - // Timestamp - // Read Only: true - // Format: date-time - Timestamp strfmt.DateTime `json:"timestamp,omitempty"` - - // Topology - // Required: true - Topology *string `json:"topology"` -} - -// Validate validates this saved topology -func (m *SavedTopology) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreatedBy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTimestamp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTopology(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SavedTopology) validateCreatedBy(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedBy) { // not required - return nil - } - - if err := validate.MinLength("created_by", "body", m.CreatedBy, 1); err != nil { - return err - } - - return nil -} - -func (m *SavedTopology) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil - } - - if err := validate.MaxLength("name", "body", m.Name, 100); err != nil { - return err - } - - return nil -} - -func (m *SavedTopology) validateTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.Timestamp) { // not required - return nil - } - - if err := validate.FormatOf("timestamp", "body", "date-time", m.Timestamp.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *SavedTopology) validateTopology(formats strfmt.Registry) error { - - if err := validate.Required("topology", "body", m.Topology); err != nil { - return err - } - - return nil -} - -// ContextValidate validate this saved topology based on the context it is used -func (m *SavedTopology) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreatedBy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateID(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTimestamp(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *SavedTopology) contextValidateCreatedBy(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "created_by", "body", string(m.CreatedBy)); err != nil { - return err - } - - return nil -} - -func (m *SavedTopology) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { - return err - } - - return nil -} - -func (m *SavedTopology) contextValidateTimestamp(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "timestamp", "body", strfmt.DateTime(m.Timestamp)); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *SavedTopology) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SavedTopology) UnmarshalBinary(b []byte) error { - var res SavedTopology - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/netbox/models/service.go b/netbox/models/service.go index 6fc3be495..88d00adb9 100644 --- a/netbox/models/service.go +++ b/netbox/models/service.go @@ -38,8 +38,8 @@ type Service struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -55,7 +55,7 @@ type Service struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -152,7 +152,7 @@ func (m *Service) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -180,6 +180,8 @@ func (m *Service) validateDevice(formats strfmt.Registry) error { if err := m.Device.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -206,6 +208,8 @@ func (m *Service) validateIpaddresses(formats strfmt.Registry) error { if err := m.Ipaddresses[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipaddresses" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipaddresses" + "." + strconv.Itoa(i)) } return err } @@ -275,6 +279,8 @@ func (m *Service) validateProtocol(formats strfmt.Registry) error { if err := m.Protocol.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("protocol") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("protocol") } return err } @@ -297,6 +303,8 @@ func (m *Service) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -328,6 +336,8 @@ func (m *Service) validateVirtualMachine(formats strfmt.Registry) error { if err := m.VirtualMachine.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_machine") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_machine") } return err } @@ -388,7 +398,7 @@ func (m *Service) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Service) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -401,6 +411,8 @@ func (m *Service) contextValidateDevice(ctx context.Context, formats strfmt.Regi if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("device") } return err } @@ -435,6 +447,8 @@ func (m *Service) contextValidateIpaddresses(ctx context.Context, formats strfmt if err := m.Ipaddresses[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipaddresses" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ipaddresses" + "." + strconv.Itoa(i)) } return err } @@ -460,6 +474,8 @@ func (m *Service) contextValidateProtocol(ctx context.Context, formats strfmt.Re if err := m.Protocol.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("protocol") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("protocol") } return err } @@ -476,6 +492,8 @@ func (m *Service) contextValidateTags(ctx context.Context, formats strfmt.Regist if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -501,6 +519,8 @@ func (m *Service) contextValidateVirtualMachine(ctx context.Context, formats str if err := m.VirtualMachine.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_machine") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_machine") } return err } @@ -534,12 +554,12 @@ type ServiceProtocol struct { // label // Required: true - // Enum: [TCP UDP] + // Enum: [TCP UDP SCTP] Label *string `json:"label"` // value // Required: true - // Enum: [tcp udp] + // Enum: [tcp udp sctp] Value *string `json:"value"` } @@ -565,7 +585,7 @@ var serviceProtocolTypeLabelPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TCP","UDP"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TCP","UDP","SCTP"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -580,6 +600,9 @@ const ( // ServiceProtocolLabelUDP captures enum value "UDP" ServiceProtocolLabelUDP string = "UDP" + + // ServiceProtocolLabelSCTP captures enum value "SCTP" + ServiceProtocolLabelSCTP string = "SCTP" ) // prop value enum @@ -608,7 +631,7 @@ var serviceProtocolTypeValuePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["tcp","udp"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["tcp","udp","sctp"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -623,6 +646,9 @@ const ( // ServiceProtocolValueUDP captures enum value "udp" ServiceProtocolValueUDP string = "udp" + + // ServiceProtocolValueSctp captures enum value "sctp" + ServiceProtocolValueSctp string = "sctp" ) // prop value enum diff --git a/netbox/models/service_template.go b/netbox/models/service_template.go new file mode 100644 index 000000000..fbaab9e71 --- /dev/null +++ b/netbox/models/service_template.go @@ -0,0 +1,543 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ServiceTemplate service template +// +// swagger:model ServiceTemplate +type ServiceTemplate struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // ports + // Required: true + Ports []int64 `json:"ports"` + + // protocol + Protocol *ServiceTemplateProtocol `json:"protocol,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this service template +func (m *ServiceTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProtocol(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) validatePorts(formats strfmt.Registry) error { + + if err := validate.Required("ports", "body", m.Ports); err != nil { + return err + } + + for i := 0; i < len(m.Ports); i++ { + + if err := validate.MinimumInt("ports"+"."+strconv.Itoa(i), "body", m.Ports[i], 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("ports"+"."+strconv.Itoa(i), "body", m.Ports[i], 65535, false); err != nil { + return err + } + + } + + return nil +} + +func (m *ServiceTemplate) validateProtocol(formats strfmt.Registry) error { + if swag.IsZero(m.Protocol) { // not required + return nil + } + + if m.Protocol != nil { + if err := m.Protocol.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("protocol") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("protocol") + } + return err + } + } + + return nil +} + +func (m *ServiceTemplate) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceTemplate) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this service template based on the context it is used +func (m *ServiceTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProtocol(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *ServiceTemplate) contextValidateProtocol(ctx context.Context, formats strfmt.Registry) error { + + if m.Protocol != nil { + if err := m.Protocol.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("protocol") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("protocol") + } + return err + } + } + + return nil +} + +func (m *ServiceTemplate) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceTemplate) UnmarshalBinary(b []byte) error { + var res ServiceTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ServiceTemplateProtocol Protocol +// +// swagger:model ServiceTemplateProtocol +type ServiceTemplateProtocol struct { + + // label + // Required: true + // Enum: [TCP UDP SCTP] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [tcp udp sctp] + Value *string `json:"value"` +} + +// Validate validates this service template protocol +func (m *ServiceTemplateProtocol) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var serviceTemplateProtocolTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["TCP","UDP","SCTP"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + serviceTemplateProtocolTypeLabelPropEnum = append(serviceTemplateProtocolTypeLabelPropEnum, v) + } +} + +const ( + + // ServiceTemplateProtocolLabelTCP captures enum value "TCP" + ServiceTemplateProtocolLabelTCP string = "TCP" + + // ServiceTemplateProtocolLabelUDP captures enum value "UDP" + ServiceTemplateProtocolLabelUDP string = "UDP" + + // ServiceTemplateProtocolLabelSCTP captures enum value "SCTP" + ServiceTemplateProtocolLabelSCTP string = "SCTP" +) + +// prop value enum +func (m *ServiceTemplateProtocol) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, serviceTemplateProtocolTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ServiceTemplateProtocol) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("protocol"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("protocol"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var serviceTemplateProtocolTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["tcp","udp","sctp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + serviceTemplateProtocolTypeValuePropEnum = append(serviceTemplateProtocolTypeValuePropEnum, v) + } +} + +const ( + + // ServiceTemplateProtocolValueTCP captures enum value "tcp" + ServiceTemplateProtocolValueTCP string = "tcp" + + // ServiceTemplateProtocolValueUDP captures enum value "udp" + ServiceTemplateProtocolValueUDP string = "udp" + + // ServiceTemplateProtocolValueSctp captures enum value "sctp" + ServiceTemplateProtocolValueSctp string = "sctp" +) + +// prop value enum +func (m *ServiceTemplateProtocol) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, serviceTemplateProtocolTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *ServiceTemplateProtocol) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("protocol"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("protocol"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this service template protocol based on context it is used +func (m *ServiceTemplateProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceTemplateProtocol) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceTemplateProtocol) UnmarshalBinary(b []byte) error { + var res ServiceTemplateProtocol + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/site.go b/netbox/models/site.go index fad6488d3..dccf62d03 100644 --- a/netbox/models/site.go +++ b/netbox/models/site.go @@ -36,12 +36,9 @@ import ( // swagger:model Site type Site struct { - // ASN - // - // 32-bit autonomous system number - // Maximum: 4.294967295e+09 - // Minimum: 1 - Asn *int64 `json:"asn,omitempty"` + // asns + // Unique: true + Asns []*NestedASN `json:"asns"` // Circuit count // Read Only: true @@ -50,23 +47,10 @@ type Site struct { // Comments Comments string `json:"comments,omitempty"` - // Contact E-mail - // Max Length: 254 - // Format: email - ContactEmail strfmt.Email `json:"contact_email,omitempty"` - - // Contact name - // Max Length: 50 - ContactName string `json:"contact_name,omitempty"` - - // Contact phone - // Max Length: 20 - ContactPhone string `json:"contact_phone,omitempty"` - // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -92,7 +76,7 @@ type Site struct { // group Group *NestedSiteGroup `json:"group,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -173,19 +157,7 @@ type Site struct { func (m *Site) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateAsn(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContactEmail(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContactName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContactPhone(formats); err != nil { + if err := m.validateAsns(formats); err != nil { res = append(res, err) } @@ -251,57 +223,31 @@ func (m *Site) Validate(formats strfmt.Registry) error { return nil } -func (m *Site) validateAsn(formats strfmt.Registry) error { - if swag.IsZero(m.Asn) { // not required - return nil - } - - if err := validate.MinimumInt("asn", "body", *m.Asn, 1, false); err != nil { - return err - } - - if err := validate.MaximumInt("asn", "body", *m.Asn, 4.294967295e+09, false); err != nil { - return err - } - - return nil -} - -func (m *Site) validateContactEmail(formats strfmt.Registry) error { - if swag.IsZero(m.ContactEmail) { // not required +func (m *Site) validateAsns(formats strfmt.Registry) error { + if swag.IsZero(m.Asns) { // not required return nil } - if err := validate.MaxLength("contact_email", "body", m.ContactEmail.String(), 254); err != nil { - return err - } - - if err := validate.FormatOf("contact_email", "body", "email", m.ContactEmail.String(), formats); err != nil { + if err := validate.UniqueItems("asns", "body", m.Asns); err != nil { return err } - return nil -} - -func (m *Site) validateContactName(formats strfmt.Registry) error { - if swag.IsZero(m.ContactName) { // not required - return nil - } - - if err := validate.MaxLength("contact_name", "body", m.ContactName, 50); err != nil { - return err - } - - return nil -} + for i := 0; i < len(m.Asns); i++ { + if swag.IsZero(m.Asns[i]) { // not required + continue + } -func (m *Site) validateContactPhone(formats strfmt.Registry) error { - if swag.IsZero(m.ContactPhone) { // not required - return nil - } + if m.Asns[i] != nil { + if err := m.Asns[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("asns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("asns" + "." + strconv.Itoa(i)) + } + return err + } + } - if err := validate.MaxLength("contact_phone", "body", m.ContactPhone, 20); err != nil { - return err } return nil @@ -312,7 +258,7 @@ func (m *Site) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -352,6 +298,8 @@ func (m *Site) validateGroup(formats strfmt.Registry) error { if err := m.Group.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -410,6 +358,8 @@ func (m *Site) validateRegion(formats strfmt.Registry) error { if err := m.Region.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("region") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("region") } return err } @@ -460,6 +410,8 @@ func (m *Site) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -482,6 +434,8 @@ func (m *Site) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -501,6 +455,8 @@ func (m *Site) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -525,6 +481,10 @@ func (m *Site) validateURL(formats strfmt.Registry) error { func (m *Site) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAsns(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCircuitCount(ctx, formats); err != nil { res = append(res, err) } @@ -595,6 +555,26 @@ func (m *Site) ContextValidate(ctx context.Context, formats strfmt.Registry) err return nil } +func (m *Site) contextValidateAsns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Asns); i++ { + + if m.Asns[i] != nil { + if err := m.Asns[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("asns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("asns" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *Site) contextValidateCircuitCount(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "circuit_count", "body", int64(m.CircuitCount)); err != nil { @@ -606,7 +586,7 @@ func (m *Site) contextValidateCircuitCount(ctx context.Context, formats strfmt.R func (m *Site) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -637,6 +617,8 @@ func (m *Site) contextValidateGroup(ctx context.Context, formats strfmt.Registry if err := m.Group.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -687,6 +669,8 @@ func (m *Site) contextValidateRegion(ctx context.Context, formats strfmt.Registr if err := m.Region.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("region") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("region") } return err } @@ -701,6 +685,8 @@ func (m *Site) contextValidateStatus(ctx context.Context, formats strfmt.Registr if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -717,6 +703,8 @@ func (m *Site) contextValidateTags(ctx context.Context, formats strfmt.Registry) if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -733,6 +721,8 @@ func (m *Site) contextValidateTenant(ctx context.Context, formats strfmt.Registr if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/site_group.go b/netbox/models/site_group.go index f70edd134..06298493e 100644 --- a/netbox/models/site_group.go +++ b/netbox/models/site_group.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type SiteGroup struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type SiteGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -83,6 +84,9 @@ type SiteGroup struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -117,6 +121,10 @@ func (m *SiteGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -132,7 +140,7 @@ func (m *SiteGroup) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -189,6 +197,8 @@ func (m *SiteGroup) validateParent(formats strfmt.Registry) error { if err := m.Parent.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -218,6 +228,32 @@ func (m *SiteGroup) validateSlug(formats strfmt.Registry) error { return nil } +func (m *SiteGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *SiteGroup) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -262,6 +298,10 @@ func (m *SiteGroup) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -283,7 +323,7 @@ func (m *SiteGroup) contextValidateDepth(ctx context.Context, formats strfmt.Reg func (m *SiteGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -323,6 +363,8 @@ func (m *SiteGroup) contextValidateParent(ctx context.Context, formats strfmt.Re if err := m.Parent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -340,6 +382,26 @@ func (m *SiteGroup) contextValidateSiteCount(ctx context.Context, formats strfmt return nil } +func (m *SiteGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *SiteGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/tag.go b/netbox/models/tag.go index d1a1787f3..b78120241 100644 --- a/netbox/models/tag.go +++ b/netbox/models/tag.go @@ -40,6 +40,11 @@ type Tag struct { // Pattern: ^[0-9a-f]{6}$ Color string `json:"color,omitempty"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Description // Max Length: 200 Description string `json:"description,omitempty"` @@ -52,6 +57,11 @@ type Tag struct { // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Name // Required: true // Max Length: 100 @@ -83,10 +93,18 @@ func (m *Tag) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDescription(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -125,6 +143,18 @@ func (m *Tag) validateColor(formats strfmt.Registry) error { return nil } +func (m *Tag) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Tag) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil @@ -137,6 +167,18 @@ func (m *Tag) validateDescription(formats strfmt.Registry) error { return nil } +func (m *Tag) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Tag) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -191,6 +233,10 @@ func (m *Tag) validateURL(formats strfmt.Registry) error { func (m *Tag) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -199,6 +245,10 @@ func (m *Tag) ContextValidate(ctx context.Context, formats strfmt.Registry) erro res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTaggedItems(ctx, formats); err != nil { res = append(res, err) } @@ -213,6 +263,15 @@ func (m *Tag) ContextValidate(ctx context.Context, formats strfmt.Registry) erro return nil } +func (m *Tag) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *Tag) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -231,6 +290,15 @@ func (m *Tag) contextValidateID(ctx context.Context, formats strfmt.Registry) er return nil } +func (m *Tag) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *Tag) contextValidateTaggedItems(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "tagged_items", "body", int64(m.TaggedItems)); err != nil { diff --git a/netbox/models/tenant.go b/netbox/models/tenant.go index 309e5141b..1e72fc7d0 100644 --- a/netbox/models/tenant.go +++ b/netbox/models/tenant.go @@ -48,8 +48,8 @@ type Tenant struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -69,7 +69,7 @@ type Tenant struct { // group Group *NestedTenantGroup `json:"group,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -175,7 +175,7 @@ func (m *Tenant) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -203,6 +203,8 @@ func (m *Tenant) validateGroup(formats strfmt.Registry) error { if err := m.Group.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -275,6 +277,8 @@ func (m *Tenant) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -395,7 +399,7 @@ func (m *Tenant) contextValidateClusterCount(ctx context.Context, formats strfmt func (m *Tenant) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -426,6 +430,8 @@ func (m *Tenant) contextValidateGroup(ctx context.Context, formats strfmt.Regist if err := m.Group.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -496,6 +502,8 @@ func (m *Tenant) contextValidateTags(ctx context.Context, formats strfmt.Registr if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/tenant_group.go b/netbox/models/tenant_group.go index 801975dc5..67d7e7a21 100644 --- a/netbox/models/tenant_group.go +++ b/netbox/models/tenant_group.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type TenantGroup struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type TenantGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -79,6 +80,9 @@ type TenantGroup struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Tenant count // Read Only: true TenantCount int64 `json:"tenant_count,omitempty"` @@ -117,6 +121,10 @@ func (m *TenantGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -132,7 +140,7 @@ func (m *TenantGroup) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -189,6 +197,8 @@ func (m *TenantGroup) validateParent(formats strfmt.Registry) error { if err := m.Parent.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -218,6 +228,32 @@ func (m *TenantGroup) validateSlug(formats strfmt.Registry) error { return nil } +func (m *TenantGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *TenantGroup) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -258,6 +294,10 @@ func (m *TenantGroup) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTenantCount(ctx, formats); err != nil { res = append(res, err) } @@ -283,7 +323,7 @@ func (m *TenantGroup) contextValidateDepth(ctx context.Context, formats strfmt.R func (m *TenantGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -323,6 +363,8 @@ func (m *TenantGroup) contextValidateParent(ctx context.Context, formats strfmt. if err := m.Parent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -331,6 +373,26 @@ func (m *TenantGroup) contextValidateParent(ctx context.Context, formats strfmt. return nil } +func (m *TenantGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *TenantGroup) contextValidateTenantCount(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "tenant_count", "body", int64(m.TenantCount)); err != nil { diff --git a/netbox/models/token.go b/netbox/models/token.go index 9a672c48e..f8fcfeb05 100644 --- a/netbox/models/token.go +++ b/netbox/models/token.go @@ -51,7 +51,7 @@ type Token struct { // Format: date-time Expires *strfmt.DateTime `json:"expires,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -183,6 +183,8 @@ func (m *Token) validateUser(formats strfmt.Registry) error { if err := m.User.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } @@ -263,6 +265,8 @@ func (m *Token) contextValidateUser(ctx context.Context, formats strfmt.Registry if err := m.User.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("user") } return err } diff --git a/netbox/models/user.go b/netbox/models/user.go index e9aed0e22..0724f1b17 100644 --- a/netbox/models/user.go +++ b/netbox/models/user.go @@ -195,6 +195,8 @@ func (m *User) validateGroups(formats strfmt.Registry) error { if err := m.Groups[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("groups" + "." + strconv.Itoa(i)) } return err } @@ -310,6 +312,8 @@ func (m *User) contextValidateGroups(ctx context.Context, formats strfmt.Registr if err := m.Groups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("groups" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/v_l_a_n.go b/netbox/models/v_l_a_n.go index 84260e5dd..e35128be1 100644 --- a/netbox/models/v_l_a_n.go +++ b/netbox/models/v_l_a_n.go @@ -38,8 +38,8 @@ type VLAN struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -55,7 +55,7 @@ type VLAN struct { // group Group *NestedVLANGroup `json:"group,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -164,7 +164,7 @@ func (m *VLAN) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -192,6 +192,8 @@ func (m *VLAN) validateGroup(formats strfmt.Registry) error { if err := m.Group.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -238,6 +240,8 @@ func (m *VLAN) validateRole(formats strfmt.Registry) error { if err := m.Role.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -255,6 +259,8 @@ func (m *VLAN) validateSite(formats strfmt.Registry) error { if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -272,6 +278,8 @@ func (m *VLAN) validateStatus(formats strfmt.Registry) error { if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -294,6 +302,8 @@ func (m *VLAN) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -313,6 +323,8 @@ func (m *VLAN) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -410,7 +422,7 @@ func (m *VLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *VLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -432,6 +444,8 @@ func (m *VLAN) contextValidateGroup(ctx context.Context, formats strfmt.Registry if err := m.Group.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") } return err } @@ -473,6 +487,8 @@ func (m *VLAN) contextValidateRole(ctx context.Context, formats strfmt.Registry) if err := m.Role.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -487,6 +503,8 @@ func (m *VLAN) contextValidateSite(ctx context.Context, formats strfmt.Registry) if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -501,6 +519,8 @@ func (m *VLAN) contextValidateStatus(ctx context.Context, formats strfmt.Registr if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -517,6 +537,8 @@ func (m *VLAN) contextValidateTags(ctx context.Context, formats strfmt.Registry) if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -533,6 +555,8 @@ func (m *VLAN) contextValidateTenant(ctx context.Context, formats strfmt.Registr if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/v_l_a_n_group.go b/netbox/models/v_l_a_n_group.go index f6912677d..b794dc3df 100644 --- a/netbox/models/v_l_a_n_group.go +++ b/netbox/models/v_l_a_n_group.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -36,8 +37,8 @@ type VLANGroup struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -50,7 +51,7 @@ type VLANGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -59,6 +60,20 @@ type VLANGroup struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Maximum VLAN ID + // + // Highest permissible ID of a child VLAN + // Maximum: 4094 + // Minimum: 1 + MaxVid int64 `json:"max_vid,omitempty"` + + // Minimum VLAN ID + // + // Lowest permissible ID of a child VLAN + // Maximum: 4094 + // Minimum: 1 + MinVid int64 `json:"min_vid,omitempty"` + // Name // Required: true // Max Length: 100 @@ -70,8 +85,6 @@ type VLANGroup struct { Scope string `json:"scope,omitempty"` // Scope id - // Maximum: 9.223372036854776e+18 - // Minimum: 0 ScopeID *int64 `json:"scope_id,omitempty"` // Scope type @@ -84,6 +97,9 @@ type VLANGroup struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -110,11 +126,15 @@ func (m *VLANGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateName(formats); err != nil { + if err := m.validateMaxVid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMinVid(formats); err != nil { res = append(res, err) } - if err := m.validateScopeID(formats); err != nil { + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -122,6 +142,10 @@ func (m *VLANGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -137,7 +161,7 @@ func (m *VLANGroup) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -168,33 +192,49 @@ func (m *VLANGroup) validateLastUpdated(formats strfmt.Registry) error { return nil } -func (m *VLANGroup) validateName(formats strfmt.Registry) error { +func (m *VLANGroup) validateMaxVid(formats strfmt.Registry) error { + if swag.IsZero(m.MaxVid) { // not required + return nil + } - if err := validate.Required("name", "body", m.Name); err != nil { + if err := validate.MinimumInt("max_vid", "body", m.MaxVid, 1, false); err != nil { return err } - if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + if err := validate.MaximumInt("max_vid", "body", m.MaxVid, 4094, false); err != nil { return err } - if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return nil +} + +func (m *VLANGroup) validateMinVid(formats strfmt.Registry) error { + if swag.IsZero(m.MinVid) { // not required + return nil + } + + if err := validate.MinimumInt("min_vid", "body", m.MinVid, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("min_vid", "body", m.MinVid, 4094, false); err != nil { return err } return nil } -func (m *VLANGroup) validateScopeID(formats strfmt.Registry) error { - if swag.IsZero(m.ScopeID) { // not required - return nil +func (m *VLANGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err } - if err := validate.MinimumInt("scope_id", "body", *m.ScopeID, 0, false); err != nil { + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { return err } - if err := validate.MaximumInt("scope_id", "body", *m.ScopeID, 9223372036854775807, false); err != nil { + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { return err } @@ -222,6 +262,32 @@ func (m *VLANGroup) validateSlug(formats strfmt.Registry) error { return nil } +func (m *VLANGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *VLANGroup) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -258,6 +324,10 @@ func (m *VLANGroup) ContextValidate(ctx context.Context, formats strfmt.Registry res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -274,7 +344,7 @@ func (m *VLANGroup) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *VLANGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -317,6 +387,26 @@ func (m *VLANGroup) contextValidateScope(ctx context.Context, formats strfmt.Reg return nil } +func (m *VLANGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *VLANGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/v_r_f.go b/netbox/models/v_r_f.go index 3818b0e10..8b5b0fd19 100644 --- a/netbox/models/v_r_f.go +++ b/netbox/models/v_r_f.go @@ -37,8 +37,8 @@ type VRF struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +60,7 @@ type VRF struct { // Unique: true ExportTargets []*NestedRouteTarget `json:"export_targets"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -160,7 +160,7 @@ func (m *VRF) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -197,6 +197,8 @@ func (m *VRF) validateExportTargets(formats strfmt.Registry) error { if err := m.ExportTargets[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("export_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("export_targets" + "." + strconv.Itoa(i)) } return err } @@ -225,6 +227,8 @@ func (m *VRF) validateImportTargets(formats strfmt.Registry) error { if err := m.ImportTargets[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("import_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("import_targets" + "." + strconv.Itoa(i)) } return err } @@ -290,6 +294,8 @@ func (m *VRF) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -309,6 +315,8 @@ func (m *VRF) validateTenant(formats strfmt.Registry) error { if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -385,7 +393,7 @@ func (m *VRF) ContextValidate(ctx context.Context, formats strfmt.Registry) erro func (m *VRF) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -409,6 +417,8 @@ func (m *VRF) contextValidateExportTargets(ctx context.Context, formats strfmt.R if err := m.ExportTargets[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("export_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("export_targets" + "." + strconv.Itoa(i)) } return err } @@ -436,6 +446,8 @@ func (m *VRF) contextValidateImportTargets(ctx context.Context, formats strfmt.R if err := m.ImportTargets[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("import_targets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("import_targets" + "." + strconv.Itoa(i)) } return err } @@ -481,6 +493,8 @@ func (m *VRF) contextValidateTags(ctx context.Context, formats strfmt.Registry) if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -497,6 +511,8 @@ func (m *VRF) contextValidateTenant(ctx context.Context, formats strfmt.Registry if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/virtual_chassis.go b/netbox/models/virtual_chassis.go index 72b21f8f7..3410511ad 100644 --- a/netbox/models/virtual_chassis.go +++ b/netbox/models/virtual_chassis.go @@ -35,6 +35,11 @@ import ( // swagger:model VirtualChassis type VirtualChassis struct { + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -46,10 +51,15 @@ type VirtualChassis struct { // Max Length: 30 Domain string `json:"domain,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // master Master *NestedDevice `json:"master,omitempty"` @@ -76,10 +86,18 @@ type VirtualChassis struct { func (m *VirtualChassis) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDomain(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateMaster(formats); err != nil { res = append(res, err) } @@ -102,6 +120,18 @@ func (m *VirtualChassis) Validate(formats strfmt.Registry) error { return nil } +func (m *VirtualChassis) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *VirtualChassis) validateDomain(formats strfmt.Registry) error { if swag.IsZero(m.Domain) { // not required return nil @@ -114,6 +144,18 @@ func (m *VirtualChassis) validateDomain(formats strfmt.Registry) error { return nil } +func (m *VirtualChassis) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *VirtualChassis) validateMaster(formats strfmt.Registry) error { if swag.IsZero(m.Master) { // not required return nil @@ -123,6 +165,8 @@ func (m *VirtualChassis) validateMaster(formats strfmt.Registry) error { if err := m.Master.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("master") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("master") } return err } @@ -162,6 +206,8 @@ func (m *VirtualChassis) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -188,6 +234,10 @@ func (m *VirtualChassis) validateURL(formats strfmt.Registry) error { func (m *VirtualChassis) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -196,6 +246,10 @@ func (m *VirtualChassis) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMaster(ctx, formats); err != nil { res = append(res, err) } @@ -218,6 +272,15 @@ func (m *VirtualChassis) ContextValidate(ctx context.Context, formats strfmt.Reg return nil } +func (m *VirtualChassis) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *VirtualChassis) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -236,12 +299,23 @@ func (m *VirtualChassis) contextValidateID(ctx context.Context, formats strfmt.R return nil } +func (m *VirtualChassis) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *VirtualChassis) contextValidateMaster(ctx context.Context, formats strfmt.Registry) error { if m.Master != nil { if err := m.Master.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("master") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("master") } return err } @@ -267,6 +341,8 @@ func (m *VirtualChassis) contextValidateTags(ctx context.Context, formats strfmt if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/virtual_machine_with_config_context.go b/netbox/models/virtual_machine_with_config_context.go index c8320d347..fc84e027f 100644 --- a/netbox/models/virtual_machine_with_config_context.go +++ b/netbox/models/virtual_machine_with_config_context.go @@ -45,12 +45,12 @@ type VirtualMachineWithConfigContext struct { // Config context // Read Only: true - ConfigContext interface{} `json:"config_context,omitempty"` + ConfigContext map[string]*string `json:"config_context,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +64,7 @@ type VirtualMachineWithConfigContext struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -212,6 +212,8 @@ func (m *VirtualMachineWithConfigContext) validateCluster(formats strfmt.Registr if err := m.Cluster.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster") } return err } @@ -225,7 +227,7 @@ func (m *VirtualMachineWithConfigContext) validateCreated(formats strfmt.Registr return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -302,6 +304,8 @@ func (m *VirtualMachineWithConfigContext) validatePlatform(formats strfmt.Regist if err := m.Platform.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platform") } return err } @@ -319,6 +323,8 @@ func (m *VirtualMachineWithConfigContext) validatePrimaryIP(formats strfmt.Regis if err := m.PrimaryIP.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip") } return err } @@ -336,6 +342,8 @@ func (m *VirtualMachineWithConfigContext) validatePrimaryIp4(formats strfmt.Regi if err := m.PrimaryIp4.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip4") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip4") } return err } @@ -353,6 +361,8 @@ func (m *VirtualMachineWithConfigContext) validatePrimaryIp6(formats strfmt.Regi if err := m.PrimaryIp6.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip6") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip6") } return err } @@ -370,6 +380,8 @@ func (m *VirtualMachineWithConfigContext) validateRole(formats strfmt.Registry) if err := m.Role.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -387,6 +399,8 @@ func (m *VirtualMachineWithConfigContext) validateSite(formats strfmt.Registry) if err := m.Site.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -404,6 +418,8 @@ func (m *VirtualMachineWithConfigContext) validateStatus(formats strfmt.Registry if err := m.Status.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -426,6 +442,8 @@ func (m *VirtualMachineWithConfigContext) validateTags(formats strfmt.Registry) if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -445,6 +463,8 @@ func (m *VirtualMachineWithConfigContext) validateTenant(formats strfmt.Registry if err := m.Tenant.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } @@ -485,6 +505,10 @@ func (m *VirtualMachineWithConfigContext) ContextValidate(ctx context.Context, f res = append(res, err) } + if err := m.contextValidateConfigContext(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -553,6 +577,8 @@ func (m *VirtualMachineWithConfigContext) contextValidateCluster(ctx context.Con if err := m.Cluster.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cluster") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cluster") } return err } @@ -561,9 +587,14 @@ func (m *VirtualMachineWithConfigContext) contextValidateCluster(ctx context.Con return nil } +func (m *VirtualMachineWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *VirtualMachineWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -603,6 +634,8 @@ func (m *VirtualMachineWithConfigContext) contextValidatePlatform(ctx context.Co if err := m.Platform.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("platform") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("platform") } return err } @@ -617,6 +650,8 @@ func (m *VirtualMachineWithConfigContext) contextValidatePrimaryIP(ctx context.C if err := m.PrimaryIP.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip") } return err } @@ -631,6 +666,8 @@ func (m *VirtualMachineWithConfigContext) contextValidatePrimaryIp4(ctx context. if err := m.PrimaryIp4.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip4") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip4") } return err } @@ -645,6 +682,8 @@ func (m *VirtualMachineWithConfigContext) contextValidatePrimaryIp6(ctx context. if err := m.PrimaryIp6.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("primary_ip6") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("primary_ip6") } return err } @@ -659,6 +698,8 @@ func (m *VirtualMachineWithConfigContext) contextValidateRole(ctx context.Contex if err := m.Role.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("role") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("role") } return err } @@ -673,6 +714,8 @@ func (m *VirtualMachineWithConfigContext) contextValidateSite(ctx context.Contex if err := m.Site.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("site") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("site") } return err } @@ -687,6 +730,8 @@ func (m *VirtualMachineWithConfigContext) contextValidateStatus(ctx context.Cont if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") } return err } @@ -703,6 +748,8 @@ func (m *VirtualMachineWithConfigContext) contextValidateTags(ctx context.Contex if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -719,6 +766,8 @@ func (m *VirtualMachineWithConfigContext) contextValidateTenant(ctx context.Cont if err := m.Tenant.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tenant") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tenant") } return err } diff --git a/netbox/models/vm_interface.go b/netbox/models/vm_interface.go index db9903a51..90bc18eb8 100644 --- a/netbox/models/vm_interface.go +++ b/netbox/models/vm_interface.go @@ -36,14 +36,21 @@ import ( // swagger:model VMInterface type VMInterface struct { + // bridge + Bridge *NestedVMInterface `json:"bridge,omitempty"` + + // Count fhrp groups + // Read Only: true + CountFhrpGroups int64 `json:"count_fhrp_groups,omitempty"` + // Count ipaddresses // Read Only: true CountIpaddresses int64 `json:"count_ipaddresses,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,7 +66,7 @@ type VMInterface struct { // Enabled Enabled bool `json:"enabled,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -106,12 +113,19 @@ type VMInterface struct { // virtual machine // Required: true VirtualMachine *NestedVirtualMachine `json:"virtual_machine"` + + // vrf + Vrf *NestedVRF `json:"vrf,omitempty"` } // Validate validates this VM interface func (m *VMInterface) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateBridge(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -160,18 +174,41 @@ func (m *VMInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVrf(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *VMInterface) validateBridge(formats strfmt.Registry) error { + if swag.IsZero(m.Bridge) { // not required + return nil + } + + if m.Bridge != nil { + if err := m.Bridge.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bridge") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("bridge") + } + return err + } + } + + return nil +} + func (m *VMInterface) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -211,6 +248,8 @@ func (m *VMInterface) validateMode(formats strfmt.Registry) error { if err := m.Mode.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") } return err } @@ -261,6 +300,8 @@ func (m *VMInterface) validateParent(formats strfmt.Registry) error { if err := m.Parent.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -287,6 +328,8 @@ func (m *VMInterface) validateTaggedVlans(formats strfmt.Registry) error { if err := m.TaggedVlans[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) } return err } @@ -311,6 +354,8 @@ func (m *VMInterface) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -330,6 +375,8 @@ func (m *VMInterface) validateUntaggedVlan(formats strfmt.Registry) error { if err := m.UntaggedVlan.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("untagged_vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("untagged_vlan") } return err } @@ -360,6 +407,27 @@ func (m *VMInterface) validateVirtualMachine(formats strfmt.Registry) error { if err := m.VirtualMachine.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_machine") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_machine") + } + return err + } + } + + return nil +} + +func (m *VMInterface) validateVrf(formats strfmt.Registry) error { + if swag.IsZero(m.Vrf) { // not required + return nil + } + + if m.Vrf != nil { + if err := m.Vrf.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } @@ -372,6 +440,14 @@ func (m *VMInterface) validateVirtualMachine(formats strfmt.Registry) error { func (m *VMInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateBridge(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCountFhrpGroups(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCountIpaddresses(ctx, formats); err != nil { res = append(res, err) } @@ -420,12 +496,41 @@ func (m *VMInterface) ContextValidate(ctx context.Context, formats strfmt.Regist res = append(res, err) } + if err := m.contextValidateVrf(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +func (m *VMInterface) contextValidateBridge(ctx context.Context, formats strfmt.Registry) error { + + if m.Bridge != nil { + if err := m.Bridge.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bridge") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("bridge") + } + return err + } + } + + return nil +} + +func (m *VMInterface) contextValidateCountFhrpGroups(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "count_fhrp_groups", "body", int64(m.CountFhrpGroups)); err != nil { + return err + } + + return nil +} + func (m *VMInterface) contextValidateCountIpaddresses(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "count_ipaddresses", "body", int64(m.CountIpaddresses)); err != nil { @@ -437,7 +542,7 @@ func (m *VMInterface) contextValidateCountIpaddresses(ctx context.Context, forma func (m *VMInterface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -477,6 +582,8 @@ func (m *VMInterface) contextValidateMode(ctx context.Context, formats strfmt.Re if err := m.Mode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") } return err } @@ -491,6 +598,8 @@ func (m *VMInterface) contextValidateParent(ctx context.Context, formats strfmt. if err := m.Parent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") } return err } @@ -507,6 +616,8 @@ func (m *VMInterface) contextValidateTaggedVlans(ctx context.Context, formats st if err := m.TaggedVlans[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tagged_vlans" + "." + strconv.Itoa(i)) } return err } @@ -525,6 +636,8 @@ func (m *VMInterface) contextValidateTags(ctx context.Context, formats strfmt.Re if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -541,6 +654,8 @@ func (m *VMInterface) contextValidateUntaggedVlan(ctx context.Context, formats s if err := m.UntaggedVlan.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("untagged_vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("untagged_vlan") } return err } @@ -564,6 +679,24 @@ func (m *VMInterface) contextValidateVirtualMachine(ctx context.Context, formats if err := m.VirtualMachine.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtual_machine") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtual_machine") + } + return err + } + } + + return nil +} + +func (m *VMInterface) contextValidateVrf(ctx context.Context, formats strfmt.Registry) error { + + if m.Vrf != nil { + if err := m.Vrf.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vrf") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vrf") } return err } diff --git a/netbox/models/webhook.go b/netbox/models/webhook.go index b098cd3bc..1d2cbbb47 100644 --- a/netbox/models/webhook.go +++ b/netbox/models/webhook.go @@ -51,11 +51,21 @@ type Webhook struct { // Max Length: 4096 CaFilePath *string `json:"ca_file_path,omitempty"` + // Conditions + // + // A set of conditions which determine whether the webhook will be generated. + Conditions *string `json:"conditions,omitempty"` + // content types // Required: true // Unique: true ContentTypes []string `json:"content_types"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Display // Read Only: true Display string `json:"display,omitempty"` @@ -74,10 +84,15 @@ type Webhook struct { // Enum: [GET POST PUT PATCH DELETE] HTTPMethod string `json:"http_method,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Name // Required: true // Max Length: 150 @@ -86,7 +101,7 @@ type Webhook struct { // URL // - // A POST will be sent to this URL when the webhook is called. + // This URL will be called using the HTTP method defined when the webhook is called. Jinja2 template processing is supported with the same context as the request body. // Required: true // Max Length: 500 // Min Length: 1 @@ -136,6 +151,10 @@ func (m *Webhook) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateHTTPContentType(formats); err != nil { res = append(res, err) } @@ -144,6 +163,10 @@ func (m *Webhook) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -191,6 +214,18 @@ func (m *Webhook) validateContentTypes(formats strfmt.Registry) error { return nil } +func (m *Webhook) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Webhook) validateHTTPContentType(formats strfmt.Registry) error { if swag.IsZero(m.HTTPContentType) { // not required return nil @@ -258,6 +293,18 @@ func (m *Webhook) validateHTTPMethod(formats strfmt.Registry) error { return nil } +func (m *Webhook) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *Webhook) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -320,6 +367,10 @@ func (m *Webhook) validateURL(formats strfmt.Registry) error { func (m *Webhook) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -328,6 +379,10 @@ func (m *Webhook) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -338,6 +393,15 @@ func (m *Webhook) ContextValidate(ctx context.Context, formats strfmt.Registry) return nil } +func (m *Webhook) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *Webhook) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -356,6 +420,15 @@ func (m *Webhook) contextValidateID(ctx context.Context, formats strfmt.Registry return nil } +func (m *Webhook) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *Webhook) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/wireless_l_a_n.go b/netbox/models/wireless_l_a_n.go new file mode 100644 index 000000000..1438aad0b --- /dev/null +++ b/netbox/models/wireless_l_a_n.go @@ -0,0 +1,827 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WirelessLAN wireless l a n +// +// swagger:model WirelessLAN +type WirelessLAN struct { + + // auth cipher + AuthCipher *WirelessLANAuthCipher `json:"auth_cipher,omitempty"` + + // Pre-shared key + // Max Length: 64 + AuthPsk string `json:"auth_psk,omitempty"` + + // auth type + AuthType *WirelessLANAuthType `json:"auth_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // group + Group *NestedWirelessLANGroup `json:"group,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // SSID + // Required: true + // Max Length: 32 + // Min Length: 1 + Ssid *string `json:"ssid"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // vlan + Vlan *NestedVLAN `json:"vlan,omitempty"` +} + +// Validate validates this wireless l a n +func (m *WirelessLAN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthCipher(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthPsk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSsid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVlan(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WirelessLAN) validateAuthCipher(formats strfmt.Registry) error { + if swag.IsZero(m.AuthCipher) { // not required + return nil + } + + if m.AuthCipher != nil { + if err := m.AuthCipher.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_cipher") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_cipher") + } + return err + } + } + + return nil +} + +func (m *WirelessLAN) validateAuthPsk(formats strfmt.Registry) error { + if swag.IsZero(m.AuthPsk) { // not required + return nil + } + + if err := validate.MaxLength("auth_psk", "body", m.AuthPsk, 64); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) validateAuthType(formats strfmt.Registry) error { + if swag.IsZero(m.AuthType) { // not required + return nil + } + + if m.AuthType != nil { + if err := m.AuthType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_type") + } + return err + } + } + + return nil +} + +func (m *WirelessLAN) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) validateGroup(formats strfmt.Registry) error { + if swag.IsZero(m.Group) { // not required + return nil + } + + if m.Group != nil { + if err := m.Group.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *WirelessLAN) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) validateSsid(formats strfmt.Registry) error { + + if err := validate.Required("ssid", "body", m.Ssid); err != nil { + return err + } + + if err := validate.MinLength("ssid", "body", *m.Ssid, 1); err != nil { + return err + } + + if err := validate.MaxLength("ssid", "body", *m.Ssid, 32); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WirelessLAN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) validateVlan(formats strfmt.Registry) error { + if swag.IsZero(m.Vlan) { // not required + return nil + } + + if m.Vlan != nil { + if err := m.Vlan.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vlan") + } + return err + } + } + + return nil +} + +// ContextValidate validate this wireless l a n based on the context it is used +func (m *WirelessLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAuthCipher(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateAuthType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVlan(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WirelessLAN) contextValidateAuthCipher(ctx context.Context, formats strfmt.Registry) error { + + if m.AuthCipher != nil { + if err := m.AuthCipher.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_cipher") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_cipher") + } + return err + } + } + + return nil +} + +func (m *WirelessLAN) contextValidateAuthType(ctx context.Context, formats strfmt.Registry) error { + + if m.AuthType != nil { + if err := m.AuthType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_type") + } + return err + } + } + + return nil +} + +func (m *WirelessLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) contextValidateGroup(ctx context.Context, formats strfmt.Registry) error { + + if m.Group != nil { + if err := m.Group.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("group") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("group") + } + return err + } + } + + return nil +} + +func (m *WirelessLAN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WirelessLAN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLAN) contextValidateVlan(ctx context.Context, formats strfmt.Registry) error { + + if m.Vlan != nil { + if err := m.Vlan.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vlan") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vlan") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLAN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLAN) UnmarshalBinary(b []byte) error { + var res WirelessLAN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// WirelessLANAuthCipher Auth cipher +// +// swagger:model WirelessLANAuthCipher +type WirelessLANAuthCipher struct { + + // label + // Required: true + // Enum: [Auto TKIP AES] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [auto tkip aes] + Value *string `json:"value"` +} + +// Validate validates this wireless l a n auth cipher +func (m *WirelessLANAuthCipher) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var wirelessLANAuthCipherTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Auto","TKIP","AES"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLANAuthCipherTypeLabelPropEnum = append(wirelessLANAuthCipherTypeLabelPropEnum, v) + } +} + +const ( + + // WirelessLANAuthCipherLabelAuto captures enum value "Auto" + WirelessLANAuthCipherLabelAuto string = "Auto" + + // WirelessLANAuthCipherLabelTKIP captures enum value "TKIP" + WirelessLANAuthCipherLabelTKIP string = "TKIP" + + // WirelessLANAuthCipherLabelAES captures enum value "AES" + WirelessLANAuthCipherLabelAES string = "AES" +) + +// prop value enum +func (m *WirelessLANAuthCipher) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLANAuthCipherTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLANAuthCipher) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("auth_cipher"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("auth_cipher"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var wirelessLANAuthCipherTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["auto","tkip","aes"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLANAuthCipherTypeValuePropEnum = append(wirelessLANAuthCipherTypeValuePropEnum, v) + } +} + +const ( + + // WirelessLANAuthCipherValueAuto captures enum value "auto" + WirelessLANAuthCipherValueAuto string = "auto" + + // WirelessLANAuthCipherValueTkip captures enum value "tkip" + WirelessLANAuthCipherValueTkip string = "tkip" + + // WirelessLANAuthCipherValueAes captures enum value "aes" + WirelessLANAuthCipherValueAes string = "aes" +) + +// prop value enum +func (m *WirelessLANAuthCipher) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLANAuthCipherTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLANAuthCipher) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("auth_cipher"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("auth_cipher"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this wireless l a n auth cipher based on context it is used +func (m *WirelessLANAuthCipher) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLANAuthCipher) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLANAuthCipher) UnmarshalBinary(b []byte) error { + var res WirelessLANAuthCipher + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// WirelessLANAuthType Auth type +// +// swagger:model WirelessLANAuthType +type WirelessLANAuthType struct { + + // label + // Required: true + // Enum: [Open WEP WPA Personal (PSK) WPA Enterprise] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [open wep wpa-personal wpa-enterprise] + Value *string `json:"value"` +} + +// Validate validates this wireless l a n auth type +func (m *WirelessLANAuthType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var wirelessLANAuthTypeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Open","WEP","WPA Personal (PSK)","WPA Enterprise"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLANAuthTypeTypeLabelPropEnum = append(wirelessLANAuthTypeTypeLabelPropEnum, v) + } +} + +const ( + + // WirelessLANAuthTypeLabelOpen captures enum value "Open" + WirelessLANAuthTypeLabelOpen string = "Open" + + // WirelessLANAuthTypeLabelWEP captures enum value "WEP" + WirelessLANAuthTypeLabelWEP string = "WEP" + + // WirelessLANAuthTypeLabelWPAPersonalPSK captures enum value "WPA Personal (PSK)" + WirelessLANAuthTypeLabelWPAPersonalPSK string = "WPA Personal (PSK)" + + // WirelessLANAuthTypeLabelWPAEnterprise captures enum value "WPA Enterprise" + WirelessLANAuthTypeLabelWPAEnterprise string = "WPA Enterprise" +) + +// prop value enum +func (m *WirelessLANAuthType) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLANAuthTypeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLANAuthType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("auth_type"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("auth_type"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var wirelessLANAuthTypeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["open","wep","wpa-personal","wpa-enterprise"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLANAuthTypeTypeValuePropEnum = append(wirelessLANAuthTypeTypeValuePropEnum, v) + } +} + +const ( + + // WirelessLANAuthTypeValueOpen captures enum value "open" + WirelessLANAuthTypeValueOpen string = "open" + + // WirelessLANAuthTypeValueWep captures enum value "wep" + WirelessLANAuthTypeValueWep string = "wep" + + // WirelessLANAuthTypeValueWpaDashPersonal captures enum value "wpa-personal" + WirelessLANAuthTypeValueWpaDashPersonal string = "wpa-personal" + + // WirelessLANAuthTypeValueWpaDashEnterprise captures enum value "wpa-enterprise" + WirelessLANAuthTypeValueWpaDashEnterprise string = "wpa-enterprise" +) + +// prop value enum +func (m *WirelessLANAuthType) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLANAuthTypeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLANAuthType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("auth_type"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("auth_type"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this wireless l a n auth type based on context it is used +func (m *WirelessLANAuthType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLANAuthType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLANAuthType) UnmarshalBinary(b []byte) error { + var res WirelessLANAuthType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/wireless_l_a_n_group.go b/netbox/models/wireless_l_a_n_group.go new file mode 100644 index 000000000..cc7c13051 --- /dev/null +++ b/netbox/models/wireless_l_a_n_group.go @@ -0,0 +1,430 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WirelessLANGroup wireless l a n group +// +// swagger:model WirelessLANGroup +type WirelessLANGroup struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // parent + Parent *NestedWirelessLANGroup `json:"parent,omitempty"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // Wirelesslan count + // Read Only: true + WirelesslanCount int64 `json:"wirelesslan_count,omitempty"` +} + +// Validate validates this wireless l a n group +func (m *WirelessLANGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WirelessLANGroup) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) validateParent(formats strfmt.Registry) error { + if swag.IsZero(m.Parent) { // not required + return nil + } + + if m.Parent != nil { + if err := m.Parent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") + } + return err + } + } + + return nil +} + +func (m *WirelessLANGroup) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WirelessLANGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this wireless l a n group based on the context it is used +func (m *WirelessLANGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWirelesslanCount(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WirelessLANGroup) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateParent(ctx context.Context, formats strfmt.Registry) error { + + if m.Parent != nil { + if err := m.Parent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent") + } + return err + } + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLANGroup) contextValidateWirelesslanCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "wirelesslan_count", "body", int64(m.WirelesslanCount)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLANGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLANGroup) UnmarshalBinary(b []byte) error { + var res WirelessLANGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/wireless_link.go b/netbox/models/wireless_link.go new file mode 100644 index 000000000..f2891c841 --- /dev/null +++ b/netbox/models/wireless_link.go @@ -0,0 +1,1019 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WirelessLink wireless link +// +// swagger:model WirelessLink +type WirelessLink struct { + + // auth cipher + AuthCipher *WirelessLinkAuthCipher `json:"auth_cipher,omitempty"` + + // Pre-shared key + // Max Length: 64 + AuthPsk string `json:"auth_psk,omitempty"` + + // auth type + AuthType *WirelessLinkAuthType `json:"auth_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // interface a + // Required: true + Interfacea *NestedInterface `json:"interface_a"` + + // interface b + // Required: true + Interfaceb *NestedInterface `json:"interface_b"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // SSID + // Max Length: 32 + Ssid string `json:"ssid,omitempty"` + + // status + Status *WirelessLinkStatus `json:"status,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this wireless link +func (m *WirelessLink) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthCipher(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthPsk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfacea(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaceb(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSsid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WirelessLink) validateAuthCipher(formats strfmt.Registry) error { + if swag.IsZero(m.AuthCipher) { // not required + return nil + } + + if m.AuthCipher != nil { + if err := m.AuthCipher.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_cipher") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_cipher") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) validateAuthPsk(formats strfmt.Registry) error { + if swag.IsZero(m.AuthPsk) { // not required + return nil + } + + if err := validate.MaxLength("auth_psk", "body", m.AuthPsk, 64); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) validateAuthType(formats strfmt.Registry) error { + if swag.IsZero(m.AuthType) { // not required + return nil + } + + if m.AuthType != nil { + if err := m.AuthType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_type") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) validateInterfacea(formats strfmt.Registry) error { + + if err := validate.Required("interface_a", "body", m.Interfacea); err != nil { + return err + } + + if m.Interfacea != nil { + if err := m.Interfacea.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("interface_a") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("interface_a") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) validateInterfaceb(formats strfmt.Registry) error { + + if err := validate.Required("interface_b", "body", m.Interfaceb); err != nil { + return err + } + + if m.Interfaceb != nil { + if err := m.Interfaceb.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("interface_b") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("interface_b") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) validateSsid(formats strfmt.Registry) error { + if swag.IsZero(m.Ssid) { // not required + return nil + } + + if err := validate.MaxLength("ssid", "body", m.Ssid, 32); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WirelessLink) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this wireless link based on the context it is used +func (m *WirelessLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAuthCipher(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateAuthType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInterfacea(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInterfaceb(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WirelessLink) contextValidateAuthCipher(ctx context.Context, formats strfmt.Registry) error { + + if m.AuthCipher != nil { + if err := m.AuthCipher.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_cipher") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_cipher") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) contextValidateAuthType(ctx context.Context, formats strfmt.Registry) error { + + if m.AuthType != nil { + if err := m.AuthType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth_type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("auth_type") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) contextValidateInterfacea(ctx context.Context, formats strfmt.Registry) error { + + if m.Interfacea != nil { + if err := m.Interfacea.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("interface_a") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("interface_a") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) contextValidateInterfaceb(ctx context.Context, formats strfmt.Registry) error { + + if m.Interfaceb != nil { + if err := m.Interfaceb.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("interface_b") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("interface_b") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WirelessLink) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *WirelessLink) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WirelessLink) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLink) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLink) UnmarshalBinary(b []byte) error { + var res WirelessLink + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// WirelessLinkAuthCipher Auth cipher +// +// swagger:model WirelessLinkAuthCipher +type WirelessLinkAuthCipher struct { + + // label + // Required: true + // Enum: [Auto TKIP AES] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [auto tkip aes] + Value *string `json:"value"` +} + +// Validate validates this wireless link auth cipher +func (m *WirelessLinkAuthCipher) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var wirelessLinkAuthCipherTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Auto","TKIP","AES"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLinkAuthCipherTypeLabelPropEnum = append(wirelessLinkAuthCipherTypeLabelPropEnum, v) + } +} + +const ( + + // WirelessLinkAuthCipherLabelAuto captures enum value "Auto" + WirelessLinkAuthCipherLabelAuto string = "Auto" + + // WirelessLinkAuthCipherLabelTKIP captures enum value "TKIP" + WirelessLinkAuthCipherLabelTKIP string = "TKIP" + + // WirelessLinkAuthCipherLabelAES captures enum value "AES" + WirelessLinkAuthCipherLabelAES string = "AES" +) + +// prop value enum +func (m *WirelessLinkAuthCipher) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLinkAuthCipherTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLinkAuthCipher) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("auth_cipher"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("auth_cipher"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var wirelessLinkAuthCipherTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["auto","tkip","aes"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLinkAuthCipherTypeValuePropEnum = append(wirelessLinkAuthCipherTypeValuePropEnum, v) + } +} + +const ( + + // WirelessLinkAuthCipherValueAuto captures enum value "auto" + WirelessLinkAuthCipherValueAuto string = "auto" + + // WirelessLinkAuthCipherValueTkip captures enum value "tkip" + WirelessLinkAuthCipherValueTkip string = "tkip" + + // WirelessLinkAuthCipherValueAes captures enum value "aes" + WirelessLinkAuthCipherValueAes string = "aes" +) + +// prop value enum +func (m *WirelessLinkAuthCipher) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLinkAuthCipherTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLinkAuthCipher) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("auth_cipher"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("auth_cipher"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this wireless link auth cipher based on context it is used +func (m *WirelessLinkAuthCipher) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLinkAuthCipher) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLinkAuthCipher) UnmarshalBinary(b []byte) error { + var res WirelessLinkAuthCipher + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// WirelessLinkAuthType Auth type +// +// swagger:model WirelessLinkAuthType +type WirelessLinkAuthType struct { + + // label + // Required: true + // Enum: [Open WEP WPA Personal (PSK) WPA Enterprise] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [open wep wpa-personal wpa-enterprise] + Value *string `json:"value"` +} + +// Validate validates this wireless link auth type +func (m *WirelessLinkAuthType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var wirelessLinkAuthTypeTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Open","WEP","WPA Personal (PSK)","WPA Enterprise"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLinkAuthTypeTypeLabelPropEnum = append(wirelessLinkAuthTypeTypeLabelPropEnum, v) + } +} + +const ( + + // WirelessLinkAuthTypeLabelOpen captures enum value "Open" + WirelessLinkAuthTypeLabelOpen string = "Open" + + // WirelessLinkAuthTypeLabelWEP captures enum value "WEP" + WirelessLinkAuthTypeLabelWEP string = "WEP" + + // WirelessLinkAuthTypeLabelWPAPersonalPSK captures enum value "WPA Personal (PSK)" + WirelessLinkAuthTypeLabelWPAPersonalPSK string = "WPA Personal (PSK)" + + // WirelessLinkAuthTypeLabelWPAEnterprise captures enum value "WPA Enterprise" + WirelessLinkAuthTypeLabelWPAEnterprise string = "WPA Enterprise" +) + +// prop value enum +func (m *WirelessLinkAuthType) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLinkAuthTypeTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLinkAuthType) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("auth_type"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("auth_type"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var wirelessLinkAuthTypeTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["open","wep","wpa-personal","wpa-enterprise"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLinkAuthTypeTypeValuePropEnum = append(wirelessLinkAuthTypeTypeValuePropEnum, v) + } +} + +const ( + + // WirelessLinkAuthTypeValueOpen captures enum value "open" + WirelessLinkAuthTypeValueOpen string = "open" + + // WirelessLinkAuthTypeValueWep captures enum value "wep" + WirelessLinkAuthTypeValueWep string = "wep" + + // WirelessLinkAuthTypeValueWpaDashPersonal captures enum value "wpa-personal" + WirelessLinkAuthTypeValueWpaDashPersonal string = "wpa-personal" + + // WirelessLinkAuthTypeValueWpaDashEnterprise captures enum value "wpa-enterprise" + WirelessLinkAuthTypeValueWpaDashEnterprise string = "wpa-enterprise" +) + +// prop value enum +func (m *WirelessLinkAuthType) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLinkAuthTypeTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLinkAuthType) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("auth_type"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("auth_type"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this wireless link auth type based on context it is used +func (m *WirelessLinkAuthType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLinkAuthType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLinkAuthType) UnmarshalBinary(b []byte) error { + var res WirelessLinkAuthType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// WirelessLinkStatus Status +// +// swagger:model WirelessLinkStatus +type WirelessLinkStatus struct { + + // label + // Required: true + // Enum: [Connected Planned Decommissioning] + Label *string `json:"label"` + + // value + // Required: true + // Enum: [connected planned decommissioning] + Value *string `json:"value"` +} + +// Validate validates this wireless link status +func (m *WirelessLinkStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var wirelessLinkStatusTypeLabelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Connected","Planned","Decommissioning"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLinkStatusTypeLabelPropEnum = append(wirelessLinkStatusTypeLabelPropEnum, v) + } +} + +const ( + + // WirelessLinkStatusLabelConnected captures enum value "Connected" + WirelessLinkStatusLabelConnected string = "Connected" + + // WirelessLinkStatusLabelPlanned captures enum value "Planned" + WirelessLinkStatusLabelPlanned string = "Planned" + + // WirelessLinkStatusLabelDecommissioning captures enum value "Decommissioning" + WirelessLinkStatusLabelDecommissioning string = "Decommissioning" +) + +// prop value enum +func (m *WirelessLinkStatus) validateLabelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLinkStatusTypeLabelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLinkStatus) validateLabel(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"label", "body", m.Label); err != nil { + return err + } + + // value enum + if err := m.validateLabelEnum("status"+"."+"label", "body", *m.Label); err != nil { + return err + } + + return nil +} + +var wirelessLinkStatusTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["connected","planned","decommissioning"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + wirelessLinkStatusTypeValuePropEnum = append(wirelessLinkStatusTypeValuePropEnum, v) + } +} + +const ( + + // WirelessLinkStatusValueConnected captures enum value "connected" + WirelessLinkStatusValueConnected string = "connected" + + // WirelessLinkStatusValuePlanned captures enum value "planned" + WirelessLinkStatusValuePlanned string = "planned" + + // WirelessLinkStatusValueDecommissioning captures enum value "decommissioning" + WirelessLinkStatusValueDecommissioning string = "decommissioning" +) + +// prop value enum +func (m *WirelessLinkStatus) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, wirelessLinkStatusTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WirelessLinkStatus) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("status"+"."+"value", "body", m.Value); err != nil { + return err + } + + // value enum + if err := m.validateValueEnum("status"+"."+"value", "body", *m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this wireless link status based on context it is used +func (m *WirelessLinkStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WirelessLinkStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WirelessLinkStatus) UnmarshalBinary(b []byte) error { + var res WirelessLinkStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_a_s_n.go b/netbox/models/writable_a_s_n.go new file mode 100644 index 000000000..de1757bbd --- /dev/null +++ b/netbox/models/writable_a_s_n.go @@ -0,0 +1,374 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableASN writable a s n +// +// swagger:model WritableASN +type WritableASN struct { + + // ASN + // + // 32-bit autonomous system number + // Required: true + // Maximum: 4.294967295e+09 + // Minimum: 1 + Asn *int64 `json:"asn"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Provider count + // Read Only: true + ProviderCount int64 `json:"provider_count,omitempty"` + + // RIR + // Required: true + Rir *int64 `json:"rir"` + + // Site count + // Read Only: true + SiteCount int64 `json:"site_count,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable a s n +func (m *WritableASN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAsn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRir(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableASN) validateAsn(formats strfmt.Registry) error { + + if err := validate.Required("asn", "body", m.Asn); err != nil { + return err + } + + if err := validate.MinimumInt("asn", "body", *m.Asn, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("asn", "body", *m.Asn, 4.294967295e+09, false); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) validateRir(formats strfmt.Registry) error { + + if err := validate.Required("rir", "body", m.Rir); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableASN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable a s n based on the context it is used +func (m *WritableASN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProviderCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSiteCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableASN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) contextValidateProviderCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "provider_count", "body", int64(m.ProviderCount)); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) contextValidateSiteCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "site_count", "body", int64(m.SiteCount)); err != nil { + return err + } + + return nil +} + +func (m *WritableASN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableASN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableASN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableASN) UnmarshalBinary(b []byte) error { + var res WritableASN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_aggregate.go b/netbox/models/writable_aggregate.go index 6f200dd2c..8936fa164 100644 --- a/netbox/models/writable_aggregate.go +++ b/netbox/models/writable_aggregate.go @@ -37,8 +37,8 @@ type WritableAggregate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,7 +59,7 @@ type WritableAggregate struct { // Read Only: true Family string `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -135,7 +135,7 @@ func (m *WritableAggregate) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -210,6 +210,8 @@ func (m *WritableAggregate) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -272,7 +274,7 @@ func (m *WritableAggregate) ContextValidate(ctx context.Context, formats strfmt. func (m *WritableAggregate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -323,6 +325,8 @@ func (m *WritableAggregate) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_available_ip.go b/netbox/models/writable_available_ip.go new file mode 100644 index 000000000..e5e84b048 --- /dev/null +++ b/netbox/models/writable_available_ip.go @@ -0,0 +1,125 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableAvailableIP writable available IP +// +// swagger:model WritableAvailableIP +type WritableAvailableIP struct { + + // Address + // Read Only: true + // Min Length: 1 + Address string `json:"address,omitempty"` + + // Family + // Read Only: true + Family int64 `json:"family,omitempty"` +} + +// Validate validates this writable available IP +func (m *WritableAvailableIP) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableAvailableIP) validateAddress(formats strfmt.Registry) error { + if swag.IsZero(m.Address) { // not required + return nil + } + + if err := validate.MinLength("address", "body", m.Address, 1); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable available IP based on the context it is used +func (m *WritableAvailableIP) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAddress(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFamily(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableAvailableIP) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "address", "body", string(m.Address)); err != nil { + return err + } + + return nil +} + +func (m *WritableAvailableIP) contextValidateFamily(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "family", "body", int64(m.Family)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableAvailableIP) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableAvailableIP) UnmarshalBinary(b []byte) error { + var res WritableAvailableIP + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_cable.go b/netbox/models/writable_cable.go index 210c28e90..a6d5cd0c9 100644 --- a/netbox/models/writable_cable.go +++ b/netbox/models/writable_cable.go @@ -41,6 +41,11 @@ type WritableCable struct { // Pattern: ^[0-9a-f]{6}$ Color string `json:"color,omitempty"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -48,7 +53,7 @@ type WritableCable struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -56,6 +61,11 @@ type WritableCable struct { // Max Length: 100 Label string `json:"label,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Length Length *float64 `json:"length,omitempty"` @@ -70,13 +80,16 @@ type WritableCable struct { // tags Tags []*NestedTag `json:"tags"` + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + // Termination a // Read Only: true - Terminationa interface{} `json:"termination_a,omitempty"` + Terminationa map[string]*string `json:"termination_a,omitempty"` // Termination a id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 TerminationaID *int64 `json:"termination_a_id"` @@ -86,11 +99,11 @@ type WritableCable struct { // Termination b // Read Only: true - Terminationb interface{} `json:"termination_b,omitempty"` + Terminationb map[string]*string `json:"termination_b,omitempty"` // Termination b id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 TerminationbID *int64 `json:"termination_b_id"` @@ -116,10 +129,18 @@ func (m *WritableCable) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateLengthUnit(formats); err != nil { res = append(res, err) } @@ -178,6 +199,18 @@ func (m *WritableCable) validateColor(formats strfmt.Registry) error { return nil } +func (m *WritableCable) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableCable) validateLabel(formats strfmt.Registry) error { if swag.IsZero(m.Label) { // not required return nil @@ -190,6 +223,18 @@ func (m *WritableCable) validateLabel(formats strfmt.Registry) error { return nil } +func (m *WritableCable) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + var writableCableTypeLengthUnitPropEnum []interface{} func init() { @@ -303,6 +348,8 @@ func (m *WritableCable) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -323,7 +370,7 @@ func (m *WritableCable) validateTerminationaID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("termination_a_id", "body", *m.TerminationaID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_a_id", "body", *m.TerminationaID, 9.223372036854776e+18, false); err != nil { return err } @@ -349,7 +396,7 @@ func (m *WritableCable) validateTerminationbID(formats strfmt.Registry) error { return err } - if err := validate.MaximumInt("termination_b_id", "body", *m.TerminationbID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("termination_b_id", "body", *m.TerminationbID, 9.223372036854776e+18, false); err != nil { return err } @@ -486,6 +533,10 @@ func (m *WritableCable) validateURL(formats strfmt.Registry) error { func (m *WritableCable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -494,10 +545,22 @@ func (m *WritableCable) ContextValidate(ctx context.Context, formats strfmt.Regi res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } + if err := m.contextValidateTerminationa(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTerminationb(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -508,6 +571,15 @@ func (m *WritableCable) ContextValidate(ctx context.Context, formats strfmt.Regi return nil } +func (m *WritableCable) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *WritableCable) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -526,6 +598,15 @@ func (m *WritableCable) contextValidateID(ctx context.Context, formats strfmt.Re return nil } +func (m *WritableCable) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *WritableCable) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -534,6 +615,8 @@ func (m *WritableCable) contextValidateTags(ctx context.Context, formats strfmt. if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -544,6 +627,16 @@ func (m *WritableCable) contextValidateTags(ctx context.Context, formats strfmt. return nil } +func (m *WritableCable) contextValidateTerminationa(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableCable) contextValidateTerminationb(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *WritableCable) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_circuit.go b/netbox/models/writable_circuit.go index d0d7e9aaf..84bd3d63d 100644 --- a/netbox/models/writable_circuit.go +++ b/netbox/models/writable_circuit.go @@ -52,8 +52,8 @@ type WritableCircuit struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type WritableCircuit struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -203,7 +203,7 @@ func (m *WritableCircuit) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -323,6 +323,8 @@ func (m *WritableCircuit) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -398,7 +400,7 @@ func (m *WritableCircuit) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableCircuit) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -440,6 +442,8 @@ func (m *WritableCircuit) contextValidateTags(ctx context.Context, formats strfm if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_circuit_termination.go b/netbox/models/writable_circuit_termination.go index 0a7e042bd..1a49f5293 100644 --- a/netbox/models/writable_circuit_termination.go +++ b/netbox/models/writable_circuit_termination.go @@ -42,22 +42,15 @@ type WritableCircuitTermination struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Circuit // Required: true Circuit *int64 `json:"circuit"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Description // Max Length: 200 Description string `json:"description,omitempty"` @@ -66,10 +59,27 @@ type WritableCircuitTermination struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected @@ -124,10 +134,18 @@ func (m *WritableCircuitTermination) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDescription(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validatePortSpeed(formats); err != nil { res = append(res, err) } @@ -167,6 +185,8 @@ func (m *WritableCircuitTermination) validateCable(formats strfmt.Registry) erro if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -184,6 +204,18 @@ func (m *WritableCircuitTermination) validateCircuit(formats strfmt.Registry) er return nil } +func (m *WritableCircuitTermination) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableCircuitTermination) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil @@ -196,6 +228,18 @@ func (m *WritableCircuitTermination) validateDescription(formats strfmt.Registry return nil } +func (m *WritableCircuitTermination) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableCircuitTermination) validatePortSpeed(formats strfmt.Registry) error { if swag.IsZero(m.PortSpeed) { // not required return nil @@ -319,7 +363,7 @@ func (m *WritableCircuitTermination) ContextValidate(ctx context.Context, format res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -331,6 +375,18 @@ func (m *WritableCircuitTermination) ContextValidate(ctx context.Context, format res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -356,6 +412,8 @@ func (m *WritableCircuitTermination) contextValidateCable(ctx context.Context, f if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -364,9 +422,9 @@ func (m *WritableCircuitTermination) contextValidateCable(ctx context.Context, f return nil } -func (m *WritableCircuitTermination) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { +func (m *WritableCircuitTermination) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -391,6 +449,29 @@ func (m *WritableCircuitTermination) contextValidateID(ctx context.Context, form return nil } +func (m *WritableCircuitTermination) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableCircuitTermination) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableCircuitTermination) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritableCircuitTermination) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_cluster.go b/netbox/models/writable_cluster.go index 73dd3b7d2..17057f52b 100644 --- a/netbox/models/writable_cluster.go +++ b/netbox/models/writable_cluster.go @@ -40,8 +40,8 @@ type WritableCluster struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -55,9 +55,10 @@ type WritableCluster struct { Display string `json:"display,omitempty"` // Group - Group *int64 `json:"group,omitempty"` + // Required: true + Group *int64 `json:"group"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -73,7 +74,8 @@ type WritableCluster struct { Name *string `json:"name"` // Site - Site *int64 `json:"site,omitempty"` + // Required: true + Site *int64 `json:"site"` // tags Tags []*NestedTag `json:"tags"` @@ -103,6 +105,10 @@ func (m *WritableCluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + if err := m.validateLastUpdated(formats); err != nil { res = append(res, err) } @@ -111,6 +117,10 @@ func (m *WritableCluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSite(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -134,7 +144,16 @@ func (m *WritableCluster) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableCluster) validateGroup(formats strfmt.Registry) error { + + if err := validate.Required("group", "body", m.Group); err != nil { return err } @@ -170,6 +189,15 @@ func (m *WritableCluster) validateName(formats strfmt.Registry) error { return nil } +func (m *WritableCluster) validateSite(formats strfmt.Registry) error { + + if err := validate.Required("site", "body", m.Site); err != nil { + return err + } + + return nil +} + func (m *WritableCluster) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -184,6 +212,8 @@ func (m *WritableCluster) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -259,7 +289,7 @@ func (m *WritableCluster) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableCluster) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -310,6 +340,8 @@ func (m *WritableCluster) contextValidateTags(ctx context.Context, formats strfm if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_config_context.go b/netbox/models/writable_config_context.go index 06f722238..410d31809 100644 --- a/netbox/models/writable_config_context.go +++ b/netbox/models/writable_config_context.go @@ -39,14 +39,18 @@ type WritableConfigContext struct { // Unique: true ClusterGroups []int64 `json:"cluster_groups"` + // cluster types + // Unique: true + ClusterTypes []int64 `json:"cluster_types"` + // clusters // Unique: true Clusters []int64 `json:"clusters"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Data // Required: true @@ -64,7 +68,7 @@ type WritableConfigContext struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -133,6 +137,10 @@ func (m *WritableConfigContext) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateClusterTypes(formats); err != nil { + res = append(res, err) + } + if err := m.validateClusters(formats); err != nil { res = append(res, err) } @@ -219,6 +227,18 @@ func (m *WritableConfigContext) validateClusterGroups(formats strfmt.Registry) e return nil } +func (m *WritableConfigContext) validateClusterTypes(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterTypes) { // not required + return nil + } + + if err := validate.UniqueItems("cluster_types", "body", m.ClusterTypes); err != nil { + return err + } + + return nil +} + func (m *WritableConfigContext) validateClusters(formats strfmt.Registry) error { if swag.IsZero(m.Clusters) { // not required return nil @@ -236,7 +256,7 @@ func (m *WritableConfigContext) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -469,7 +489,7 @@ func (m *WritableConfigContext) ContextValidate(ctx context.Context, formats str func (m *WritableConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_console_port.go b/netbox/models/writable_console_port.go index 444ab1681..5dbda31b4 100644 --- a/netbox/models/writable_console_port.go +++ b/netbox/models/writable_console_port.go @@ -43,25 +43,13 @@ type WritableConsolePort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -73,8 +61,8 @@ type WritableConsolePort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -91,7 +79,7 @@ type WritableConsolePort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -106,11 +94,26 @@ type WritableConsolePort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -129,7 +132,7 @@ type WritableConsolePort struct { // Type // // Physical port type - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Type string `json:"type,omitempty"` // Url @@ -201,6 +204,8 @@ func (m *WritableConsolePort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -214,7 +219,7 @@ func (m *WritableConsolePort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -330,6 +335,8 @@ func (m *WritableConsolePort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -344,7 +351,7 @@ var writableConsolePortTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -369,6 +376,9 @@ const ( // WritableConsolePortTypeRjDash45 captures enum value "rj-45" WritableConsolePortTypeRjDash45 string = "rj-45" + // WritableConsolePortTypeMiniDashDinDash8 captures enum value "mini-din-8" + WritableConsolePortTypeMiniDashDinDash8 string = "mini-din-8" + // WritableConsolePortTypeUsbDasha captures enum value "usb-a" WritableConsolePortTypeUsbDasha string = "usb-a" @@ -390,6 +400,9 @@ const ( // WritableConsolePortTypeUsbDashMicroDashb captures enum value "usb-micro-b" WritableConsolePortTypeUsbDashMicroDashb string = "usb-micro-b" + // WritableConsolePortTypeUsbDashMicroDashAb captures enum value "usb-micro-ab" + WritableConsolePortTypeUsbDashMicroDashAb string = "usb-micro-ab" + // WritableConsolePortTypeOther captures enum value "other" WritableConsolePortTypeOther string = "other" ) @@ -439,7 +452,7 @@ func (m *WritableConsolePort) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -467,6 +480,14 @@ func (m *WritableConsolePort) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -496,6 +517,8 @@ func (m *WritableConsolePort) contextValidateCable(ctx context.Context, formats if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -504,11 +527,7 @@ func (m *WritableConsolePort) contextValidateCable(ctx context.Context, formats return nil } -func (m *WritableConsolePort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *WritableConsolePort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -533,7 +552,7 @@ func (m *WritableConsolePort) contextValidateConnectedEndpointType(ctx context.C func (m *WritableConsolePort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -567,6 +586,20 @@ func (m *WritableConsolePort) contextValidateLastUpdated(ctx context.Context, fo return nil } +func (m *WritableConsolePort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableConsolePort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritableConsolePort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -575,6 +608,8 @@ func (m *WritableConsolePort) contextValidateTags(ctx context.Context, formats s if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_console_port_template.go b/netbox/models/writable_console_port_template.go index b42a91956..8d328ee4d 100644 --- a/netbox/models/writable_console_port_template.go +++ b/netbox/models/writable_console_port_template.go @@ -37,8 +37,8 @@ type WritableConsolePortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -52,7 +52,7 @@ type WritableConsolePortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -74,7 +74,7 @@ type WritableConsolePortTemplate struct { Name *string `json:"name"` // Type - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Type string `json:"type,omitempty"` // Url @@ -130,7 +130,7 @@ func (m *WritableConsolePortTemplate) validateCreated(formats strfmt.Registry) e return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -203,7 +203,7 @@ var writableConsolePortTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -228,6 +228,9 @@ const ( // WritableConsolePortTemplateTypeRjDash45 captures enum value "rj-45" WritableConsolePortTemplateTypeRjDash45 string = "rj-45" + // WritableConsolePortTemplateTypeMiniDashDinDash8 captures enum value "mini-din-8" + WritableConsolePortTemplateTypeMiniDashDinDash8 string = "mini-din-8" + // WritableConsolePortTemplateTypeUsbDasha captures enum value "usb-a" WritableConsolePortTemplateTypeUsbDasha string = "usb-a" @@ -249,6 +252,9 @@ const ( // WritableConsolePortTemplateTypeUsbDashMicroDashb captures enum value "usb-micro-b" WritableConsolePortTemplateTypeUsbDashMicroDashb string = "usb-micro-b" + // WritableConsolePortTemplateTypeUsbDashMicroDashAb captures enum value "usb-micro-ab" + WritableConsolePortTemplateTypeUsbDashMicroDashAb string = "usb-micro-ab" + // WritableConsolePortTemplateTypeOther captures enum value "other" WritableConsolePortTemplateTypeOther string = "other" ) @@ -318,7 +324,7 @@ func (m *WritableConsolePortTemplate) ContextValidate(ctx context.Context, forma func (m *WritableConsolePortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_console_server_port.go b/netbox/models/writable_console_server_port.go index 4b4f10839..f5ce808e7 100644 --- a/netbox/models/writable_console_server_port.go +++ b/netbox/models/writable_console_server_port.go @@ -43,25 +43,13 @@ type WritableConsoleServerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -73,8 +61,8 @@ type WritableConsoleServerPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -91,7 +79,7 @@ type WritableConsoleServerPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -106,11 +94,26 @@ type WritableConsoleServerPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -129,7 +132,7 @@ type WritableConsoleServerPort struct { // Type // // Physical port type - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Type string `json:"type,omitempty"` // Url @@ -201,6 +204,8 @@ func (m *WritableConsoleServerPort) validateCable(formats strfmt.Registry) error if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -214,7 +219,7 @@ func (m *WritableConsoleServerPort) validateCreated(formats strfmt.Registry) err return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -330,6 +335,8 @@ func (m *WritableConsoleServerPort) validateTags(formats strfmt.Registry) error if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -344,7 +351,7 @@ var writableConsoleServerPortTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -369,6 +376,9 @@ const ( // WritableConsoleServerPortTypeRjDash45 captures enum value "rj-45" WritableConsoleServerPortTypeRjDash45 string = "rj-45" + // WritableConsoleServerPortTypeMiniDashDinDash8 captures enum value "mini-din-8" + WritableConsoleServerPortTypeMiniDashDinDash8 string = "mini-din-8" + // WritableConsoleServerPortTypeUsbDasha captures enum value "usb-a" WritableConsoleServerPortTypeUsbDasha string = "usb-a" @@ -390,6 +400,9 @@ const ( // WritableConsoleServerPortTypeUsbDashMicroDashb captures enum value "usb-micro-b" WritableConsoleServerPortTypeUsbDashMicroDashb string = "usb-micro-b" + // WritableConsoleServerPortTypeUsbDashMicroDashAb captures enum value "usb-micro-ab" + WritableConsoleServerPortTypeUsbDashMicroDashAb string = "usb-micro-ab" + // WritableConsoleServerPortTypeOther captures enum value "other" WritableConsoleServerPortTypeOther string = "other" ) @@ -439,7 +452,7 @@ func (m *WritableConsoleServerPort) ContextValidate(ctx context.Context, formats res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -467,6 +480,14 @@ func (m *WritableConsoleServerPort) ContextValidate(ctx context.Context, formats res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -496,6 +517,8 @@ func (m *WritableConsoleServerPort) contextValidateCable(ctx context.Context, fo if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -504,11 +527,7 @@ func (m *WritableConsoleServerPort) contextValidateCable(ctx context.Context, fo return nil } -func (m *WritableConsoleServerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *WritableConsoleServerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -533,7 +552,7 @@ func (m *WritableConsoleServerPort) contextValidateConnectedEndpointType(ctx con func (m *WritableConsoleServerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -567,6 +586,20 @@ func (m *WritableConsoleServerPort) contextValidateLastUpdated(ctx context.Conte return nil } +func (m *WritableConsoleServerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableConsoleServerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritableConsoleServerPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -575,6 +608,8 @@ func (m *WritableConsoleServerPort) contextValidateTags(ctx context.Context, for if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_console_server_port_template.go b/netbox/models/writable_console_server_port_template.go index 330f447b9..1a5d35209 100644 --- a/netbox/models/writable_console_server_port_template.go +++ b/netbox/models/writable_console_server_port_template.go @@ -37,8 +37,8 @@ type WritableConsoleServerPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -52,7 +52,7 @@ type WritableConsoleServerPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -74,7 +74,7 @@ type WritableConsoleServerPortTemplate struct { Name *string `json:"name"` // Type - // Enum: [de-9 db-25 rj-11 rj-12 rj-45 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b other] + // Enum: [de-9 db-25 rj-11 rj-12 rj-45 mini-din-8 usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab other] Type string `json:"type,omitempty"` // Url @@ -130,7 +130,7 @@ func (m *WritableConsoleServerPortTemplate) validateCreated(formats strfmt.Regis return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -203,7 +203,7 @@ var writableConsoleServerPortTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["de-9","db-25","rj-11","rj-12","rj-45","mini-din-8","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -228,6 +228,9 @@ const ( // WritableConsoleServerPortTemplateTypeRjDash45 captures enum value "rj-45" WritableConsoleServerPortTemplateTypeRjDash45 string = "rj-45" + // WritableConsoleServerPortTemplateTypeMiniDashDinDash8 captures enum value "mini-din-8" + WritableConsoleServerPortTemplateTypeMiniDashDinDash8 string = "mini-din-8" + // WritableConsoleServerPortTemplateTypeUsbDasha captures enum value "usb-a" WritableConsoleServerPortTemplateTypeUsbDasha string = "usb-a" @@ -249,6 +252,9 @@ const ( // WritableConsoleServerPortTemplateTypeUsbDashMicroDashb captures enum value "usb-micro-b" WritableConsoleServerPortTemplateTypeUsbDashMicroDashb string = "usb-micro-b" + // WritableConsoleServerPortTemplateTypeUsbDashMicroDashAb captures enum value "usb-micro-ab" + WritableConsoleServerPortTemplateTypeUsbDashMicroDashAb string = "usb-micro-ab" + // WritableConsoleServerPortTemplateTypeOther captures enum value "other" WritableConsoleServerPortTemplateTypeOther string = "other" ) @@ -318,7 +324,7 @@ func (m *WritableConsoleServerPortTemplate) ContextValidate(ctx context.Context, func (m *WritableConsoleServerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_contact.go b/netbox/models/writable_contact.go new file mode 100644 index 000000000..1b9215fa5 --- /dev/null +++ b/netbox/models/writable_contact.go @@ -0,0 +1,428 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableContact writable contact +// +// swagger:model WritableContact +type WritableContact struct { + + // Address + // Max Length: 200 + Address string `json:"address,omitempty"` + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Email + // Max Length: 254 + // Format: email + Email strfmt.Email `json:"email,omitempty"` + + // Group + // Required: true + Group *int64 `json:"group"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Link + // Max Length: 200 + // Format: uri + Link strfmt.URI `json:"link,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Phone + // Max Length: 50 + Phone string `json:"phone,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Title + // Max Length: 100 + Title string `json:"title,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable contact +func (m *WritableContact) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEmail(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLink(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePhone(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableContact) validateAddress(formats strfmt.Registry) error { + if swag.IsZero(m.Address) { // not required + return nil + } + + if err := validate.MaxLength("address", "body", m.Address, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateEmail(formats strfmt.Registry) error { + if swag.IsZero(m.Email) { // not required + return nil + } + + if err := validate.MaxLength("email", "body", m.Email.String(), 254); err != nil { + return err + } + + if err := validate.FormatOf("email", "body", "email", m.Email.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateGroup(formats strfmt.Registry) error { + + if err := validate.Required("group", "body", m.Group); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateLink(formats strfmt.Registry) error { + if swag.IsZero(m.Link) { // not required + return nil + } + + if err := validate.MaxLength("link", "body", m.Link.String(), 200); err != nil { + return err + } + + if err := validate.FormatOf("link", "body", "uri", m.Link.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validatePhone(formats strfmt.Registry) error { + if swag.IsZero(m.Phone) { // not required + return nil + } + + if err := validate.MaxLength("phone", "body", m.Phone, 50); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableContact) validateTitle(formats strfmt.Registry) error { + if swag.IsZero(m.Title) { // not required + return nil + } + + if err := validate.MaxLength("title", "body", m.Title, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable contact based on the context it is used +func (m *WritableContact) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableContact) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableContact) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableContact) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableContact) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableContact) UnmarshalBinary(b []byte) error { + var res WritableContact + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_contact_assignment.go b/netbox/models/writable_contact_assignment.go new file mode 100644 index 000000000..980ddf7f8 --- /dev/null +++ b/netbox/models/writable_contact_assignment.go @@ -0,0 +1,360 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableContactAssignment writable contact assignment +// +// swagger:model WritableContactAssignment +type WritableContactAssignment struct { + + // Contact + // Required: true + Contact *int64 `json:"contact"` + + // Content type + // Required: true + ContentType *string `json:"content_type"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Object + // Read Only: true + Object map[string]*string `json:"object,omitempty"` + + // Object id + // Required: true + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + ObjectID *int64 `json:"object_id"` + + // Priority + // Required: true + // Enum: [primary secondary tertiary inactive] + Priority *string `json:"priority"` + + // Role + // Required: true + Role *int64 `json:"role"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable contact assignment +func (m *WritableContactAssignment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContact(formats); err != nil { + res = append(res, err) + } + + if err := m.validateContentType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateObjectID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePriority(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableContactAssignment) validateContact(formats strfmt.Registry) error { + + if err := validate.Required("contact", "body", m.Contact); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) validateContentType(formats strfmt.Registry) error { + + if err := validate.Required("content_type", "body", m.ContentType); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) validateObjectID(formats strfmt.Registry) error { + + if err := validate.Required("object_id", "body", m.ObjectID); err != nil { + return err + } + + if err := validate.MinimumInt("object_id", "body", *m.ObjectID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("object_id", "body", *m.ObjectID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + +var writableContactAssignmentTypePriorityPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["primary","secondary","tertiary","inactive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableContactAssignmentTypePriorityPropEnum = append(writableContactAssignmentTypePriorityPropEnum, v) + } +} + +const ( + + // WritableContactAssignmentPriorityPrimary captures enum value "primary" + WritableContactAssignmentPriorityPrimary string = "primary" + + // WritableContactAssignmentPrioritySecondary captures enum value "secondary" + WritableContactAssignmentPrioritySecondary string = "secondary" + + // WritableContactAssignmentPriorityTertiary captures enum value "tertiary" + WritableContactAssignmentPriorityTertiary string = "tertiary" + + // WritableContactAssignmentPriorityInactive captures enum value "inactive" + WritableContactAssignmentPriorityInactive string = "inactive" +) + +// prop value enum +func (m *WritableContactAssignment) validatePriorityEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableContactAssignmentTypePriorityPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableContactAssignment) validatePriority(formats strfmt.Registry) error { + + if err := validate.Required("priority", "body", m.Priority); err != nil { + return err + } + + // value enum + if err := m.validatePriorityEnum("priority", "body", *m.Priority); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) validateRole(formats strfmt.Registry) error { + + if err := validate.Required("role", "body", m.Role); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable contact assignment based on the context it is used +func (m *WritableContactAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateObject(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableContactAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactAssignment) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableContactAssignment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableContactAssignment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableContactAssignment) UnmarshalBinary(b []byte) error { + var res WritableContactAssignment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_contact_group.go b/netbox/models/writable_contact_group.go new file mode 100644 index 000000000..1d70f1554 --- /dev/null +++ b/netbox/models/writable_contact_group.go @@ -0,0 +1,401 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableContactGroup writable contact group +// +// swagger:model WritableContactGroup +type WritableContactGroup struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Contact count + // Read Only: true + ContactCount int64 `json:"contact_count,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Parent + // Required: true + Parent *int64 `json:"parent"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable contact group +func (m *WritableContactGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableContactGroup) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) validateParent(formats strfmt.Registry) error { + + if err := validate.Required("parent", "body", m.Parent); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableContactGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable contact group based on the context it is used +func (m *WritableContactGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateContactCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableContactGroup) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) contextValidateContactCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "contact_count", "body", int64(m.ContactCount)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableContactGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableContactGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableContactGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableContactGroup) UnmarshalBinary(b []byte) error { + var res WritableContactGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_create_available_v_l_a_n.go b/netbox/models/writable_create_available_v_l_a_n.go new file mode 100644 index 000000000..02c6528d3 --- /dev/null +++ b/netbox/models/writable_create_available_v_l_a_n.go @@ -0,0 +1,245 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableCreateAvailableVLAN writable create available v l a n +// +// swagger:model WritableCreateAvailableVLAN +type WritableCreateAvailableVLAN struct { + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Role + Role *int64 `json:"role,omitempty"` + + // Site + Site *int64 `json:"site,omitempty"` + + // Status + // Enum: [active reserved deprecated] + Status string `json:"status,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Tenant + Tenant *int64 `json:"tenant,omitempty"` +} + +// Validate validates this writable create available v l a n +func (m *WritableCreateAvailableVLAN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableCreateAvailableVLAN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableCreateAvailableVLAN) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +var writableCreateAvailableVLANTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","reserved","deprecated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableCreateAvailableVLANTypeStatusPropEnum = append(writableCreateAvailableVLANTypeStatusPropEnum, v) + } +} + +const ( + + // WritableCreateAvailableVLANStatusActive captures enum value "active" + WritableCreateAvailableVLANStatusActive string = "active" + + // WritableCreateAvailableVLANStatusReserved captures enum value "reserved" + WritableCreateAvailableVLANStatusReserved string = "reserved" + + // WritableCreateAvailableVLANStatusDeprecated captures enum value "deprecated" + WritableCreateAvailableVLANStatusDeprecated string = "deprecated" +) + +// prop value enum +func (m *WritableCreateAvailableVLAN) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableCreateAvailableVLANTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableCreateAvailableVLAN) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *WritableCreateAvailableVLAN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this writable create available v l a n based on the context it is used +func (m *WritableCreateAvailableVLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableCreateAvailableVLAN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableCreateAvailableVLAN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableCreateAvailableVLAN) UnmarshalBinary(b []byte) error { + var res WritableCreateAvailableVLAN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_custom_field.go b/netbox/models/writable_custom_field.go index b6b2b882c..f3c6f86d8 100644 --- a/netbox/models/writable_custom_field.go +++ b/netbox/models/writable_custom_field.go @@ -44,6 +44,15 @@ type WritableCustomField struct { // Unique: true ContentTypes []string `json:"content_types"` + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Data type + // Read Only: true + DataType string `json:"data_type,omitempty"` + // Default // // Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo"). @@ -63,7 +72,7 @@ type WritableCustomField struct { // Enum: [disabled loose exact] FilterLogic string `json:"filter_logic,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -73,21 +82,32 @@ type WritableCustomField struct { // Max Length: 50 Label string `json:"label,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Name // // Internal field name // Required: true // Max Length: 50 // Min Length: 1 + // Pattern: ^[a-z0-9_]+$ Name *string `json:"name"` + // Object type + ObjectType string `json:"object_type,omitempty"` + // Required // // If true, this field is required when creating new objects or editing an existing object. Required bool `json:"required,omitempty"` // Type - // Enum: [text integer boolean date url select multiselect] + // + // The type of data this custom field holds + // Enum: [text longtext integer boolean date url json select multiselect object multiobject] Type string `json:"type,omitempty"` // Url @@ -99,14 +119,14 @@ type WritableCustomField struct { // // Maximum allowed value (for numeric fields) // Maximum: 2.147483647e+09 - // Minimum: 0 + // Minimum: -2.147483648e+09 ValidationMaximum *int64 `json:"validation_maximum,omitempty"` // Minimum value // // Minimum allowed value (for numeric fields) // Maximum: 2.147483647e+09 - // Minimum: 0 + // Minimum: -2.147483648e+09 ValidationMinimum *int64 `json:"validation_minimum,omitempty"` // Validation regex @@ -135,6 +155,10 @@ func (m *WritableCustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDescription(formats); err != nil { res = append(res, err) } @@ -147,6 +171,10 @@ func (m *WritableCustomField) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -214,6 +242,18 @@ func (m *WritableCustomField) validateContentTypes(formats strfmt.Registry) erro return nil } +func (m *WritableCustomField) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableCustomField) validateDescription(formats strfmt.Registry) error { if swag.IsZero(m.Description) { // not required return nil @@ -283,6 +323,18 @@ func (m *WritableCustomField) validateLabel(formats strfmt.Registry) error { return nil } +func (m *WritableCustomField) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableCustomField) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -297,6 +349,10 @@ func (m *WritableCustomField) validateName(formats strfmt.Registry) error { return err } + if err := validate.Pattern("name", "body", *m.Name, `^[a-z0-9_]+$`); err != nil { + return err + } + return nil } @@ -304,7 +360,7 @@ var writableCustomFieldTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["text","integer","boolean","date","url","select","multiselect"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["text","longtext","integer","boolean","date","url","json","select","multiselect","object","multiobject"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -317,6 +373,9 @@ const ( // WritableCustomFieldTypeText captures enum value "text" WritableCustomFieldTypeText string = "text" + // WritableCustomFieldTypeLongtext captures enum value "longtext" + WritableCustomFieldTypeLongtext string = "longtext" + // WritableCustomFieldTypeInteger captures enum value "integer" WritableCustomFieldTypeInteger string = "integer" @@ -329,11 +388,20 @@ const ( // WritableCustomFieldTypeURL captures enum value "url" WritableCustomFieldTypeURL string = "url" + // WritableCustomFieldTypeJSON captures enum value "json" + WritableCustomFieldTypeJSON string = "json" + // WritableCustomFieldTypeSelect captures enum value "select" WritableCustomFieldTypeSelect string = "select" // WritableCustomFieldTypeMultiselect captures enum value "multiselect" WritableCustomFieldTypeMultiselect string = "multiselect" + + // WritableCustomFieldTypeObject captures enum value "object" + WritableCustomFieldTypeObject string = "object" + + // WritableCustomFieldTypeMultiobject captures enum value "multiobject" + WritableCustomFieldTypeMultiobject string = "multiobject" ) // prop value enum @@ -374,7 +442,7 @@ func (m *WritableCustomField) validateValidationMaximum(formats strfmt.Registry) return nil } - if err := validate.MinimumInt("validation_maximum", "body", *m.ValidationMaximum, 0, false); err != nil { + if err := validate.MinimumInt("validation_maximum", "body", *m.ValidationMaximum, -2.147483648e+09, false); err != nil { return err } @@ -390,7 +458,7 @@ func (m *WritableCustomField) validateValidationMinimum(formats strfmt.Registry) return nil } - if err := validate.MinimumInt("validation_minimum", "body", *m.ValidationMinimum, 0, false); err != nil { + if err := validate.MinimumInt("validation_minimum", "body", *m.ValidationMinimum, -2.147483648e+09, false); err != nil { return err } @@ -433,6 +501,14 @@ func (m *WritableCustomField) validateWeight(formats strfmt.Registry) error { func (m *WritableCustomField) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDataType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -441,6 +517,10 @@ func (m *WritableCustomField) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -451,6 +531,24 @@ func (m *WritableCustomField) ContextValidate(ctx context.Context, formats strfm return nil } +func (m *WritableCustomField) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableCustomField) contextValidateDataType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "data_type", "body", string(m.DataType)); err != nil { + return err + } + + return nil +} + func (m *WritableCustomField) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -469,6 +567,15 @@ func (m *WritableCustomField) contextValidateID(ctx context.Context, formats str return nil } +func (m *WritableCustomField) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *WritableCustomField) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_device_bay.go b/netbox/models/writable_device_bay.go index ac2404f94..ec7cda8f3 100644 --- a/netbox/models/writable_device_bay.go +++ b/netbox/models/writable_device_bay.go @@ -37,8 +37,8 @@ type WritableDeviceBay struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -55,7 +55,7 @@ type WritableDeviceBay struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -135,7 +135,7 @@ func (m *WritableDeviceBay) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -218,6 +218,8 @@ func (m *WritableDeviceBay) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -276,7 +278,7 @@ func (m *WritableDeviceBay) ContextValidate(ctx context.Context, formats strfmt. func (m *WritableDeviceBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -318,6 +320,8 @@ func (m *WritableDeviceBay) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_device_bay_template.go b/netbox/models/writable_device_bay_template.go index 822651433..e57c5e6d2 100644 --- a/netbox/models/writable_device_bay_template.go +++ b/netbox/models/writable_device_bay_template.go @@ -36,8 +36,8 @@ type WritableDeviceBayTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -51,7 +51,7 @@ type WritableDeviceBayTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -121,7 +121,7 @@ func (m *WritableDeviceBayTemplate) validateCreated(formats strfmt.Registry) err return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -234,7 +234,7 @@ func (m *WritableDeviceBayTemplate) ContextValidate(ctx context.Context, formats func (m *WritableDeviceBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_device_type.go b/netbox/models/writable_device_type.go index c431a3a3a..88e8ff41f 100644 --- a/netbox/models/writable_device_type.go +++ b/netbox/models/writable_device_type.go @@ -36,13 +36,17 @@ import ( // swagger:model WritableDeviceType type WritableDeviceType struct { + // Airflow + // Enum: [front-to-rear rear-to-front left-to-right right-to-left side-to-rear passive] + Airflow string `json:"airflow,omitempty"` + // Comments Comments string `json:"comments,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +64,7 @@ type WritableDeviceType struct { // Format: uri FrontImage strfmt.URI `json:"front_image,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -126,6 +130,10 @@ type WritableDeviceType struct { func (m *WritableDeviceType) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAirflow(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -180,12 +188,66 @@ func (m *WritableDeviceType) Validate(formats strfmt.Registry) error { return nil } +var writableDeviceTypeTypeAirflowPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["front-to-rear","rear-to-front","left-to-right","right-to-left","side-to-rear","passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableDeviceTypeTypeAirflowPropEnum = append(writableDeviceTypeTypeAirflowPropEnum, v) + } +} + +const ( + + // WritableDeviceTypeAirflowFrontDashToDashRear captures enum value "front-to-rear" + WritableDeviceTypeAirflowFrontDashToDashRear string = "front-to-rear" + + // WritableDeviceTypeAirflowRearDashToDashFront captures enum value "rear-to-front" + WritableDeviceTypeAirflowRearDashToDashFront string = "rear-to-front" + + // WritableDeviceTypeAirflowLeftDashToDashRight captures enum value "left-to-right" + WritableDeviceTypeAirflowLeftDashToDashRight string = "left-to-right" + + // WritableDeviceTypeAirflowRightDashToDashLeft captures enum value "right-to-left" + WritableDeviceTypeAirflowRightDashToDashLeft string = "right-to-left" + + // WritableDeviceTypeAirflowSideDashToDashRear captures enum value "side-to-rear" + WritableDeviceTypeAirflowSideDashToDashRear string = "side-to-rear" + + // WritableDeviceTypeAirflowPassive captures enum value "passive" + WritableDeviceTypeAirflowPassive string = "passive" +) + +// prop value enum +func (m *WritableDeviceType) validateAirflowEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableDeviceTypeTypeAirflowPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableDeviceType) validateAirflow(formats strfmt.Registry) error { + if swag.IsZero(m.Airflow) { // not required + return nil + } + + // value enum + if err := m.validateAirflowEnum("airflow", "body", m.Airflow); err != nil { + return err + } + + return nil +} + func (m *WritableDeviceType) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -343,6 +405,8 @@ func (m *WritableDeviceType) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -429,7 +493,7 @@ func (m *WritableDeviceType) ContextValidate(ctx context.Context, formats strfmt func (m *WritableDeviceType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -498,6 +562,8 @@ func (m *WritableDeviceType) contextValidateTags(ctx context.Context, formats st if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_device_with_config_context.go b/netbox/models/writable_device_with_config_context.go index ec36e9785..b94625cd7 100644 --- a/netbox/models/writable_device_with_config_context.go +++ b/netbox/models/writable_device_with_config_context.go @@ -36,6 +36,10 @@ import ( // swagger:model WritableDeviceWithConfigContext type WritableDeviceWithConfigContext struct { + // Airflow + // Enum: [front-to-rear rear-to-front left-to-right right-to-left side-to-rear passive] + Airflow string `json:"airflow,omitempty"` + // Asset tag // // A unique tag used to identify this device @@ -50,12 +54,12 @@ type WritableDeviceWithConfigContext struct { // Config context // Read Only: true - ConfigContext interface{} `json:"config_context,omitempty"` + ConfigContext map[string]*string `json:"config_context,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -73,10 +77,11 @@ type WritableDeviceWithConfigContext struct { Display string `json:"display,omitempty"` // Rack face + // Required: true // Enum: [front rear] - Face string `json:"face,omitempty"` + Face *string `json:"face"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -92,8 +97,9 @@ type WritableDeviceWithConfigContext struct { Location *int64 `json:"location,omitempty"` // Name + // Required: true // Max Length: 64 - Name *string `json:"name,omitempty"` + Name *string `json:"name"` // parent device ParentDevice *NestedDevice `json:"parent_device,omitempty"` @@ -102,9 +108,6 @@ type WritableDeviceWithConfigContext struct { Platform *int64 `json:"platform,omitempty"` // Position (U) - // - // The lowest-numbered unit occupied by the device - // Maximum: 32767 // Minimum: 1 Position *int64 `json:"position,omitempty"` @@ -119,7 +122,8 @@ type WritableDeviceWithConfigContext struct { PrimaryIp6 *int64 `json:"primary_ip6,omitempty"` // Rack - Rack *int64 `json:"rack,omitempty"` + // Required: true + Rack *int64 `json:"rack"` // Serial number // Max Length: 50 @@ -137,7 +141,8 @@ type WritableDeviceWithConfigContext struct { Tags []*NestedTag `json:"tags"` // Tenant - Tenant *int64 `json:"tenant,omitempty"` + // Required: true + Tenant *int64 `json:"tenant"` // Url // Read Only: true @@ -155,13 +160,18 @@ type WritableDeviceWithConfigContext struct { VcPriority *int64 `json:"vc_priority,omitempty"` // Virtual chassis - VirtualChassis *int64 `json:"virtual_chassis,omitempty"` + // Required: true + VirtualChassis *int64 `json:"virtual_chassis"` } // Validate validates this writable device with config context func (m *WritableDeviceWithConfigContext) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAirflow(formats); err != nil { + res = append(res, err) + } + if err := m.validateAssetTag(formats); err != nil { res = append(res, err) } @@ -198,6 +208,10 @@ func (m *WritableDeviceWithConfigContext) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateRack(formats); err != nil { + res = append(res, err) + } + if err := m.validateSerial(formats); err != nil { res = append(res, err) } @@ -214,6 +228,10 @@ func (m *WritableDeviceWithConfigContext) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -226,12 +244,70 @@ func (m *WritableDeviceWithConfigContext) Validate(formats strfmt.Registry) erro res = append(res, err) } + if err := m.validateVirtualChassis(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } +var writableDeviceWithConfigContextTypeAirflowPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["front-to-rear","rear-to-front","left-to-right","right-to-left","side-to-rear","passive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableDeviceWithConfigContextTypeAirflowPropEnum = append(writableDeviceWithConfigContextTypeAirflowPropEnum, v) + } +} + +const ( + + // WritableDeviceWithConfigContextAirflowFrontDashToDashRear captures enum value "front-to-rear" + WritableDeviceWithConfigContextAirflowFrontDashToDashRear string = "front-to-rear" + + // WritableDeviceWithConfigContextAirflowRearDashToDashFront captures enum value "rear-to-front" + WritableDeviceWithConfigContextAirflowRearDashToDashFront string = "rear-to-front" + + // WritableDeviceWithConfigContextAirflowLeftDashToDashRight captures enum value "left-to-right" + WritableDeviceWithConfigContextAirflowLeftDashToDashRight string = "left-to-right" + + // WritableDeviceWithConfigContextAirflowRightDashToDashLeft captures enum value "right-to-left" + WritableDeviceWithConfigContextAirflowRightDashToDashLeft string = "right-to-left" + + // WritableDeviceWithConfigContextAirflowSideDashToDashRear captures enum value "side-to-rear" + WritableDeviceWithConfigContextAirflowSideDashToDashRear string = "side-to-rear" + + // WritableDeviceWithConfigContextAirflowPassive captures enum value "passive" + WritableDeviceWithConfigContextAirflowPassive string = "passive" +) + +// prop value enum +func (m *WritableDeviceWithConfigContext) validateAirflowEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableDeviceWithConfigContextTypeAirflowPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableDeviceWithConfigContext) validateAirflow(formats strfmt.Registry) error { + if swag.IsZero(m.Airflow) { // not required + return nil + } + + // value enum + if err := m.validateAirflowEnum("airflow", "body", m.Airflow); err != nil { + return err + } + + return nil +} + func (m *WritableDeviceWithConfigContext) validateAssetTag(formats strfmt.Registry) error { if swag.IsZero(m.AssetTag) { // not required return nil @@ -249,7 +325,7 @@ func (m *WritableDeviceWithConfigContext) validateCreated(formats strfmt.Registr return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -304,12 +380,13 @@ func (m *WritableDeviceWithConfigContext) validateFaceEnum(path, location string } func (m *WritableDeviceWithConfigContext) validateFace(formats strfmt.Registry) error { - if swag.IsZero(m.Face) { // not required - return nil + + if err := validate.Required("face", "body", m.Face); err != nil { + return err } // value enum - if err := m.validateFaceEnum("face", "body", m.Face); err != nil { + if err := m.validateFaceEnum("face", "body", *m.Face); err != nil { return err } @@ -329,8 +406,9 @@ func (m *WritableDeviceWithConfigContext) validateLastUpdated(formats strfmt.Reg } func (m *WritableDeviceWithConfigContext) validateName(formats strfmt.Registry) error { - if swag.IsZero(m.Name) { // not required - return nil + + if err := validate.Required("name", "body", m.Name); err != nil { + return err } if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { @@ -349,6 +427,8 @@ func (m *WritableDeviceWithConfigContext) validateParentDevice(formats strfmt.Re if err := m.ParentDevice.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent_device") } return err } @@ -366,7 +446,12 @@ func (m *WritableDeviceWithConfigContext) validatePosition(formats strfmt.Regist return err } - if err := validate.MaximumInt("position", "body", *m.Position, 32767, false); err != nil { + return nil +} + +func (m *WritableDeviceWithConfigContext) validateRack(formats strfmt.Registry) error { + + if err := validate.Required("rack", "body", m.Rack); err != nil { return err } @@ -465,6 +550,8 @@ func (m *WritableDeviceWithConfigContext) validateTags(formats strfmt.Registry) if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -475,6 +562,15 @@ func (m *WritableDeviceWithConfigContext) validateTags(formats strfmt.Registry) return nil } +func (m *WritableDeviceWithConfigContext) validateTenant(formats strfmt.Registry) error { + + if err := validate.Required("tenant", "body", m.Tenant); err != nil { + return err + } + + return nil +} + func (m *WritableDeviceWithConfigContext) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -519,10 +615,23 @@ func (m *WritableDeviceWithConfigContext) validateVcPriority(formats strfmt.Regi return nil } +func (m *WritableDeviceWithConfigContext) validateVirtualChassis(formats strfmt.Registry) error { + + if err := validate.Required("virtual_chassis", "body", m.VirtualChassis); err != nil { + return err + } + + return nil +} + // ContextValidate validate this writable device with config context based on the context it is used func (m *WritableDeviceWithConfigContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateConfigContext(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -561,9 +670,14 @@ func (m *WritableDeviceWithConfigContext) ContextValidate(ctx context.Context, f return nil } +func (m *WritableDeviceWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *WritableDeviceWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -603,6 +717,8 @@ func (m *WritableDeviceWithConfigContext) contextValidateParentDevice(ctx contex if err := m.ParentDevice.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parent_device") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parent_device") } return err } @@ -628,6 +744,8 @@ func (m *WritableDeviceWithConfigContext) contextValidateTags(ctx context.Contex if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_f_h_r_p_group_assignment.go b/netbox/models/writable_f_h_r_p_group_assignment.go new file mode 100644 index 000000000..2331a57c8 --- /dev/null +++ b/netbox/models/writable_f_h_r_p_group_assignment.go @@ -0,0 +1,311 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableFHRPGroupAssignment writable f h r p group assignment +// +// swagger:model WritableFHRPGroupAssignment +type WritableFHRPGroupAssignment struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Group + // Required: true + Group *int64 `json:"group"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Interface + // Read Only: true + Interface map[string]*string `json:"interface,omitempty"` + + // Interface id + // Required: true + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + InterfaceID *int64 `json:"interface_id"` + + // Interface type + // Required: true + InterfaceType *string `json:"interface_type"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Priority + // Required: true + // Maximum: 255 + // Minimum: 0 + Priority *int64 `json:"priority"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable f h r p group assignment +func (m *WritableFHRPGroupAssignment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaceID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePriority(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableFHRPGroupAssignment) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) validateGroup(formats strfmt.Registry) error { + + if err := validate.Required("group", "body", m.Group); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) validateInterfaceID(formats strfmt.Registry) error { + + if err := validate.Required("interface_id", "body", m.InterfaceID); err != nil { + return err + } + + if err := validate.MinimumInt("interface_id", "body", *m.InterfaceID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("interface_id", "body", *m.InterfaceID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) validateInterfaceType(formats strfmt.Registry) error { + + if err := validate.Required("interface_type", "body", m.InterfaceType); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) validatePriority(formats strfmt.Registry) error { + + if err := validate.Required("priority", "body", m.Priority); err != nil { + return err + } + + if err := validate.MinimumInt("priority", "body", *m.Priority, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("priority", "body", *m.Priority, 255, false); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable f h r p group assignment based on the context it is used +func (m *WritableFHRPGroupAssignment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInterface(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableFHRPGroupAssignment) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) contextValidateInterface(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableFHRPGroupAssignment) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableFHRPGroupAssignment) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableFHRPGroupAssignment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableFHRPGroupAssignment) UnmarshalBinary(b []byte) error { + var res WritableFHRPGroupAssignment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_front_port.go b/netbox/models/writable_front_port.go index 860f16f8c..a4d2364c0 100644 --- a/netbox/models/writable_front_port.go +++ b/netbox/models/writable_front_port.go @@ -43,18 +43,6 @@ type WritableFrontPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -62,8 +50,8 @@ type WritableFrontPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -80,7 +68,7 @@ type WritableFrontPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -95,11 +83,26 @@ type WritableFrontPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -120,7 +123,7 @@ type WritableFrontPort struct { // Type // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Type *string `json:"type"` // Url @@ -200,6 +203,8 @@ func (m *WritableFrontPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -229,7 +234,7 @@ func (m *WritableFrontPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -337,6 +342,8 @@ func (m *WritableFrontPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -351,7 +358,7 @@ var writableFrontPortTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -421,12 +428,24 @@ const ( // WritableFrontPortTypeLc captures enum value "lc" WritableFrontPortTypeLc string = "lc" + // WritableFrontPortTypeLcDashPc captures enum value "lc-pc" + WritableFrontPortTypeLcDashPc string = "lc-pc" + + // WritableFrontPortTypeLcDashUpc captures enum value "lc-upc" + WritableFrontPortTypeLcDashUpc string = "lc-upc" + // WritableFrontPortTypeLcDashApc captures enum value "lc-apc" WritableFrontPortTypeLcDashApc string = "lc-apc" // WritableFrontPortTypeLsh captures enum value "lsh" WritableFrontPortTypeLsh string = "lsh" + // WritableFrontPortTypeLshDashPc captures enum value "lsh-pc" + WritableFrontPortTypeLshDashPc string = "lsh-pc" + + // WritableFrontPortTypeLshDashUpc captures enum value "lsh-upc" + WritableFrontPortTypeLshDashUpc string = "lsh-upc" + // WritableFrontPortTypeLshDashApc captures enum value "lsh-apc" WritableFrontPortTypeLshDashApc string = "lsh-apc" @@ -439,6 +458,12 @@ const ( // WritableFrontPortTypeSc captures enum value "sc" WritableFrontPortTypeSc string = "sc" + // WritableFrontPortTypeScDashPc captures enum value "sc-pc" + WritableFrontPortTypeScDashPc string = "sc-pc" + + // WritableFrontPortTypeScDashUpc captures enum value "sc-upc" + WritableFrontPortTypeScDashUpc string = "sc-upc" + // WritableFrontPortTypeScDashApc captures enum value "sc-apc" WritableFrontPortTypeScDashApc string = "sc-apc" @@ -451,6 +476,21 @@ const ( // WritableFrontPortTypeSn captures enum value "sn" WritableFrontPortTypeSn string = "sn" + // WritableFrontPortTypeSmaDash905 captures enum value "sma-905" + WritableFrontPortTypeSmaDash905 string = "sma-905" + + // WritableFrontPortTypeSmaDash906 captures enum value "sma-906" + WritableFrontPortTypeSmaDash906 string = "sma-906" + + // WritableFrontPortTypeUrmDashP2 captures enum value "urm-p2" + WritableFrontPortTypeUrmDashP2 string = "urm-p2" + + // WritableFrontPortTypeUrmDashP4 captures enum value "urm-p4" + WritableFrontPortTypeUrmDashP4 string = "urm-p4" + + // WritableFrontPortTypeUrmDashP8 captures enum value "urm-p8" + WritableFrontPortTypeUrmDashP8 string = "urm-p8" + // WritableFrontPortTypeSplice captures enum value "splice" WritableFrontPortTypeSplice string = "splice" ) @@ -501,10 +541,6 @@ func (m *WritableFrontPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -521,6 +557,14 @@ func (m *WritableFrontPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -550,6 +594,8 @@ func (m *WritableFrontPort) contextValidateCable(ctx context.Context, formats st if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -558,18 +604,9 @@ func (m *WritableFrontPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritableFrontPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } - - return nil -} - func (m *WritableFrontPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -603,6 +640,20 @@ func (m *WritableFrontPort) contextValidateLastUpdated(ctx context.Context, form return nil } +func (m *WritableFrontPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableFrontPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritableFrontPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -611,6 +662,8 @@ func (m *WritableFrontPort) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_front_port_template.go b/netbox/models/writable_front_port_template.go index caff1ae01..8b248c4d6 100644 --- a/netbox/models/writable_front_port_template.go +++ b/netbox/models/writable_front_port_template.go @@ -42,8 +42,8 @@ type WritableFrontPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -57,7 +57,7 @@ type WritableFrontPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -89,7 +89,7 @@ type WritableFrontPortTemplate struct { // Type // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Type *string `json:"type"` // Url @@ -173,7 +173,7 @@ func (m *WritableFrontPortTemplate) validateCreated(formats strfmt.Registry) err return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -271,7 +271,7 @@ var writableFrontPortTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -341,12 +341,24 @@ const ( // WritableFrontPortTemplateTypeLc captures enum value "lc" WritableFrontPortTemplateTypeLc string = "lc" + // WritableFrontPortTemplateTypeLcDashPc captures enum value "lc-pc" + WritableFrontPortTemplateTypeLcDashPc string = "lc-pc" + + // WritableFrontPortTemplateTypeLcDashUpc captures enum value "lc-upc" + WritableFrontPortTemplateTypeLcDashUpc string = "lc-upc" + // WritableFrontPortTemplateTypeLcDashApc captures enum value "lc-apc" WritableFrontPortTemplateTypeLcDashApc string = "lc-apc" // WritableFrontPortTemplateTypeLsh captures enum value "lsh" WritableFrontPortTemplateTypeLsh string = "lsh" + // WritableFrontPortTemplateTypeLshDashPc captures enum value "lsh-pc" + WritableFrontPortTemplateTypeLshDashPc string = "lsh-pc" + + // WritableFrontPortTemplateTypeLshDashUpc captures enum value "lsh-upc" + WritableFrontPortTemplateTypeLshDashUpc string = "lsh-upc" + // WritableFrontPortTemplateTypeLshDashApc captures enum value "lsh-apc" WritableFrontPortTemplateTypeLshDashApc string = "lsh-apc" @@ -359,6 +371,12 @@ const ( // WritableFrontPortTemplateTypeSc captures enum value "sc" WritableFrontPortTemplateTypeSc string = "sc" + // WritableFrontPortTemplateTypeScDashPc captures enum value "sc-pc" + WritableFrontPortTemplateTypeScDashPc string = "sc-pc" + + // WritableFrontPortTemplateTypeScDashUpc captures enum value "sc-upc" + WritableFrontPortTemplateTypeScDashUpc string = "sc-upc" + // WritableFrontPortTemplateTypeScDashApc captures enum value "sc-apc" WritableFrontPortTemplateTypeScDashApc string = "sc-apc" @@ -371,6 +389,21 @@ const ( // WritableFrontPortTemplateTypeSn captures enum value "sn" WritableFrontPortTemplateTypeSn string = "sn" + // WritableFrontPortTemplateTypeSmaDash905 captures enum value "sma-905" + WritableFrontPortTemplateTypeSmaDash905 string = "sma-905" + + // WritableFrontPortTemplateTypeSmaDash906 captures enum value "sma-906" + WritableFrontPortTemplateTypeSmaDash906 string = "sma-906" + + // WritableFrontPortTemplateTypeUrmDashP2 captures enum value "urm-p2" + WritableFrontPortTemplateTypeUrmDashP2 string = "urm-p2" + + // WritableFrontPortTemplateTypeUrmDashP4 captures enum value "urm-p4" + WritableFrontPortTemplateTypeUrmDashP4 string = "urm-p4" + + // WritableFrontPortTemplateTypeUrmDashP8 captures enum value "urm-p8" + WritableFrontPortTemplateTypeUrmDashP8 string = "urm-p8" + // WritableFrontPortTemplateTypeSplice captures enum value "splice" WritableFrontPortTemplateTypeSplice string = "splice" ) @@ -441,7 +474,7 @@ func (m *WritableFrontPortTemplate) ContextValidate(ctx context.Context, formats func (m *WritableFrontPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_interface.go b/netbox/models/writable_interface.go index aab8c01a8..32b902475 100644 --- a/netbox/models/writable_interface.go +++ b/netbox/models/writable_interface.go @@ -40,28 +40,19 @@ type WritableInterface struct { // Read Only: true Occupied *bool `json:"_occupied,omitempty"` + // Bridge interface + Bridge *int64 `json:"bridge,omitempty"` + // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -71,14 +62,18 @@ type WritableInterface struct { // Read Only: true ConnectedEndpointType string `json:"connected_endpoint_type,omitempty"` + // Count fhrp groups + // Read Only: true + CountFhrpGroups int64 `json:"count_fhrp_groups,omitempty"` + // Count ipaddresses // Read Only: true CountIpaddresses int64 `json:"count_ipaddresses,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -95,10 +90,14 @@ type WritableInterface struct { // Read Only: true Display string `json:"display,omitempty"` + // Duplex + // Enum: [half full auto] + Duplex *string `json:"duplex,omitempty"` + // Enabled Enabled bool `json:"enabled,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -116,6 +115,18 @@ type WritableInterface struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // MAC Address MacAddress *string `json:"mac_address,omitempty"` @@ -133,6 +144,9 @@ type WritableInterface struct { // Enum: [access tagged tagged-all] Mode string `json:"mode,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // MTU // Maximum: 65536 // Minimum: 1 @@ -147,6 +161,25 @@ type WritableInterface struct { // Parent interface Parent *int64 `json:"parent,omitempty"` + // Wireless channel + // Enum: [2.4g-1-2412-22 2.4g-2-2417-22 2.4g-3-2422-22 2.4g-4-2427-22 2.4g-5-2432-22 2.4g-6-2437-22 2.4g-7-2442-22 2.4g-8-2447-22 2.4g-9-2452-22 2.4g-10-2457-22 2.4g-11-2462-22 2.4g-12-2467-22 2.4g-13-2472-22 5g-32-5160-20 5g-34-5170-40 5g-36-5180-20 5g-38-5190-40 5g-40-5200-20 5g-42-5210-80 5g-44-5220-20 5g-46-5230-40 5g-48-5240-20 5g-50-5250-160 5g-52-5260-20 5g-54-5270-40 5g-56-5280-20 5g-58-5290-80 5g-60-5300-20 5g-62-5310-40 5g-64-5320-20 5g-100-5500-20 5g-102-5510-40 5g-104-5520-20 5g-106-5530-80 5g-108-5540-20 5g-110-5550-40 5g-112-5560-20 5g-114-5570-160 5g-116-5580-20 5g-118-5590-40 5g-120-5600-20 5g-122-5610-80 5g-124-5620-20 5g-126-5630-40 5g-128-5640-20 5g-132-5660-20 5g-134-5670-40 5g-136-5680-20 5g-138-5690-80 5g-140-5700-20 5g-142-5710-40 5g-144-5720-20 5g-149-5745-20 5g-151-5755-40 5g-153-5765-20 5g-155-5775-80 5g-157-5785-20 5g-159-5795-40 5g-161-5805-20 5g-163-5815-160 5g-165-5825-20 5g-167-5835-40 5g-169-5845-20 5g-171-5855-80 5g-173-5865-20 5g-175-5875-40 5g-177-5885-20 6g-1-5955-20 6g-3-5965-40 6g-5-5975-20 6g-7-5985-80 6g-9-5995-20 6g-11-6005-40 6g-13-6015-20 6g-15-6025-160 6g-17-6035-20 6g-19-6045-40 6g-21-6055-20 6g-23-6065-80 6g-25-6075-20 6g-27-6085-40 6g-29-6095-20 6g-31-6105-320 6g-33-6115-20 6g-35-6125-40 6g-37-6135-20 6g-39-6145-80 6g-41-6155-20 6g-43-6165-40 6g-45-6175-20 6g-47-6185-160 6g-49-6195-20 6g-51-6205-40 6g-53-6215-20 6g-55-6225-80 6g-57-6235-20 6g-59-6245-40 6g-61-6255-20 6g-65-6275-20 6g-67-6285-40 6g-69-6295-20 6g-71-6305-80 6g-73-6315-20 6g-75-6325-40 6g-77-6335-20 6g-79-6345-160 6g-81-6355-20 6g-83-6365-40 6g-85-6375-20 6g-87-6385-80 6g-89-6395-20 6g-91-6405-40 6g-93-6415-20 6g-95-6425-320 6g-97-6435-20 6g-99-6445-40 6g-101-6455-20 6g-103-6465-80 6g-105-6475-20 6g-107-6485-40 6g-109-6495-20 6g-111-6505-160 6g-113-6515-20 6g-115-6525-40 6g-117-6535-20 6g-119-6545-80 6g-121-6555-20 6g-123-6565-40 6g-125-6575-20 6g-129-6595-20 6g-131-6605-40 6g-133-6615-20 6g-135-6625-80 6g-137-6635-20 6g-139-6645-40 6g-141-6655-20 6g-143-6665-160 6g-145-6675-20 6g-147-6685-40 6g-149-6695-20 6g-151-6705-80 6g-153-6715-20 6g-155-6725-40 6g-157-6735-20 6g-159-6745-320 6g-161-6755-20 6g-163-6765-40 6g-165-6775-20 6g-167-6785-80 6g-169-6795-20 6g-171-6805-40 6g-173-6815-20 6g-175-6825-160 6g-177-6835-20 6g-179-6845-40 6g-181-6855-20 6g-183-6865-80 6g-185-6875-20 6g-187-6885-40 6g-189-6895-20 6g-193-6915-20 6g-195-6925-40 6g-197-6935-20 6g-199-6945-80 6g-201-6955-20 6g-203-6965-40 6g-205-6975-20 6g-207-6985-160 6g-209-6995-20 6g-211-7005-40 6g-213-7015-20 6g-215-7025-80 6g-217-7035-20 6g-219-7045-40 6g-221-7055-20 6g-225-7075-20 6g-227-7085-40 6g-229-7095-20 6g-233-7115-20 60g-1-58320-2160 60g-2-60480-2160 60g-3-62640-2160 60g-4-64800-2160 60g-5-66960-2160 60g-6-69120-2160 60g-9-59400-4320 60g-10-61560-4320 60g-11-63720-4320 60g-12-65880-4320 60g-13-68040-4320 60g-17-60480-6480 60g-18-62640-6480 60g-19-64800-6480 60g-20-66960-6480 60g-25-61560-6480 60g-26-63720-6480 60g-27-65880-6480] + RfChannel string `json:"rf_channel,omitempty"` + + // Channel frequency (MHz) + RfChannelFrequency *float64 `json:"rf_channel_frequency,omitempty"` + + // Channel width (MHz) + RfChannelWidth *float64 `json:"rf_channel_width,omitempty"` + + // Wireless role + // Enum: [ap station] + RfRole string `json:"rf_role,omitempty"` + + // Speed + // Maximum: 2.147483647e+09 + // Minimum: 0 + Speed *int64 `json:"speed,omitempty"` + // tagged vlans // Unique: true TaggedVlans []int64 `json:"tagged_vlans"` @@ -154,9 +187,14 @@ type WritableInterface struct { // tags Tags []*NestedTag `json:"tags"` + // Transmit power (dBm) + // Maximum: 127 + // Minimum: 0 + TxPower *int64 `json:"tx_power,omitempty"` + // Type // Required: true - // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-sfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Type *string `json:"type"` // Untagged VLAN @@ -166,6 +204,21 @@ type WritableInterface struct { // Read Only: true // Format: uri URL strfmt.URI `json:"url,omitempty"` + + // VRF + Vrf *int64 `json:"vrf,omitempty"` + + // wireless lans + // Unique: true + WirelessLans []int64 `json:"wireless_lans"` + + // Wireless link + WirelessLink *int64 `json:"wireless_link,omitempty"` + + // WWN + // + // 64-bit World Wide Name + Wwn *string `json:"wwn,omitempty"` } // Validate validates this writable interface @@ -188,6 +241,10 @@ func (m *WritableInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDuplex(formats); err != nil { + res = append(res, err) + } + if err := m.validateLabel(formats); err != nil { res = append(res, err) } @@ -208,6 +265,18 @@ func (m *WritableInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRfChannel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRfRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpeed(formats); err != nil { + res = append(res, err) + } + if err := m.validateTaggedVlans(formats); err != nil { res = append(res, err) } @@ -216,6 +285,10 @@ func (m *WritableInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTxPower(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -224,6 +297,10 @@ func (m *WritableInterface) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateWirelessLans(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -239,6 +316,8 @@ func (m *WritableInterface) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -252,7 +331,7 @@ func (m *WritableInterface) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -280,6 +359,51 @@ func (m *WritableInterface) validateDevice(formats strfmt.Registry) error { return nil } +var writableInterfaceTypeDuplexPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["half","full","auto"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTypeDuplexPropEnum = append(writableInterfaceTypeDuplexPropEnum, v) + } +} + +const ( + + // WritableInterfaceDuplexHalf captures enum value "half" + WritableInterfaceDuplexHalf string = "half" + + // WritableInterfaceDuplexFull captures enum value "full" + WritableInterfaceDuplexFull string = "full" + + // WritableInterfaceDuplexAuto captures enum value "auto" + WritableInterfaceDuplexAuto string = "auto" +) + +// prop value enum +func (m *WritableInterface) validateDuplexEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTypeDuplexPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterface) validateDuplex(formats strfmt.Registry) error { + if swag.IsZero(m.Duplex) { // not required + return nil + } + + // value enum + if err := m.validateDuplexEnum("duplex", "body", *m.Duplex); err != nil { + return err + } + + return nil +} + func (m *WritableInterface) validateLabel(formats strfmt.Registry) error { if swag.IsZero(m.Label) { // not required return nil @@ -382,6 +506,691 @@ func (m *WritableInterface) validateName(formats strfmt.Registry) error { return nil } +var writableInterfaceTypeRfChannelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["2.4g-1-2412-22","2.4g-2-2417-22","2.4g-3-2422-22","2.4g-4-2427-22","2.4g-5-2432-22","2.4g-6-2437-22","2.4g-7-2442-22","2.4g-8-2447-22","2.4g-9-2452-22","2.4g-10-2457-22","2.4g-11-2462-22","2.4g-12-2467-22","2.4g-13-2472-22","5g-32-5160-20","5g-34-5170-40","5g-36-5180-20","5g-38-5190-40","5g-40-5200-20","5g-42-5210-80","5g-44-5220-20","5g-46-5230-40","5g-48-5240-20","5g-50-5250-160","5g-52-5260-20","5g-54-5270-40","5g-56-5280-20","5g-58-5290-80","5g-60-5300-20","5g-62-5310-40","5g-64-5320-20","5g-100-5500-20","5g-102-5510-40","5g-104-5520-20","5g-106-5530-80","5g-108-5540-20","5g-110-5550-40","5g-112-5560-20","5g-114-5570-160","5g-116-5580-20","5g-118-5590-40","5g-120-5600-20","5g-122-5610-80","5g-124-5620-20","5g-126-5630-40","5g-128-5640-20","5g-132-5660-20","5g-134-5670-40","5g-136-5680-20","5g-138-5690-80","5g-140-5700-20","5g-142-5710-40","5g-144-5720-20","5g-149-5745-20","5g-151-5755-40","5g-153-5765-20","5g-155-5775-80","5g-157-5785-20","5g-159-5795-40","5g-161-5805-20","5g-163-5815-160","5g-165-5825-20","5g-167-5835-40","5g-169-5845-20","5g-171-5855-80","5g-173-5865-20","5g-175-5875-40","5g-177-5885-20","6g-1-5955-20","6g-3-5965-40","6g-5-5975-20","6g-7-5985-80","6g-9-5995-20","6g-11-6005-40","6g-13-6015-20","6g-15-6025-160","6g-17-6035-20","6g-19-6045-40","6g-21-6055-20","6g-23-6065-80","6g-25-6075-20","6g-27-6085-40","6g-29-6095-20","6g-31-6105-320","6g-33-6115-20","6g-35-6125-40","6g-37-6135-20","6g-39-6145-80","6g-41-6155-20","6g-43-6165-40","6g-45-6175-20","6g-47-6185-160","6g-49-6195-20","6g-51-6205-40","6g-53-6215-20","6g-55-6225-80","6g-57-6235-20","6g-59-6245-40","6g-61-6255-20","6g-65-6275-20","6g-67-6285-40","6g-69-6295-20","6g-71-6305-80","6g-73-6315-20","6g-75-6325-40","6g-77-6335-20","6g-79-6345-160","6g-81-6355-20","6g-83-6365-40","6g-85-6375-20","6g-87-6385-80","6g-89-6395-20","6g-91-6405-40","6g-93-6415-20","6g-95-6425-320","6g-97-6435-20","6g-99-6445-40","6g-101-6455-20","6g-103-6465-80","6g-105-6475-20","6g-107-6485-40","6g-109-6495-20","6g-111-6505-160","6g-113-6515-20","6g-115-6525-40","6g-117-6535-20","6g-119-6545-80","6g-121-6555-20","6g-123-6565-40","6g-125-6575-20","6g-129-6595-20","6g-131-6605-40","6g-133-6615-20","6g-135-6625-80","6g-137-6635-20","6g-139-6645-40","6g-141-6655-20","6g-143-6665-160","6g-145-6675-20","6g-147-6685-40","6g-149-6695-20","6g-151-6705-80","6g-153-6715-20","6g-155-6725-40","6g-157-6735-20","6g-159-6745-320","6g-161-6755-20","6g-163-6765-40","6g-165-6775-20","6g-167-6785-80","6g-169-6795-20","6g-171-6805-40","6g-173-6815-20","6g-175-6825-160","6g-177-6835-20","6g-179-6845-40","6g-181-6855-20","6g-183-6865-80","6g-185-6875-20","6g-187-6885-40","6g-189-6895-20","6g-193-6915-20","6g-195-6925-40","6g-197-6935-20","6g-199-6945-80","6g-201-6955-20","6g-203-6965-40","6g-205-6975-20","6g-207-6985-160","6g-209-6995-20","6g-211-7005-40","6g-213-7015-20","6g-215-7025-80","6g-217-7035-20","6g-219-7045-40","6g-221-7055-20","6g-225-7075-20","6g-227-7085-40","6g-229-7095-20","6g-233-7115-20","60g-1-58320-2160","60g-2-60480-2160","60g-3-62640-2160","60g-4-64800-2160","60g-5-66960-2160","60g-6-69120-2160","60g-9-59400-4320","60g-10-61560-4320","60g-11-63720-4320","60g-12-65880-4320","60g-13-68040-4320","60g-17-60480-6480","60g-18-62640-6480","60g-19-64800-6480","60g-20-66960-6480","60g-25-61560-6480","60g-26-63720-6480","60g-27-65880-6480"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTypeRfChannelPropEnum = append(writableInterfaceTypeRfChannelPropEnum, v) + } +} + +const ( + + // WritableInterfaceRfChannelNr2Dot4gDash1Dash2412Dash22 captures enum value "2.4g-1-2412-22" + WritableInterfaceRfChannelNr2Dot4gDash1Dash2412Dash22 string = "2.4g-1-2412-22" + + // WritableInterfaceRfChannelNr2Dot4gDash2Dash2417Dash22 captures enum value "2.4g-2-2417-22" + WritableInterfaceRfChannelNr2Dot4gDash2Dash2417Dash22 string = "2.4g-2-2417-22" + + // WritableInterfaceRfChannelNr2Dot4gDash3Dash2422Dash22 captures enum value "2.4g-3-2422-22" + WritableInterfaceRfChannelNr2Dot4gDash3Dash2422Dash22 string = "2.4g-3-2422-22" + + // WritableInterfaceRfChannelNr2Dot4gDash4Dash2427Dash22 captures enum value "2.4g-4-2427-22" + WritableInterfaceRfChannelNr2Dot4gDash4Dash2427Dash22 string = "2.4g-4-2427-22" + + // WritableInterfaceRfChannelNr2Dot4gDash5Dash2432Dash22 captures enum value "2.4g-5-2432-22" + WritableInterfaceRfChannelNr2Dot4gDash5Dash2432Dash22 string = "2.4g-5-2432-22" + + // WritableInterfaceRfChannelNr2Dot4gDash6Dash2437Dash22 captures enum value "2.4g-6-2437-22" + WritableInterfaceRfChannelNr2Dot4gDash6Dash2437Dash22 string = "2.4g-6-2437-22" + + // WritableInterfaceRfChannelNr2Dot4gDash7Dash2442Dash22 captures enum value "2.4g-7-2442-22" + WritableInterfaceRfChannelNr2Dot4gDash7Dash2442Dash22 string = "2.4g-7-2442-22" + + // WritableInterfaceRfChannelNr2Dot4gDash8Dash2447Dash22 captures enum value "2.4g-8-2447-22" + WritableInterfaceRfChannelNr2Dot4gDash8Dash2447Dash22 string = "2.4g-8-2447-22" + + // WritableInterfaceRfChannelNr2Dot4gDash9Dash2452Dash22 captures enum value "2.4g-9-2452-22" + WritableInterfaceRfChannelNr2Dot4gDash9Dash2452Dash22 string = "2.4g-9-2452-22" + + // WritableInterfaceRfChannelNr2Dot4gDash10Dash2457Dash22 captures enum value "2.4g-10-2457-22" + WritableInterfaceRfChannelNr2Dot4gDash10Dash2457Dash22 string = "2.4g-10-2457-22" + + // WritableInterfaceRfChannelNr2Dot4gDash11Dash2462Dash22 captures enum value "2.4g-11-2462-22" + WritableInterfaceRfChannelNr2Dot4gDash11Dash2462Dash22 string = "2.4g-11-2462-22" + + // WritableInterfaceRfChannelNr2Dot4gDash12Dash2467Dash22 captures enum value "2.4g-12-2467-22" + WritableInterfaceRfChannelNr2Dot4gDash12Dash2467Dash22 string = "2.4g-12-2467-22" + + // WritableInterfaceRfChannelNr2Dot4gDash13Dash2472Dash22 captures enum value "2.4g-13-2472-22" + WritableInterfaceRfChannelNr2Dot4gDash13Dash2472Dash22 string = "2.4g-13-2472-22" + + // WritableInterfaceRfChannelNr5gDash32Dash5160Dash20 captures enum value "5g-32-5160-20" + WritableInterfaceRfChannelNr5gDash32Dash5160Dash20 string = "5g-32-5160-20" + + // WritableInterfaceRfChannelNr5gDash34Dash5170Dash40 captures enum value "5g-34-5170-40" + WritableInterfaceRfChannelNr5gDash34Dash5170Dash40 string = "5g-34-5170-40" + + // WritableInterfaceRfChannelNr5gDash36Dash5180Dash20 captures enum value "5g-36-5180-20" + WritableInterfaceRfChannelNr5gDash36Dash5180Dash20 string = "5g-36-5180-20" + + // WritableInterfaceRfChannelNr5gDash38Dash5190Dash40 captures enum value "5g-38-5190-40" + WritableInterfaceRfChannelNr5gDash38Dash5190Dash40 string = "5g-38-5190-40" + + // WritableInterfaceRfChannelNr5gDash40Dash5200Dash20 captures enum value "5g-40-5200-20" + WritableInterfaceRfChannelNr5gDash40Dash5200Dash20 string = "5g-40-5200-20" + + // WritableInterfaceRfChannelNr5gDash42Dash5210Dash80 captures enum value "5g-42-5210-80" + WritableInterfaceRfChannelNr5gDash42Dash5210Dash80 string = "5g-42-5210-80" + + // WritableInterfaceRfChannelNr5gDash44Dash5220Dash20 captures enum value "5g-44-5220-20" + WritableInterfaceRfChannelNr5gDash44Dash5220Dash20 string = "5g-44-5220-20" + + // WritableInterfaceRfChannelNr5gDash46Dash5230Dash40 captures enum value "5g-46-5230-40" + WritableInterfaceRfChannelNr5gDash46Dash5230Dash40 string = "5g-46-5230-40" + + // WritableInterfaceRfChannelNr5gDash48Dash5240Dash20 captures enum value "5g-48-5240-20" + WritableInterfaceRfChannelNr5gDash48Dash5240Dash20 string = "5g-48-5240-20" + + // WritableInterfaceRfChannelNr5gDash50Dash5250Dash160 captures enum value "5g-50-5250-160" + WritableInterfaceRfChannelNr5gDash50Dash5250Dash160 string = "5g-50-5250-160" + + // WritableInterfaceRfChannelNr5gDash52Dash5260Dash20 captures enum value "5g-52-5260-20" + WritableInterfaceRfChannelNr5gDash52Dash5260Dash20 string = "5g-52-5260-20" + + // WritableInterfaceRfChannelNr5gDash54Dash5270Dash40 captures enum value "5g-54-5270-40" + WritableInterfaceRfChannelNr5gDash54Dash5270Dash40 string = "5g-54-5270-40" + + // WritableInterfaceRfChannelNr5gDash56Dash5280Dash20 captures enum value "5g-56-5280-20" + WritableInterfaceRfChannelNr5gDash56Dash5280Dash20 string = "5g-56-5280-20" + + // WritableInterfaceRfChannelNr5gDash58Dash5290Dash80 captures enum value "5g-58-5290-80" + WritableInterfaceRfChannelNr5gDash58Dash5290Dash80 string = "5g-58-5290-80" + + // WritableInterfaceRfChannelNr5gDash60Dash5300Dash20 captures enum value "5g-60-5300-20" + WritableInterfaceRfChannelNr5gDash60Dash5300Dash20 string = "5g-60-5300-20" + + // WritableInterfaceRfChannelNr5gDash62Dash5310Dash40 captures enum value "5g-62-5310-40" + WritableInterfaceRfChannelNr5gDash62Dash5310Dash40 string = "5g-62-5310-40" + + // WritableInterfaceRfChannelNr5gDash64Dash5320Dash20 captures enum value "5g-64-5320-20" + WritableInterfaceRfChannelNr5gDash64Dash5320Dash20 string = "5g-64-5320-20" + + // WritableInterfaceRfChannelNr5gDash100Dash5500Dash20 captures enum value "5g-100-5500-20" + WritableInterfaceRfChannelNr5gDash100Dash5500Dash20 string = "5g-100-5500-20" + + // WritableInterfaceRfChannelNr5gDash102Dash5510Dash40 captures enum value "5g-102-5510-40" + WritableInterfaceRfChannelNr5gDash102Dash5510Dash40 string = "5g-102-5510-40" + + // WritableInterfaceRfChannelNr5gDash104Dash5520Dash20 captures enum value "5g-104-5520-20" + WritableInterfaceRfChannelNr5gDash104Dash5520Dash20 string = "5g-104-5520-20" + + // WritableInterfaceRfChannelNr5gDash106Dash5530Dash80 captures enum value "5g-106-5530-80" + WritableInterfaceRfChannelNr5gDash106Dash5530Dash80 string = "5g-106-5530-80" + + // WritableInterfaceRfChannelNr5gDash108Dash5540Dash20 captures enum value "5g-108-5540-20" + WritableInterfaceRfChannelNr5gDash108Dash5540Dash20 string = "5g-108-5540-20" + + // WritableInterfaceRfChannelNr5gDash110Dash5550Dash40 captures enum value "5g-110-5550-40" + WritableInterfaceRfChannelNr5gDash110Dash5550Dash40 string = "5g-110-5550-40" + + // WritableInterfaceRfChannelNr5gDash112Dash5560Dash20 captures enum value "5g-112-5560-20" + WritableInterfaceRfChannelNr5gDash112Dash5560Dash20 string = "5g-112-5560-20" + + // WritableInterfaceRfChannelNr5gDash114Dash5570Dash160 captures enum value "5g-114-5570-160" + WritableInterfaceRfChannelNr5gDash114Dash5570Dash160 string = "5g-114-5570-160" + + // WritableInterfaceRfChannelNr5gDash116Dash5580Dash20 captures enum value "5g-116-5580-20" + WritableInterfaceRfChannelNr5gDash116Dash5580Dash20 string = "5g-116-5580-20" + + // WritableInterfaceRfChannelNr5gDash118Dash5590Dash40 captures enum value "5g-118-5590-40" + WritableInterfaceRfChannelNr5gDash118Dash5590Dash40 string = "5g-118-5590-40" + + // WritableInterfaceRfChannelNr5gDash120Dash5600Dash20 captures enum value "5g-120-5600-20" + WritableInterfaceRfChannelNr5gDash120Dash5600Dash20 string = "5g-120-5600-20" + + // WritableInterfaceRfChannelNr5gDash122Dash5610Dash80 captures enum value "5g-122-5610-80" + WritableInterfaceRfChannelNr5gDash122Dash5610Dash80 string = "5g-122-5610-80" + + // WritableInterfaceRfChannelNr5gDash124Dash5620Dash20 captures enum value "5g-124-5620-20" + WritableInterfaceRfChannelNr5gDash124Dash5620Dash20 string = "5g-124-5620-20" + + // WritableInterfaceRfChannelNr5gDash126Dash5630Dash40 captures enum value "5g-126-5630-40" + WritableInterfaceRfChannelNr5gDash126Dash5630Dash40 string = "5g-126-5630-40" + + // WritableInterfaceRfChannelNr5gDash128Dash5640Dash20 captures enum value "5g-128-5640-20" + WritableInterfaceRfChannelNr5gDash128Dash5640Dash20 string = "5g-128-5640-20" + + // WritableInterfaceRfChannelNr5gDash132Dash5660Dash20 captures enum value "5g-132-5660-20" + WritableInterfaceRfChannelNr5gDash132Dash5660Dash20 string = "5g-132-5660-20" + + // WritableInterfaceRfChannelNr5gDash134Dash5670Dash40 captures enum value "5g-134-5670-40" + WritableInterfaceRfChannelNr5gDash134Dash5670Dash40 string = "5g-134-5670-40" + + // WritableInterfaceRfChannelNr5gDash136Dash5680Dash20 captures enum value "5g-136-5680-20" + WritableInterfaceRfChannelNr5gDash136Dash5680Dash20 string = "5g-136-5680-20" + + // WritableInterfaceRfChannelNr5gDash138Dash5690Dash80 captures enum value "5g-138-5690-80" + WritableInterfaceRfChannelNr5gDash138Dash5690Dash80 string = "5g-138-5690-80" + + // WritableInterfaceRfChannelNr5gDash140Dash5700Dash20 captures enum value "5g-140-5700-20" + WritableInterfaceRfChannelNr5gDash140Dash5700Dash20 string = "5g-140-5700-20" + + // WritableInterfaceRfChannelNr5gDash142Dash5710Dash40 captures enum value "5g-142-5710-40" + WritableInterfaceRfChannelNr5gDash142Dash5710Dash40 string = "5g-142-5710-40" + + // WritableInterfaceRfChannelNr5gDash144Dash5720Dash20 captures enum value "5g-144-5720-20" + WritableInterfaceRfChannelNr5gDash144Dash5720Dash20 string = "5g-144-5720-20" + + // WritableInterfaceRfChannelNr5gDash149Dash5745Dash20 captures enum value "5g-149-5745-20" + WritableInterfaceRfChannelNr5gDash149Dash5745Dash20 string = "5g-149-5745-20" + + // WritableInterfaceRfChannelNr5gDash151Dash5755Dash40 captures enum value "5g-151-5755-40" + WritableInterfaceRfChannelNr5gDash151Dash5755Dash40 string = "5g-151-5755-40" + + // WritableInterfaceRfChannelNr5gDash153Dash5765Dash20 captures enum value "5g-153-5765-20" + WritableInterfaceRfChannelNr5gDash153Dash5765Dash20 string = "5g-153-5765-20" + + // WritableInterfaceRfChannelNr5gDash155Dash5775Dash80 captures enum value "5g-155-5775-80" + WritableInterfaceRfChannelNr5gDash155Dash5775Dash80 string = "5g-155-5775-80" + + // WritableInterfaceRfChannelNr5gDash157Dash5785Dash20 captures enum value "5g-157-5785-20" + WritableInterfaceRfChannelNr5gDash157Dash5785Dash20 string = "5g-157-5785-20" + + // WritableInterfaceRfChannelNr5gDash159Dash5795Dash40 captures enum value "5g-159-5795-40" + WritableInterfaceRfChannelNr5gDash159Dash5795Dash40 string = "5g-159-5795-40" + + // WritableInterfaceRfChannelNr5gDash161Dash5805Dash20 captures enum value "5g-161-5805-20" + WritableInterfaceRfChannelNr5gDash161Dash5805Dash20 string = "5g-161-5805-20" + + // WritableInterfaceRfChannelNr5gDash163Dash5815Dash160 captures enum value "5g-163-5815-160" + WritableInterfaceRfChannelNr5gDash163Dash5815Dash160 string = "5g-163-5815-160" + + // WritableInterfaceRfChannelNr5gDash165Dash5825Dash20 captures enum value "5g-165-5825-20" + WritableInterfaceRfChannelNr5gDash165Dash5825Dash20 string = "5g-165-5825-20" + + // WritableInterfaceRfChannelNr5gDash167Dash5835Dash40 captures enum value "5g-167-5835-40" + WritableInterfaceRfChannelNr5gDash167Dash5835Dash40 string = "5g-167-5835-40" + + // WritableInterfaceRfChannelNr5gDash169Dash5845Dash20 captures enum value "5g-169-5845-20" + WritableInterfaceRfChannelNr5gDash169Dash5845Dash20 string = "5g-169-5845-20" + + // WritableInterfaceRfChannelNr5gDash171Dash5855Dash80 captures enum value "5g-171-5855-80" + WritableInterfaceRfChannelNr5gDash171Dash5855Dash80 string = "5g-171-5855-80" + + // WritableInterfaceRfChannelNr5gDash173Dash5865Dash20 captures enum value "5g-173-5865-20" + WritableInterfaceRfChannelNr5gDash173Dash5865Dash20 string = "5g-173-5865-20" + + // WritableInterfaceRfChannelNr5gDash175Dash5875Dash40 captures enum value "5g-175-5875-40" + WritableInterfaceRfChannelNr5gDash175Dash5875Dash40 string = "5g-175-5875-40" + + // WritableInterfaceRfChannelNr5gDash177Dash5885Dash20 captures enum value "5g-177-5885-20" + WritableInterfaceRfChannelNr5gDash177Dash5885Dash20 string = "5g-177-5885-20" + + // WritableInterfaceRfChannelNr6gDash1Dash5955Dash20 captures enum value "6g-1-5955-20" + WritableInterfaceRfChannelNr6gDash1Dash5955Dash20 string = "6g-1-5955-20" + + // WritableInterfaceRfChannelNr6gDash3Dash5965Dash40 captures enum value "6g-3-5965-40" + WritableInterfaceRfChannelNr6gDash3Dash5965Dash40 string = "6g-3-5965-40" + + // WritableInterfaceRfChannelNr6gDash5Dash5975Dash20 captures enum value "6g-5-5975-20" + WritableInterfaceRfChannelNr6gDash5Dash5975Dash20 string = "6g-5-5975-20" + + // WritableInterfaceRfChannelNr6gDash7Dash5985Dash80 captures enum value "6g-7-5985-80" + WritableInterfaceRfChannelNr6gDash7Dash5985Dash80 string = "6g-7-5985-80" + + // WritableInterfaceRfChannelNr6gDash9Dash5995Dash20 captures enum value "6g-9-5995-20" + WritableInterfaceRfChannelNr6gDash9Dash5995Dash20 string = "6g-9-5995-20" + + // WritableInterfaceRfChannelNr6gDash11Dash6005Dash40 captures enum value "6g-11-6005-40" + WritableInterfaceRfChannelNr6gDash11Dash6005Dash40 string = "6g-11-6005-40" + + // WritableInterfaceRfChannelNr6gDash13Dash6015Dash20 captures enum value "6g-13-6015-20" + WritableInterfaceRfChannelNr6gDash13Dash6015Dash20 string = "6g-13-6015-20" + + // WritableInterfaceRfChannelNr6gDash15Dash6025Dash160 captures enum value "6g-15-6025-160" + WritableInterfaceRfChannelNr6gDash15Dash6025Dash160 string = "6g-15-6025-160" + + // WritableInterfaceRfChannelNr6gDash17Dash6035Dash20 captures enum value "6g-17-6035-20" + WritableInterfaceRfChannelNr6gDash17Dash6035Dash20 string = "6g-17-6035-20" + + // WritableInterfaceRfChannelNr6gDash19Dash6045Dash40 captures enum value "6g-19-6045-40" + WritableInterfaceRfChannelNr6gDash19Dash6045Dash40 string = "6g-19-6045-40" + + // WritableInterfaceRfChannelNr6gDash21Dash6055Dash20 captures enum value "6g-21-6055-20" + WritableInterfaceRfChannelNr6gDash21Dash6055Dash20 string = "6g-21-6055-20" + + // WritableInterfaceRfChannelNr6gDash23Dash6065Dash80 captures enum value "6g-23-6065-80" + WritableInterfaceRfChannelNr6gDash23Dash6065Dash80 string = "6g-23-6065-80" + + // WritableInterfaceRfChannelNr6gDash25Dash6075Dash20 captures enum value "6g-25-6075-20" + WritableInterfaceRfChannelNr6gDash25Dash6075Dash20 string = "6g-25-6075-20" + + // WritableInterfaceRfChannelNr6gDash27Dash6085Dash40 captures enum value "6g-27-6085-40" + WritableInterfaceRfChannelNr6gDash27Dash6085Dash40 string = "6g-27-6085-40" + + // WritableInterfaceRfChannelNr6gDash29Dash6095Dash20 captures enum value "6g-29-6095-20" + WritableInterfaceRfChannelNr6gDash29Dash6095Dash20 string = "6g-29-6095-20" + + // WritableInterfaceRfChannelNr6gDash31Dash6105Dash320 captures enum value "6g-31-6105-320" + WritableInterfaceRfChannelNr6gDash31Dash6105Dash320 string = "6g-31-6105-320" + + // WritableInterfaceRfChannelNr6gDash33Dash6115Dash20 captures enum value "6g-33-6115-20" + WritableInterfaceRfChannelNr6gDash33Dash6115Dash20 string = "6g-33-6115-20" + + // WritableInterfaceRfChannelNr6gDash35Dash6125Dash40 captures enum value "6g-35-6125-40" + WritableInterfaceRfChannelNr6gDash35Dash6125Dash40 string = "6g-35-6125-40" + + // WritableInterfaceRfChannelNr6gDash37Dash6135Dash20 captures enum value "6g-37-6135-20" + WritableInterfaceRfChannelNr6gDash37Dash6135Dash20 string = "6g-37-6135-20" + + // WritableInterfaceRfChannelNr6gDash39Dash6145Dash80 captures enum value "6g-39-6145-80" + WritableInterfaceRfChannelNr6gDash39Dash6145Dash80 string = "6g-39-6145-80" + + // WritableInterfaceRfChannelNr6gDash41Dash6155Dash20 captures enum value "6g-41-6155-20" + WritableInterfaceRfChannelNr6gDash41Dash6155Dash20 string = "6g-41-6155-20" + + // WritableInterfaceRfChannelNr6gDash43Dash6165Dash40 captures enum value "6g-43-6165-40" + WritableInterfaceRfChannelNr6gDash43Dash6165Dash40 string = "6g-43-6165-40" + + // WritableInterfaceRfChannelNr6gDash45Dash6175Dash20 captures enum value "6g-45-6175-20" + WritableInterfaceRfChannelNr6gDash45Dash6175Dash20 string = "6g-45-6175-20" + + // WritableInterfaceRfChannelNr6gDash47Dash6185Dash160 captures enum value "6g-47-6185-160" + WritableInterfaceRfChannelNr6gDash47Dash6185Dash160 string = "6g-47-6185-160" + + // WritableInterfaceRfChannelNr6gDash49Dash6195Dash20 captures enum value "6g-49-6195-20" + WritableInterfaceRfChannelNr6gDash49Dash6195Dash20 string = "6g-49-6195-20" + + // WritableInterfaceRfChannelNr6gDash51Dash6205Dash40 captures enum value "6g-51-6205-40" + WritableInterfaceRfChannelNr6gDash51Dash6205Dash40 string = "6g-51-6205-40" + + // WritableInterfaceRfChannelNr6gDash53Dash6215Dash20 captures enum value "6g-53-6215-20" + WritableInterfaceRfChannelNr6gDash53Dash6215Dash20 string = "6g-53-6215-20" + + // WritableInterfaceRfChannelNr6gDash55Dash6225Dash80 captures enum value "6g-55-6225-80" + WritableInterfaceRfChannelNr6gDash55Dash6225Dash80 string = "6g-55-6225-80" + + // WritableInterfaceRfChannelNr6gDash57Dash6235Dash20 captures enum value "6g-57-6235-20" + WritableInterfaceRfChannelNr6gDash57Dash6235Dash20 string = "6g-57-6235-20" + + // WritableInterfaceRfChannelNr6gDash59Dash6245Dash40 captures enum value "6g-59-6245-40" + WritableInterfaceRfChannelNr6gDash59Dash6245Dash40 string = "6g-59-6245-40" + + // WritableInterfaceRfChannelNr6gDash61Dash6255Dash20 captures enum value "6g-61-6255-20" + WritableInterfaceRfChannelNr6gDash61Dash6255Dash20 string = "6g-61-6255-20" + + // WritableInterfaceRfChannelNr6gDash65Dash6275Dash20 captures enum value "6g-65-6275-20" + WritableInterfaceRfChannelNr6gDash65Dash6275Dash20 string = "6g-65-6275-20" + + // WritableInterfaceRfChannelNr6gDash67Dash6285Dash40 captures enum value "6g-67-6285-40" + WritableInterfaceRfChannelNr6gDash67Dash6285Dash40 string = "6g-67-6285-40" + + // WritableInterfaceRfChannelNr6gDash69Dash6295Dash20 captures enum value "6g-69-6295-20" + WritableInterfaceRfChannelNr6gDash69Dash6295Dash20 string = "6g-69-6295-20" + + // WritableInterfaceRfChannelNr6gDash71Dash6305Dash80 captures enum value "6g-71-6305-80" + WritableInterfaceRfChannelNr6gDash71Dash6305Dash80 string = "6g-71-6305-80" + + // WritableInterfaceRfChannelNr6gDash73Dash6315Dash20 captures enum value "6g-73-6315-20" + WritableInterfaceRfChannelNr6gDash73Dash6315Dash20 string = "6g-73-6315-20" + + // WritableInterfaceRfChannelNr6gDash75Dash6325Dash40 captures enum value "6g-75-6325-40" + WritableInterfaceRfChannelNr6gDash75Dash6325Dash40 string = "6g-75-6325-40" + + // WritableInterfaceRfChannelNr6gDash77Dash6335Dash20 captures enum value "6g-77-6335-20" + WritableInterfaceRfChannelNr6gDash77Dash6335Dash20 string = "6g-77-6335-20" + + // WritableInterfaceRfChannelNr6gDash79Dash6345Dash160 captures enum value "6g-79-6345-160" + WritableInterfaceRfChannelNr6gDash79Dash6345Dash160 string = "6g-79-6345-160" + + // WritableInterfaceRfChannelNr6gDash81Dash6355Dash20 captures enum value "6g-81-6355-20" + WritableInterfaceRfChannelNr6gDash81Dash6355Dash20 string = "6g-81-6355-20" + + // WritableInterfaceRfChannelNr6gDash83Dash6365Dash40 captures enum value "6g-83-6365-40" + WritableInterfaceRfChannelNr6gDash83Dash6365Dash40 string = "6g-83-6365-40" + + // WritableInterfaceRfChannelNr6gDash85Dash6375Dash20 captures enum value "6g-85-6375-20" + WritableInterfaceRfChannelNr6gDash85Dash6375Dash20 string = "6g-85-6375-20" + + // WritableInterfaceRfChannelNr6gDash87Dash6385Dash80 captures enum value "6g-87-6385-80" + WritableInterfaceRfChannelNr6gDash87Dash6385Dash80 string = "6g-87-6385-80" + + // WritableInterfaceRfChannelNr6gDash89Dash6395Dash20 captures enum value "6g-89-6395-20" + WritableInterfaceRfChannelNr6gDash89Dash6395Dash20 string = "6g-89-6395-20" + + // WritableInterfaceRfChannelNr6gDash91Dash6405Dash40 captures enum value "6g-91-6405-40" + WritableInterfaceRfChannelNr6gDash91Dash6405Dash40 string = "6g-91-6405-40" + + // WritableInterfaceRfChannelNr6gDash93Dash6415Dash20 captures enum value "6g-93-6415-20" + WritableInterfaceRfChannelNr6gDash93Dash6415Dash20 string = "6g-93-6415-20" + + // WritableInterfaceRfChannelNr6gDash95Dash6425Dash320 captures enum value "6g-95-6425-320" + WritableInterfaceRfChannelNr6gDash95Dash6425Dash320 string = "6g-95-6425-320" + + // WritableInterfaceRfChannelNr6gDash97Dash6435Dash20 captures enum value "6g-97-6435-20" + WritableInterfaceRfChannelNr6gDash97Dash6435Dash20 string = "6g-97-6435-20" + + // WritableInterfaceRfChannelNr6gDash99Dash6445Dash40 captures enum value "6g-99-6445-40" + WritableInterfaceRfChannelNr6gDash99Dash6445Dash40 string = "6g-99-6445-40" + + // WritableInterfaceRfChannelNr6gDash101Dash6455Dash20 captures enum value "6g-101-6455-20" + WritableInterfaceRfChannelNr6gDash101Dash6455Dash20 string = "6g-101-6455-20" + + // WritableInterfaceRfChannelNr6gDash103Dash6465Dash80 captures enum value "6g-103-6465-80" + WritableInterfaceRfChannelNr6gDash103Dash6465Dash80 string = "6g-103-6465-80" + + // WritableInterfaceRfChannelNr6gDash105Dash6475Dash20 captures enum value "6g-105-6475-20" + WritableInterfaceRfChannelNr6gDash105Dash6475Dash20 string = "6g-105-6475-20" + + // WritableInterfaceRfChannelNr6gDash107Dash6485Dash40 captures enum value "6g-107-6485-40" + WritableInterfaceRfChannelNr6gDash107Dash6485Dash40 string = "6g-107-6485-40" + + // WritableInterfaceRfChannelNr6gDash109Dash6495Dash20 captures enum value "6g-109-6495-20" + WritableInterfaceRfChannelNr6gDash109Dash6495Dash20 string = "6g-109-6495-20" + + // WritableInterfaceRfChannelNr6gDash111Dash6505Dash160 captures enum value "6g-111-6505-160" + WritableInterfaceRfChannelNr6gDash111Dash6505Dash160 string = "6g-111-6505-160" + + // WritableInterfaceRfChannelNr6gDash113Dash6515Dash20 captures enum value "6g-113-6515-20" + WritableInterfaceRfChannelNr6gDash113Dash6515Dash20 string = "6g-113-6515-20" + + // WritableInterfaceRfChannelNr6gDash115Dash6525Dash40 captures enum value "6g-115-6525-40" + WritableInterfaceRfChannelNr6gDash115Dash6525Dash40 string = "6g-115-6525-40" + + // WritableInterfaceRfChannelNr6gDash117Dash6535Dash20 captures enum value "6g-117-6535-20" + WritableInterfaceRfChannelNr6gDash117Dash6535Dash20 string = "6g-117-6535-20" + + // WritableInterfaceRfChannelNr6gDash119Dash6545Dash80 captures enum value "6g-119-6545-80" + WritableInterfaceRfChannelNr6gDash119Dash6545Dash80 string = "6g-119-6545-80" + + // WritableInterfaceRfChannelNr6gDash121Dash6555Dash20 captures enum value "6g-121-6555-20" + WritableInterfaceRfChannelNr6gDash121Dash6555Dash20 string = "6g-121-6555-20" + + // WritableInterfaceRfChannelNr6gDash123Dash6565Dash40 captures enum value "6g-123-6565-40" + WritableInterfaceRfChannelNr6gDash123Dash6565Dash40 string = "6g-123-6565-40" + + // WritableInterfaceRfChannelNr6gDash125Dash6575Dash20 captures enum value "6g-125-6575-20" + WritableInterfaceRfChannelNr6gDash125Dash6575Dash20 string = "6g-125-6575-20" + + // WritableInterfaceRfChannelNr6gDash129Dash6595Dash20 captures enum value "6g-129-6595-20" + WritableInterfaceRfChannelNr6gDash129Dash6595Dash20 string = "6g-129-6595-20" + + // WritableInterfaceRfChannelNr6gDash131Dash6605Dash40 captures enum value "6g-131-6605-40" + WritableInterfaceRfChannelNr6gDash131Dash6605Dash40 string = "6g-131-6605-40" + + // WritableInterfaceRfChannelNr6gDash133Dash6615Dash20 captures enum value "6g-133-6615-20" + WritableInterfaceRfChannelNr6gDash133Dash6615Dash20 string = "6g-133-6615-20" + + // WritableInterfaceRfChannelNr6gDash135Dash6625Dash80 captures enum value "6g-135-6625-80" + WritableInterfaceRfChannelNr6gDash135Dash6625Dash80 string = "6g-135-6625-80" + + // WritableInterfaceRfChannelNr6gDash137Dash6635Dash20 captures enum value "6g-137-6635-20" + WritableInterfaceRfChannelNr6gDash137Dash6635Dash20 string = "6g-137-6635-20" + + // WritableInterfaceRfChannelNr6gDash139Dash6645Dash40 captures enum value "6g-139-6645-40" + WritableInterfaceRfChannelNr6gDash139Dash6645Dash40 string = "6g-139-6645-40" + + // WritableInterfaceRfChannelNr6gDash141Dash6655Dash20 captures enum value "6g-141-6655-20" + WritableInterfaceRfChannelNr6gDash141Dash6655Dash20 string = "6g-141-6655-20" + + // WritableInterfaceRfChannelNr6gDash143Dash6665Dash160 captures enum value "6g-143-6665-160" + WritableInterfaceRfChannelNr6gDash143Dash6665Dash160 string = "6g-143-6665-160" + + // WritableInterfaceRfChannelNr6gDash145Dash6675Dash20 captures enum value "6g-145-6675-20" + WritableInterfaceRfChannelNr6gDash145Dash6675Dash20 string = "6g-145-6675-20" + + // WritableInterfaceRfChannelNr6gDash147Dash6685Dash40 captures enum value "6g-147-6685-40" + WritableInterfaceRfChannelNr6gDash147Dash6685Dash40 string = "6g-147-6685-40" + + // WritableInterfaceRfChannelNr6gDash149Dash6695Dash20 captures enum value "6g-149-6695-20" + WritableInterfaceRfChannelNr6gDash149Dash6695Dash20 string = "6g-149-6695-20" + + // WritableInterfaceRfChannelNr6gDash151Dash6705Dash80 captures enum value "6g-151-6705-80" + WritableInterfaceRfChannelNr6gDash151Dash6705Dash80 string = "6g-151-6705-80" + + // WritableInterfaceRfChannelNr6gDash153Dash6715Dash20 captures enum value "6g-153-6715-20" + WritableInterfaceRfChannelNr6gDash153Dash6715Dash20 string = "6g-153-6715-20" + + // WritableInterfaceRfChannelNr6gDash155Dash6725Dash40 captures enum value "6g-155-6725-40" + WritableInterfaceRfChannelNr6gDash155Dash6725Dash40 string = "6g-155-6725-40" + + // WritableInterfaceRfChannelNr6gDash157Dash6735Dash20 captures enum value "6g-157-6735-20" + WritableInterfaceRfChannelNr6gDash157Dash6735Dash20 string = "6g-157-6735-20" + + // WritableInterfaceRfChannelNr6gDash159Dash6745Dash320 captures enum value "6g-159-6745-320" + WritableInterfaceRfChannelNr6gDash159Dash6745Dash320 string = "6g-159-6745-320" + + // WritableInterfaceRfChannelNr6gDash161Dash6755Dash20 captures enum value "6g-161-6755-20" + WritableInterfaceRfChannelNr6gDash161Dash6755Dash20 string = "6g-161-6755-20" + + // WritableInterfaceRfChannelNr6gDash163Dash6765Dash40 captures enum value "6g-163-6765-40" + WritableInterfaceRfChannelNr6gDash163Dash6765Dash40 string = "6g-163-6765-40" + + // WritableInterfaceRfChannelNr6gDash165Dash6775Dash20 captures enum value "6g-165-6775-20" + WritableInterfaceRfChannelNr6gDash165Dash6775Dash20 string = "6g-165-6775-20" + + // WritableInterfaceRfChannelNr6gDash167Dash6785Dash80 captures enum value "6g-167-6785-80" + WritableInterfaceRfChannelNr6gDash167Dash6785Dash80 string = "6g-167-6785-80" + + // WritableInterfaceRfChannelNr6gDash169Dash6795Dash20 captures enum value "6g-169-6795-20" + WritableInterfaceRfChannelNr6gDash169Dash6795Dash20 string = "6g-169-6795-20" + + // WritableInterfaceRfChannelNr6gDash171Dash6805Dash40 captures enum value "6g-171-6805-40" + WritableInterfaceRfChannelNr6gDash171Dash6805Dash40 string = "6g-171-6805-40" + + // WritableInterfaceRfChannelNr6gDash173Dash6815Dash20 captures enum value "6g-173-6815-20" + WritableInterfaceRfChannelNr6gDash173Dash6815Dash20 string = "6g-173-6815-20" + + // WritableInterfaceRfChannelNr6gDash175Dash6825Dash160 captures enum value "6g-175-6825-160" + WritableInterfaceRfChannelNr6gDash175Dash6825Dash160 string = "6g-175-6825-160" + + // WritableInterfaceRfChannelNr6gDash177Dash6835Dash20 captures enum value "6g-177-6835-20" + WritableInterfaceRfChannelNr6gDash177Dash6835Dash20 string = "6g-177-6835-20" + + // WritableInterfaceRfChannelNr6gDash179Dash6845Dash40 captures enum value "6g-179-6845-40" + WritableInterfaceRfChannelNr6gDash179Dash6845Dash40 string = "6g-179-6845-40" + + // WritableInterfaceRfChannelNr6gDash181Dash6855Dash20 captures enum value "6g-181-6855-20" + WritableInterfaceRfChannelNr6gDash181Dash6855Dash20 string = "6g-181-6855-20" + + // WritableInterfaceRfChannelNr6gDash183Dash6865Dash80 captures enum value "6g-183-6865-80" + WritableInterfaceRfChannelNr6gDash183Dash6865Dash80 string = "6g-183-6865-80" + + // WritableInterfaceRfChannelNr6gDash185Dash6875Dash20 captures enum value "6g-185-6875-20" + WritableInterfaceRfChannelNr6gDash185Dash6875Dash20 string = "6g-185-6875-20" + + // WritableInterfaceRfChannelNr6gDash187Dash6885Dash40 captures enum value "6g-187-6885-40" + WritableInterfaceRfChannelNr6gDash187Dash6885Dash40 string = "6g-187-6885-40" + + // WritableInterfaceRfChannelNr6gDash189Dash6895Dash20 captures enum value "6g-189-6895-20" + WritableInterfaceRfChannelNr6gDash189Dash6895Dash20 string = "6g-189-6895-20" + + // WritableInterfaceRfChannelNr6gDash193Dash6915Dash20 captures enum value "6g-193-6915-20" + WritableInterfaceRfChannelNr6gDash193Dash6915Dash20 string = "6g-193-6915-20" + + // WritableInterfaceRfChannelNr6gDash195Dash6925Dash40 captures enum value "6g-195-6925-40" + WritableInterfaceRfChannelNr6gDash195Dash6925Dash40 string = "6g-195-6925-40" + + // WritableInterfaceRfChannelNr6gDash197Dash6935Dash20 captures enum value "6g-197-6935-20" + WritableInterfaceRfChannelNr6gDash197Dash6935Dash20 string = "6g-197-6935-20" + + // WritableInterfaceRfChannelNr6gDash199Dash6945Dash80 captures enum value "6g-199-6945-80" + WritableInterfaceRfChannelNr6gDash199Dash6945Dash80 string = "6g-199-6945-80" + + // WritableInterfaceRfChannelNr6gDash201Dash6955Dash20 captures enum value "6g-201-6955-20" + WritableInterfaceRfChannelNr6gDash201Dash6955Dash20 string = "6g-201-6955-20" + + // WritableInterfaceRfChannelNr6gDash203Dash6965Dash40 captures enum value "6g-203-6965-40" + WritableInterfaceRfChannelNr6gDash203Dash6965Dash40 string = "6g-203-6965-40" + + // WritableInterfaceRfChannelNr6gDash205Dash6975Dash20 captures enum value "6g-205-6975-20" + WritableInterfaceRfChannelNr6gDash205Dash6975Dash20 string = "6g-205-6975-20" + + // WritableInterfaceRfChannelNr6gDash207Dash6985Dash160 captures enum value "6g-207-6985-160" + WritableInterfaceRfChannelNr6gDash207Dash6985Dash160 string = "6g-207-6985-160" + + // WritableInterfaceRfChannelNr6gDash209Dash6995Dash20 captures enum value "6g-209-6995-20" + WritableInterfaceRfChannelNr6gDash209Dash6995Dash20 string = "6g-209-6995-20" + + // WritableInterfaceRfChannelNr6gDash211Dash7005Dash40 captures enum value "6g-211-7005-40" + WritableInterfaceRfChannelNr6gDash211Dash7005Dash40 string = "6g-211-7005-40" + + // WritableInterfaceRfChannelNr6gDash213Dash7015Dash20 captures enum value "6g-213-7015-20" + WritableInterfaceRfChannelNr6gDash213Dash7015Dash20 string = "6g-213-7015-20" + + // WritableInterfaceRfChannelNr6gDash215Dash7025Dash80 captures enum value "6g-215-7025-80" + WritableInterfaceRfChannelNr6gDash215Dash7025Dash80 string = "6g-215-7025-80" + + // WritableInterfaceRfChannelNr6gDash217Dash7035Dash20 captures enum value "6g-217-7035-20" + WritableInterfaceRfChannelNr6gDash217Dash7035Dash20 string = "6g-217-7035-20" + + // WritableInterfaceRfChannelNr6gDash219Dash7045Dash40 captures enum value "6g-219-7045-40" + WritableInterfaceRfChannelNr6gDash219Dash7045Dash40 string = "6g-219-7045-40" + + // WritableInterfaceRfChannelNr6gDash221Dash7055Dash20 captures enum value "6g-221-7055-20" + WritableInterfaceRfChannelNr6gDash221Dash7055Dash20 string = "6g-221-7055-20" + + // WritableInterfaceRfChannelNr6gDash225Dash7075Dash20 captures enum value "6g-225-7075-20" + WritableInterfaceRfChannelNr6gDash225Dash7075Dash20 string = "6g-225-7075-20" + + // WritableInterfaceRfChannelNr6gDash227Dash7085Dash40 captures enum value "6g-227-7085-40" + WritableInterfaceRfChannelNr6gDash227Dash7085Dash40 string = "6g-227-7085-40" + + // WritableInterfaceRfChannelNr6gDash229Dash7095Dash20 captures enum value "6g-229-7095-20" + WritableInterfaceRfChannelNr6gDash229Dash7095Dash20 string = "6g-229-7095-20" + + // WritableInterfaceRfChannelNr6gDash233Dash7115Dash20 captures enum value "6g-233-7115-20" + WritableInterfaceRfChannelNr6gDash233Dash7115Dash20 string = "6g-233-7115-20" + + // WritableInterfaceRfChannelNr60gDash1Dash58320Dash2160 captures enum value "60g-1-58320-2160" + WritableInterfaceRfChannelNr60gDash1Dash58320Dash2160 string = "60g-1-58320-2160" + + // WritableInterfaceRfChannelNr60gDash2Dash60480Dash2160 captures enum value "60g-2-60480-2160" + WritableInterfaceRfChannelNr60gDash2Dash60480Dash2160 string = "60g-2-60480-2160" + + // WritableInterfaceRfChannelNr60gDash3Dash62640Dash2160 captures enum value "60g-3-62640-2160" + WritableInterfaceRfChannelNr60gDash3Dash62640Dash2160 string = "60g-3-62640-2160" + + // WritableInterfaceRfChannelNr60gDash4Dash64800Dash2160 captures enum value "60g-4-64800-2160" + WritableInterfaceRfChannelNr60gDash4Dash64800Dash2160 string = "60g-4-64800-2160" + + // WritableInterfaceRfChannelNr60gDash5Dash66960Dash2160 captures enum value "60g-5-66960-2160" + WritableInterfaceRfChannelNr60gDash5Dash66960Dash2160 string = "60g-5-66960-2160" + + // WritableInterfaceRfChannelNr60gDash6Dash69120Dash2160 captures enum value "60g-6-69120-2160" + WritableInterfaceRfChannelNr60gDash6Dash69120Dash2160 string = "60g-6-69120-2160" + + // WritableInterfaceRfChannelNr60gDash9Dash59400Dash4320 captures enum value "60g-9-59400-4320" + WritableInterfaceRfChannelNr60gDash9Dash59400Dash4320 string = "60g-9-59400-4320" + + // WritableInterfaceRfChannelNr60gDash10Dash61560Dash4320 captures enum value "60g-10-61560-4320" + WritableInterfaceRfChannelNr60gDash10Dash61560Dash4320 string = "60g-10-61560-4320" + + // WritableInterfaceRfChannelNr60gDash11Dash63720Dash4320 captures enum value "60g-11-63720-4320" + WritableInterfaceRfChannelNr60gDash11Dash63720Dash4320 string = "60g-11-63720-4320" + + // WritableInterfaceRfChannelNr60gDash12Dash65880Dash4320 captures enum value "60g-12-65880-4320" + WritableInterfaceRfChannelNr60gDash12Dash65880Dash4320 string = "60g-12-65880-4320" + + // WritableInterfaceRfChannelNr60gDash13Dash68040Dash4320 captures enum value "60g-13-68040-4320" + WritableInterfaceRfChannelNr60gDash13Dash68040Dash4320 string = "60g-13-68040-4320" + + // WritableInterfaceRfChannelNr60gDash17Dash60480Dash6480 captures enum value "60g-17-60480-6480" + WritableInterfaceRfChannelNr60gDash17Dash60480Dash6480 string = "60g-17-60480-6480" + + // WritableInterfaceRfChannelNr60gDash18Dash62640Dash6480 captures enum value "60g-18-62640-6480" + WritableInterfaceRfChannelNr60gDash18Dash62640Dash6480 string = "60g-18-62640-6480" + + // WritableInterfaceRfChannelNr60gDash19Dash64800Dash6480 captures enum value "60g-19-64800-6480" + WritableInterfaceRfChannelNr60gDash19Dash64800Dash6480 string = "60g-19-64800-6480" + + // WritableInterfaceRfChannelNr60gDash20Dash66960Dash6480 captures enum value "60g-20-66960-6480" + WritableInterfaceRfChannelNr60gDash20Dash66960Dash6480 string = "60g-20-66960-6480" + + // WritableInterfaceRfChannelNr60gDash25Dash61560Dash6480 captures enum value "60g-25-61560-6480" + WritableInterfaceRfChannelNr60gDash25Dash61560Dash6480 string = "60g-25-61560-6480" + + // WritableInterfaceRfChannelNr60gDash26Dash63720Dash6480 captures enum value "60g-26-63720-6480" + WritableInterfaceRfChannelNr60gDash26Dash63720Dash6480 string = "60g-26-63720-6480" + + // WritableInterfaceRfChannelNr60gDash27Dash65880Dash6480 captures enum value "60g-27-65880-6480" + WritableInterfaceRfChannelNr60gDash27Dash65880Dash6480 string = "60g-27-65880-6480" +) + +// prop value enum +func (m *WritableInterface) validateRfChannelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTypeRfChannelPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterface) validateRfChannel(formats strfmt.Registry) error { + if swag.IsZero(m.RfChannel) { // not required + return nil + } + + // value enum + if err := m.validateRfChannelEnum("rf_channel", "body", m.RfChannel); err != nil { + return err + } + + return nil +} + +var writableInterfaceTypeRfRolePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ap","station"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableInterfaceTypeRfRolePropEnum = append(writableInterfaceTypeRfRolePropEnum, v) + } +} + +const ( + + // WritableInterfaceRfRoleAp captures enum value "ap" + WritableInterfaceRfRoleAp string = "ap" + + // WritableInterfaceRfRoleStation captures enum value "station" + WritableInterfaceRfRoleStation string = "station" +) + +// prop value enum +func (m *WritableInterface) validateRfRoleEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableInterfaceTypeRfRolePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableInterface) validateRfRole(formats strfmt.Registry) error { + if swag.IsZero(m.RfRole) { // not required + return nil + } + + // value enum + if err := m.validateRfRoleEnum("rf_role", "body", m.RfRole); err != nil { + return err + } + + return nil +} + +func (m *WritableInterface) validateSpeed(formats strfmt.Registry) error { + if swag.IsZero(m.Speed) { // not required + return nil + } + + if err := validate.MinimumInt("speed", "body", *m.Speed, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("speed", "body", *m.Speed, 2.147483647e+09, false); err != nil { + return err + } + + return nil +} + func (m *WritableInterface) validateTaggedVlans(formats strfmt.Registry) error { if swag.IsZero(m.TaggedVlans) { // not required return nil @@ -408,6 +1217,8 @@ func (m *WritableInterface) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -418,11 +1229,27 @@ func (m *WritableInterface) validateTags(formats strfmt.Registry) error { return nil } +func (m *WritableInterface) validateTxPower(formats strfmt.Registry) error { + if swag.IsZero(m.TxPower) { // not required + return nil + } + + if err := validate.MinimumInt("tx_power", "body", *m.TxPower, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("tx_power", "body", *m.TxPower, 127, false); err != nil { + return err + } + + return nil +} + var writableInterfaceTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-sfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -435,6 +1262,9 @@ const ( // WritableInterfaceTypeVirtual captures enum value "virtual" WritableInterfaceTypeVirtual string = "virtual" + // WritableInterfaceTypeBridge captures enum value "bridge" + WritableInterfaceTypeBridge string = "bridge" + // WritableInterfaceTypeLag captures enum value "lag" WritableInterfaceTypeLag string = "lag" @@ -531,6 +1361,9 @@ const ( // WritableInterfaceTypeIeee802Dot11ax captures enum value "ieee802.11ax" WritableInterfaceTypeIeee802Dot11ax string = "ieee802.11ax" + // WritableInterfaceTypeIeee802Dot15Dot1 captures enum value "ieee802.15.1" + WritableInterfaceTypeIeee802Dot15Dot1 string = "ieee802.15.1" + // WritableInterfaceTypeGsm captures enum value "gsm" WritableInterfaceTypeGsm string = "gsm" @@ -582,8 +1415,8 @@ const ( // WritableInterfaceTypeNr64gfcDashQsfpp captures enum value "64gfc-qsfpp" WritableInterfaceTypeNr64gfcDashQsfpp string = "64gfc-qsfpp" - // WritableInterfaceTypeNr128gfcDashSfp28 captures enum value "128gfc-sfp28" - WritableInterfaceTypeNr128gfcDashSfp28 string = "128gfc-sfp28" + // WritableInterfaceTypeNr128gfcDashQsfp28 captures enum value "128gfc-qsfp28" + WritableInterfaceTypeNr128gfcDashQsfp28 string = "128gfc-qsfp28" // WritableInterfaceTypeInfinibandDashSdr captures enum value "infiniband-sdr" WritableInterfaceTypeInfinibandDashSdr string = "infiniband-sdr" @@ -624,6 +1457,9 @@ const ( // WritableInterfaceTypeE3 captures enum value "e3" WritableInterfaceTypeE3 string = "e3" + // WritableInterfaceTypeXdsl captures enum value "xdsl" + WritableInterfaceTypeXdsl string = "xdsl" + // WritableInterfaceTypeCiscoDashStackwise captures enum value "cisco-stackwise" WritableInterfaceTypeCiscoDashStackwise string = "cisco-stackwise" @@ -636,6 +1472,18 @@ const ( // WritableInterfaceTypeCiscoDashFlexstackDashPlus captures enum value "cisco-flexstack-plus" WritableInterfaceTypeCiscoDashFlexstackDashPlus string = "cisco-flexstack-plus" + // WritableInterfaceTypeCiscoDashStackwiseDash80 captures enum value "cisco-stackwise-80" + WritableInterfaceTypeCiscoDashStackwiseDash80 string = "cisco-stackwise-80" + + // WritableInterfaceTypeCiscoDashStackwiseDash160 captures enum value "cisco-stackwise-160" + WritableInterfaceTypeCiscoDashStackwiseDash160 string = "cisco-stackwise-160" + + // WritableInterfaceTypeCiscoDashStackwiseDash320 captures enum value "cisco-stackwise-320" + WritableInterfaceTypeCiscoDashStackwiseDash320 string = "cisco-stackwise-320" + + // WritableInterfaceTypeCiscoDashStackwiseDash480 captures enum value "cisco-stackwise-480" + WritableInterfaceTypeCiscoDashStackwiseDash480 string = "cisco-stackwise-480" + // WritableInterfaceTypeJuniperDashVcp captures enum value "juniper-vcp" WritableInterfaceTypeJuniperDashVcp string = "juniper-vcp" @@ -689,6 +1537,18 @@ func (m *WritableInterface) validateURL(formats strfmt.Registry) error { return nil } +func (m *WritableInterface) validateWirelessLans(formats strfmt.Registry) error { + if swag.IsZero(m.WirelessLans) { // not required + return nil + } + + if err := validate.UniqueItems("wireless_lans", "body", m.WirelessLans); err != nil { + return err + } + + return nil +} + // ContextValidate validate this writable interface based on the context it is used func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -701,7 +1561,7 @@ func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -713,6 +1573,10 @@ func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateCountFhrpGroups(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCountIpaddresses(ctx, formats); err != nil { res = append(res, err) } @@ -733,6 +1597,14 @@ func (m *WritableInterface) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -762,6 +1634,8 @@ func (m *WritableInterface) contextValidateCable(ctx context.Context, formats st if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -770,11 +1644,7 @@ func (m *WritableInterface) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritableInterface) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *WritableInterface) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -797,6 +1667,15 @@ func (m *WritableInterface) contextValidateConnectedEndpointType(ctx context.Con return nil } +func (m *WritableInterface) contextValidateCountFhrpGroups(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "count_fhrp_groups", "body", int64(m.CountFhrpGroups)); err != nil { + return err + } + + return nil +} + func (m *WritableInterface) contextValidateCountIpaddresses(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "count_ipaddresses", "body", int64(m.CountIpaddresses)); err != nil { @@ -808,7 +1687,7 @@ func (m *WritableInterface) contextValidateCountIpaddresses(ctx context.Context, func (m *WritableInterface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -842,6 +1721,20 @@ func (m *WritableInterface) contextValidateLastUpdated(ctx context.Context, form return nil } +func (m *WritableInterface) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableInterface) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritableInterface) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -850,6 +1743,8 @@ func (m *WritableInterface) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_interface_template.go b/netbox/models/writable_interface_template.go index e43735e03..ce0a2b0f0 100644 --- a/netbox/models/writable_interface_template.go +++ b/netbox/models/writable_interface_template.go @@ -37,8 +37,8 @@ type WritableInterfaceTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -52,7 +52,7 @@ type WritableInterfaceTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -78,7 +78,7 @@ type WritableInterfaceTemplate struct { // Type // Required: true - // Enum: [virtual lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-sfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] + // Enum: [virtual bridge lag 100base-tx 1000base-t 2.5gbase-t 5gbase-t 10gbase-t 10gbase-cx4 1000base-x-gbic 1000base-x-sfp 10gbase-x-sfpp 10gbase-x-xfp 10gbase-x-xenpak 10gbase-x-x2 25gbase-x-sfp28 50gbase-x-sfp56 40gbase-x-qsfpp 50gbase-x-sfp28 100gbase-x-cfp 100gbase-x-cfp2 200gbase-x-cfp2 100gbase-x-cfp4 100gbase-x-cpak 100gbase-x-qsfp28 200gbase-x-qsfp56 400gbase-x-qsfpdd 400gbase-x-osfp ieee802.11a ieee802.11g ieee802.11n ieee802.11ac ieee802.11ad ieee802.11ax ieee802.15.1 gsm cdma lte sonet-oc3 sonet-oc12 sonet-oc48 sonet-oc192 sonet-oc768 sonet-oc1920 sonet-oc3840 1gfc-sfp 2gfc-sfp 4gfc-sfp 8gfc-sfpp 16gfc-sfpp 32gfc-sfp28 64gfc-qsfpp 128gfc-qsfp28 infiniband-sdr infiniband-ddr infiniband-qdr infiniband-fdr10 infiniband-fdr infiniband-edr infiniband-hdr infiniband-ndr infiniband-xdr t1 e1 t3 e3 xdsl cisco-stackwise cisco-stackwise-plus cisco-flexstack cisco-flexstack-plus cisco-stackwise-80 cisco-stackwise-160 cisco-stackwise-320 cisco-stackwise-480 juniper-vcp extreme-summitstack extreme-summitstack-128 extreme-summitstack-256 extreme-summitstack-512 other] Type *string `json:"type"` // Url @@ -134,7 +134,7 @@ func (m *WritableInterfaceTemplate) validateCreated(formats strfmt.Registry) err return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -207,7 +207,7 @@ var writableInterfaceTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["virtual","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-sfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["virtual","bridge","lag","100base-tx","1000base-t","2.5gbase-t","5gbase-t","10gbase-t","10gbase-cx4","1000base-x-gbic","1000base-x-sfp","10gbase-x-sfpp","10gbase-x-xfp","10gbase-x-xenpak","10gbase-x-x2","25gbase-x-sfp28","50gbase-x-sfp56","40gbase-x-qsfpp","50gbase-x-sfp28","100gbase-x-cfp","100gbase-x-cfp2","200gbase-x-cfp2","100gbase-x-cfp4","100gbase-x-cpak","100gbase-x-qsfp28","200gbase-x-qsfp56","400gbase-x-qsfpdd","400gbase-x-osfp","ieee802.11a","ieee802.11g","ieee802.11n","ieee802.11ac","ieee802.11ad","ieee802.11ax","ieee802.15.1","gsm","cdma","lte","sonet-oc3","sonet-oc12","sonet-oc48","sonet-oc192","sonet-oc768","sonet-oc1920","sonet-oc3840","1gfc-sfp","2gfc-sfp","4gfc-sfp","8gfc-sfpp","16gfc-sfpp","32gfc-sfp28","64gfc-qsfpp","128gfc-qsfp28","infiniband-sdr","infiniband-ddr","infiniband-qdr","infiniband-fdr10","infiniband-fdr","infiniband-edr","infiniband-hdr","infiniband-ndr","infiniband-xdr","t1","e1","t3","e3","xdsl","cisco-stackwise","cisco-stackwise-plus","cisco-flexstack","cisco-flexstack-plus","cisco-stackwise-80","cisco-stackwise-160","cisco-stackwise-320","cisco-stackwise-480","juniper-vcp","extreme-summitstack","extreme-summitstack-128","extreme-summitstack-256","extreme-summitstack-512","other"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -220,6 +220,9 @@ const ( // WritableInterfaceTemplateTypeVirtual captures enum value "virtual" WritableInterfaceTemplateTypeVirtual string = "virtual" + // WritableInterfaceTemplateTypeBridge captures enum value "bridge" + WritableInterfaceTemplateTypeBridge string = "bridge" + // WritableInterfaceTemplateTypeLag captures enum value "lag" WritableInterfaceTemplateTypeLag string = "lag" @@ -316,6 +319,9 @@ const ( // WritableInterfaceTemplateTypeIeee802Dot11ax captures enum value "ieee802.11ax" WritableInterfaceTemplateTypeIeee802Dot11ax string = "ieee802.11ax" + // WritableInterfaceTemplateTypeIeee802Dot15Dot1 captures enum value "ieee802.15.1" + WritableInterfaceTemplateTypeIeee802Dot15Dot1 string = "ieee802.15.1" + // WritableInterfaceTemplateTypeGsm captures enum value "gsm" WritableInterfaceTemplateTypeGsm string = "gsm" @@ -367,8 +373,8 @@ const ( // WritableInterfaceTemplateTypeNr64gfcDashQsfpp captures enum value "64gfc-qsfpp" WritableInterfaceTemplateTypeNr64gfcDashQsfpp string = "64gfc-qsfpp" - // WritableInterfaceTemplateTypeNr128gfcDashSfp28 captures enum value "128gfc-sfp28" - WritableInterfaceTemplateTypeNr128gfcDashSfp28 string = "128gfc-sfp28" + // WritableInterfaceTemplateTypeNr128gfcDashQsfp28 captures enum value "128gfc-qsfp28" + WritableInterfaceTemplateTypeNr128gfcDashQsfp28 string = "128gfc-qsfp28" // WritableInterfaceTemplateTypeInfinibandDashSdr captures enum value "infiniband-sdr" WritableInterfaceTemplateTypeInfinibandDashSdr string = "infiniband-sdr" @@ -409,6 +415,9 @@ const ( // WritableInterfaceTemplateTypeE3 captures enum value "e3" WritableInterfaceTemplateTypeE3 string = "e3" + // WritableInterfaceTemplateTypeXdsl captures enum value "xdsl" + WritableInterfaceTemplateTypeXdsl string = "xdsl" + // WritableInterfaceTemplateTypeCiscoDashStackwise captures enum value "cisco-stackwise" WritableInterfaceTemplateTypeCiscoDashStackwise string = "cisco-stackwise" @@ -421,6 +430,18 @@ const ( // WritableInterfaceTemplateTypeCiscoDashFlexstackDashPlus captures enum value "cisco-flexstack-plus" WritableInterfaceTemplateTypeCiscoDashFlexstackDashPlus string = "cisco-flexstack-plus" + // WritableInterfaceTemplateTypeCiscoDashStackwiseDash80 captures enum value "cisco-stackwise-80" + WritableInterfaceTemplateTypeCiscoDashStackwiseDash80 string = "cisco-stackwise-80" + + // WritableInterfaceTemplateTypeCiscoDashStackwiseDash160 captures enum value "cisco-stackwise-160" + WritableInterfaceTemplateTypeCiscoDashStackwiseDash160 string = "cisco-stackwise-160" + + // WritableInterfaceTemplateTypeCiscoDashStackwiseDash320 captures enum value "cisco-stackwise-320" + WritableInterfaceTemplateTypeCiscoDashStackwiseDash320 string = "cisco-stackwise-320" + + // WritableInterfaceTemplateTypeCiscoDashStackwiseDash480 captures enum value "cisco-stackwise-480" + WritableInterfaceTemplateTypeCiscoDashStackwiseDash480 string = "cisco-stackwise-480" + // WritableInterfaceTemplateTypeJuniperDashVcp captures enum value "juniper-vcp" WritableInterfaceTemplateTypeJuniperDashVcp string = "juniper-vcp" @@ -506,7 +527,7 @@ func (m *WritableInterfaceTemplate) ContextValidate(ctx context.Context, formats func (m *WritableInterfaceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_inventory_item.go b/netbox/models/writable_inventory_item.go index a62398918..908d61e33 100644 --- a/netbox/models/writable_inventory_item.go +++ b/netbox/models/writable_inventory_item.go @@ -45,10 +45,22 @@ type WritableInventoryItem struct { // Max Length: 50 AssetTag *string `json:"asset_tag,omitempty"` + // Component + // Read Only: true + Component map[string]*string `json:"component,omitempty"` + + // Component id + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + ComponentID *int64 `json:"component_id,omitempty"` + + // Component type + ComponentType *string `json:"component_type,omitempty"` + // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -70,7 +82,7 @@ type WritableInventoryItem struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -103,6 +115,9 @@ type WritableInventoryItem struct { // Max Length: 50 PartID string `json:"part_id,omitempty"` + // Role + Role *int64 `json:"role,omitempty"` + // Serial number // Max Length: 50 Serial string `json:"serial,omitempty"` @@ -124,6 +139,10 @@ func (m *WritableInventoryItem) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateComponentID(formats); err != nil { + res = append(res, err) + } + if err := m.validateCreated(formats); err != nil { res = append(res, err) } @@ -182,12 +201,28 @@ func (m *WritableInventoryItem) validateAssetTag(formats strfmt.Registry) error return nil } +func (m *WritableInventoryItem) validateComponentID(formats strfmt.Registry) error { + if swag.IsZero(m.ComponentID) { // not required + return nil + } + + if err := validate.MinimumInt("component_id", "body", *m.ComponentID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("component_id", "body", *m.ComponentID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + func (m *WritableInventoryItem) validateCreated(formats strfmt.Registry) error { if swag.IsZero(m.Created) { // not required return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -294,6 +329,8 @@ func (m *WritableInventoryItem) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -324,6 +361,10 @@ func (m *WritableInventoryItem) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateComponent(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -363,9 +404,14 @@ func (m *WritableInventoryItem) contextValidateDepth(ctx context.Context, format return nil } +func (m *WritableInventoryItem) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *WritableInventoryItem) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -407,6 +453,8 @@ func (m *WritableInventoryItem) contextValidateTags(ctx context.Context, formats if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_inventory_item_template.go b/netbox/models/writable_inventory_item_template.go new file mode 100644 index 000000000..fc5b56cf6 --- /dev/null +++ b/netbox/models/writable_inventory_item_template.go @@ -0,0 +1,385 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableInventoryItemTemplate writable inventory item template +// +// swagger:model WritableInventoryItemTemplate +type WritableInventoryItemTemplate struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Component + // Read Only: true + Component map[string]*string `json:"component,omitempty"` + + // Component id + // Maximum: 9.223372036854776e+18 + // Minimum: 0 + ComponentID *int64 `json:"component_id,omitempty"` + + // Component type + ComponentType *string `json:"component_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Device type + // Required: true + DeviceType *int64 `json:"device_type"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Label + // + // Physical label + // Max Length: 64 + Label string `json:"label,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Manufacturer + Manufacturer *int64 `json:"manufacturer,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Parent + Parent *int64 `json:"parent,omitempty"` + + // Part ID + // + // Manufacturer-assigned part identifier + // Max Length: 50 + PartID string `json:"part_id,omitempty"` + + // Role + Role *int64 `json:"role,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable inventory item template +func (m *WritableInventoryItemTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComponentID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeviceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePartID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableInventoryItemTemplate) validateComponentID(formats strfmt.Registry) error { + if swag.IsZero(m.ComponentID) { // not required + return nil + } + + if err := validate.MinimumInt("component_id", "body", *m.ComponentID, 0, false); err != nil { + return err + } + + if err := validate.MaximumInt("component_id", "body", *m.ComponentID, 9.223372036854776e+18, false); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateDeviceType(formats strfmt.Registry) error { + + if err := validate.Required("device_type", "body", m.DeviceType); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateLabel(formats strfmt.Registry) error { + if swag.IsZero(m.Label) { // not required + return nil + } + + if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validatePartID(formats strfmt.Registry) error { + if swag.IsZero(m.PartID) { // not required + return nil + } + + if err := validate.MaxLength("part_id", "body", m.PartID, 50); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable inventory item template based on the context it is used +func (m *WritableInventoryItemTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateComponent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateComponent(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableInventoryItemTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableInventoryItemTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableInventoryItemTemplate) UnmarshalBinary(b []byte) error { + var res WritableInventoryItemTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_ip_address.go b/netbox/models/writable_ip_address.go index b81183bc9..89427b419 100644 --- a/netbox/models/writable_ip_address.go +++ b/netbox/models/writable_ip_address.go @@ -44,10 +44,10 @@ type WritableIPAddress struct { // Assigned object // Read Only: true - AssignedObject interface{} `json:"assigned_object,omitempty"` + AssignedObject map[string]*string `json:"assigned_object,omitempty"` // Assigned object id - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 AssignedObjectID *int64 `json:"assigned_object_id,omitempty"` @@ -56,8 +56,8 @@ type WritableIPAddress struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -74,14 +74,14 @@ type WritableIPAddress struct { // // Hostname or FQDN (not case-sensitive) // Max Length: 255 - // Pattern: ^[0-9A-Za-z._-]+$ + // Pattern: ^([0-9A-Za-z_-]+|\*)(\.[0-9A-Za-z_-]+)*\.?$ DNSName string `json:"dns_name,omitempty"` // Family // Read Only: true Family string `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -102,7 +102,7 @@ type WritableIPAddress struct { // Role // // The functional role of this IP - // Enum: [loopback secondary anycast vip vrrp hsrp glbp carp] + // Enum: [loopback secondary anycast vip vrrp hsrp glbp carp g] Role string `json:"role,omitempty"` // Status @@ -194,7 +194,7 @@ func (m *WritableIPAddress) validateAssignedObjectID(formats strfmt.Registry) er return err } - if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 9.223372036854776e+18, false); err != nil { return err } @@ -206,7 +206,7 @@ func (m *WritableIPAddress) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -234,7 +234,7 @@ func (m *WritableIPAddress) validateDNSName(formats strfmt.Registry) error { return err } - if err := validate.Pattern("dns_name", "body", m.DNSName, `^[0-9A-Za-z._-]+$`); err != nil { + if err := validate.Pattern("dns_name", "body", m.DNSName, `^([0-9A-Za-z_-]+|\*)(\.[0-9A-Za-z_-]+)*\.?$`); err != nil { return err } @@ -257,7 +257,7 @@ var writableIpAddressTypeRolePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["loopback","secondary","anycast","vip","vrrp","hsrp","glbp","carp"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["loopback","secondary","anycast","vip","vrrp","hsrp","glbp","carp","g"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -290,6 +290,9 @@ const ( // WritableIPAddressRoleCarp captures enum value "carp" WritableIPAddressRoleCarp string = "carp" + + // WritableIPAddressRoleG captures enum value "g" + WritableIPAddressRoleG string = "g" ) // prop value enum @@ -378,6 +381,8 @@ func (m *WritableIPAddress) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -404,6 +409,10 @@ func (m *WritableIPAddress) validateURL(formats strfmt.Registry) error { func (m *WritableIPAddress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAssignedObject(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -442,9 +451,14 @@ func (m *WritableIPAddress) ContextValidate(ctx context.Context, formats strfmt. return nil } +func (m *WritableIPAddress) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *WritableIPAddress) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -504,6 +518,8 @@ func (m *WritableIPAddress) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_ip_range.go b/netbox/models/writable_ip_range.go index b881f6f87..53396c032 100644 --- a/netbox/models/writable_ip_range.go +++ b/netbox/models/writable_ip_range.go @@ -42,8 +42,8 @@ type WritableIPRange struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -66,7 +66,7 @@ type WritableIPRange struct { // Read Only: true Family string `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -158,7 +158,7 @@ func (m *WritableIPRange) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -266,6 +266,8 @@ func (m *WritableIPRange) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -345,7 +347,7 @@ func (m *WritableIPRange) contextValidateChildren(ctx context.Context, formats s func (m *WritableIPRange) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -405,6 +407,8 @@ func (m *WritableIPRange) contextValidateTags(ctx context.Context, formats strfm if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_journal_entry.go b/netbox/models/writable_journal_entry.go index 5a08ca2ae..ea3699aaa 100644 --- a/netbox/models/writable_journal_entry.go +++ b/netbox/models/writable_journal_entry.go @@ -23,6 +23,7 @@ package models import ( "context" "encoding/json" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -37,11 +38,11 @@ type WritableJournalEntry struct { // Assigned object // Read Only: true - AssignedObject interface{} `json:"assigned_object,omitempty"` + AssignedObject map[string]*string `json:"assigned_object,omitempty"` // Assigned object id // Required: true - // Maximum: 2.147483647e+09 + // Maximum: 9.223372036854776e+18 // Minimum: 0 AssignedObjectID *int64 `json:"assigned_object_id"` @@ -62,11 +63,14 @@ type WritableJournalEntry struct { // Created by CreatedBy *int64 `json:"created_by,omitempty"` + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + // Display // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -74,6 +78,9 @@ type WritableJournalEntry struct { // Enum: [info success warning danger] Kind string `json:"kind,omitempty"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -104,6 +111,10 @@ func (m *WritableJournalEntry) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -124,7 +135,7 @@ func (m *WritableJournalEntry) validateAssignedObjectID(formats strfmt.Registry) return err } - if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 2.147483647e+09, false); err != nil { + if err := validate.MaximumInt("assigned_object_id", "body", *m.AssignedObjectID, 9.223372036854776e+18, false); err != nil { return err } @@ -213,6 +224,32 @@ func (m *WritableJournalEntry) validateKind(formats strfmt.Registry) error { return nil } +func (m *WritableJournalEntry) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableJournalEntry) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -229,6 +266,10 @@ func (m *WritableJournalEntry) validateURL(formats strfmt.Registry) error { func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAssignedObject(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -241,6 +282,10 @@ func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -251,6 +296,11 @@ func (m *WritableJournalEntry) ContextValidate(ctx context.Context, formats strf return nil } +func (m *WritableJournalEntry) contextValidateAssignedObject(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *WritableJournalEntry) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { @@ -278,6 +328,26 @@ func (m *WritableJournalEntry) contextValidateID(ctx context.Context, formats st return nil } +func (m *WritableJournalEntry) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableJournalEntry) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_location.go b/netbox/models/writable_location.go index 1f51a9bad..f7a8a1cbc 100644 --- a/netbox/models/writable_location.go +++ b/netbox/models/writable_location.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type WritableLocation struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -58,7 +59,7 @@ type WritableLocation struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -91,6 +92,12 @@ type WritableLocation struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + + // Tenant + Tenant *int64 `json:"tenant,omitempty"` + // Url // Read Only: true // Format: uri @@ -125,6 +132,10 @@ func (m *WritableLocation) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -140,7 +151,7 @@ func (m *WritableLocation) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -218,6 +229,32 @@ func (m *WritableLocation) validateSlug(formats strfmt.Registry) error { return nil } +func (m *WritableLocation) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableLocation) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -262,6 +299,10 @@ func (m *WritableLocation) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -283,7 +324,7 @@ func (m *WritableLocation) contextValidateDepth(ctx context.Context, formats str func (m *WritableLocation) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -335,6 +376,26 @@ func (m *WritableLocation) contextValidateRackCount(ctx context.Context, formats return nil } +func (m *WritableLocation) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableLocation) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_module.go b/netbox/models/writable_module.go new file mode 100644 index 000000000..6668c4c2f --- /dev/null +++ b/netbox/models/writable_module.go @@ -0,0 +1,367 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableModule writable module +// +// swagger:model WritableModule +type WritableModule struct { + + // Asset tag + // + // A unique tag used to identify this device + // Max Length: 50 + AssetTag *string `json:"asset_tag,omitempty"` + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Device + // Required: true + Device *int64 `json:"device"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Module bay + // Required: true + ModuleBay *int64 `json:"module_bay"` + + // Module type + // Required: true + ModuleType *int64 `json:"module_type"` + + // Serial number + // Max Length: 50 + Serial string `json:"serial,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable module +func (m *WritableModule) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssetTag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleBay(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModuleType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSerial(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModule) validateAssetTag(formats strfmt.Registry) error { + if swag.IsZero(m.AssetTag) { // not required + return nil + } + + if err := validate.MaxLength("asset_tag", "body", *m.AssetTag, 50); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateDevice(formats strfmt.Registry) error { + + if err := validate.Required("device", "body", m.Device); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateModuleBay(formats strfmt.Registry) error { + + if err := validate.Required("module_bay", "body", m.ModuleBay); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateModuleType(formats strfmt.Registry) error { + + if err := validate.Required("module_type", "body", m.ModuleType); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateSerial(formats strfmt.Registry) error { + if swag.IsZero(m.Serial) { // not required + return nil + } + + if err := validate.MaxLength("serial", "body", m.Serial, 50); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableModule) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable module based on the context it is used +func (m *WritableModule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModule) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableModule) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableModule) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableModule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableModule) UnmarshalBinary(b []byte) error { + var res WritableModule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_module_bay.go b/netbox/models/writable_module_bay.go new file mode 100644 index 000000000..df9c0ab8f --- /dev/null +++ b/netbox/models/writable_module_bay.go @@ -0,0 +1,379 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableModuleBay writable module bay +// +// swagger:model WritableModuleBay +type WritableModuleBay struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Device + // Required: true + Device *int64 `json:"device"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Label + // + // Physical label + // Max Length: 64 + Label string `json:"label,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Position + // + // Identifier to reference when renaming installed components + // Max Length: 30 + Position string `json:"position,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable module bay +func (m *WritableModuleBay) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePosition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModuleBay) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validateDevice(formats strfmt.Registry) error { + + if err := validate.Required("device", "body", m.Device); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validateLabel(formats strfmt.Registry) error { + if swag.IsZero(m.Label) { // not required + return nil + } + + if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validatePosition(formats strfmt.Registry) error { + if swag.IsZero(m.Position) { // not required + return nil + } + + if err := validate.MaxLength("position", "body", m.Position, 30); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableModuleBay) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable module bay based on the context it is used +func (m *WritableModuleBay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModuleBay) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBay) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableModuleBay) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableModuleBay) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableModuleBay) UnmarshalBinary(b []byte) error { + var res WritableModuleBay + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_module_bay_template.go b/netbox/models/writable_module_bay_template.go new file mode 100644 index 000000000..189a6efd1 --- /dev/null +++ b/netbox/models/writable_module_bay_template.go @@ -0,0 +1,318 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableModuleBayTemplate writable module bay template +// +// swagger:model WritableModuleBayTemplate +type WritableModuleBayTemplate struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Device type + // Required: true + DeviceType *int64 `json:"device_type"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Label + // + // Physical label + // Max Length: 64 + Label string `json:"label,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 64 + // Min Length: 1 + Name *string `json:"name"` + + // Position + // + // Identifier to reference when renaming installed components + // Max Length: 30 + Position string `json:"position,omitempty"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable module bay template +func (m *WritableModuleBayTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeviceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLabel(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePosition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModuleBayTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validateDeviceType(formats strfmt.Registry) error { + + if err := validate.Required("device_type", "body", m.DeviceType); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validateLabel(formats strfmt.Registry) error { + if swag.IsZero(m.Label) { // not required + return nil + } + + if err := validate.MaxLength("label", "body", m.Label, 64); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 64); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validatePosition(formats strfmt.Registry) error { + if swag.IsZero(m.Position) { // not required + return nil + } + + if err := validate.MaxLength("position", "body", m.Position, 30); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable module bay template based on the context it is used +func (m *WritableModuleBayTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModuleBayTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleBayTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableModuleBayTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableModuleBayTemplate) UnmarshalBinary(b []byte) error { + var res WritableModuleBayTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_module_type.go b/netbox/models/writable_module_type.go new file mode 100644 index 000000000..cd6179177 --- /dev/null +++ b/netbox/models/writable_module_type.go @@ -0,0 +1,340 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableModuleType writable module type +// +// swagger:model WritableModuleType +type WritableModuleType struct { + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Manufacturer + // Required: true + Manufacturer *int64 `json:"manufacturer"` + + // Model + // Required: true + // Max Length: 100 + // Min Length: 1 + Model *string `json:"model"` + + // Part number + // + // Discrete part number (optional) + // Max Length: 50 + PartNumber string `json:"part_number,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable module type +func (m *WritableModuleType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManufacturer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateModel(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePartNumber(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModuleType) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) validateManufacturer(formats strfmt.Registry) error { + + if err := validate.Required("manufacturer", "body", m.Manufacturer); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) validateModel(formats strfmt.Registry) error { + + if err := validate.Required("model", "body", m.Model); err != nil { + return err + } + + if err := validate.MinLength("model", "body", *m.Model, 1); err != nil { + return err + } + + if err := validate.MaxLength("model", "body", *m.Model, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) validatePartNumber(formats strfmt.Registry) error { + if swag.IsZero(m.PartNumber) { // not required + return nil + } + + if err := validate.MaxLength("part_number", "body", m.PartNumber, 50); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableModuleType) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable module type based on the context it is used +func (m *WritableModuleType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableModuleType) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableModuleType) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableModuleType) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableModuleType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableModuleType) UnmarshalBinary(b []byte) error { + var res WritableModuleType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_object_permission.go b/netbox/models/writable_object_permission.go index cb49dbeca..0570a1939 100644 --- a/netbox/models/writable_object_permission.go +++ b/netbox/models/writable_object_permission.go @@ -59,7 +59,7 @@ type WritableObjectPermission struct { // Unique: true Groups []int64 `json:"groups"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/writable_platform.go b/netbox/models/writable_platform.go index 5c4d5ac68..b0a1c4956 100644 --- a/netbox/models/writable_platform.go +++ b/netbox/models/writable_platform.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -36,8 +37,8 @@ type WritablePlatform struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type WritablePlatform struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -92,6 +93,9 @@ type WritablePlatform struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -130,6 +134,10 @@ func (m *WritablePlatform) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -145,7 +153,7 @@ func (m *WritablePlatform) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -226,6 +234,32 @@ func (m *WritablePlatform) validateSlug(formats strfmt.Registry) error { return nil } +func (m *WritablePlatform) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritablePlatform) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -262,6 +296,10 @@ func (m *WritablePlatform) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -278,7 +316,7 @@ func (m *WritablePlatform) ContextValidate(ctx context.Context, formats strfmt.R func (m *WritablePlatform) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -321,6 +359,26 @@ func (m *WritablePlatform) contextValidateLastUpdated(ctx context.Context, forma return nil } +func (m *WritablePlatform) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritablePlatform) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_power_feed.go b/netbox/models/writable_power_feed.go index 1737043c9..ec9f9108b 100644 --- a/netbox/models/writable_power_feed.go +++ b/netbox/models/writable_power_feed.go @@ -48,18 +48,6 @@ type WritablePowerFeed struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Comments Comments string `json:"comments,omitempty"` @@ -69,7 +57,7 @@ type WritablePowerFeed struct { // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -81,8 +69,8 @@ type WritablePowerFeed struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -91,7 +79,7 @@ type WritablePowerFeed struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -100,6 +88,18 @@ type WritablePowerFeed struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected @@ -246,6 +246,8 @@ func (m *WritablePowerFeed) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -259,7 +261,7 @@ func (m *WritablePowerFeed) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -466,6 +468,8 @@ func (m *WritablePowerFeed) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -558,7 +562,7 @@ func (m *WritablePowerFeed) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -586,6 +590,14 @@ func (m *WritablePowerFeed) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -615,6 +627,8 @@ func (m *WritablePowerFeed) contextValidateCable(ctx context.Context, formats st if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -623,11 +637,7 @@ func (m *WritablePowerFeed) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritablePowerFeed) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *WritablePowerFeed) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -652,7 +662,7 @@ func (m *WritablePowerFeed) contextValidateConnectedEndpointType(ctx context.Con func (m *WritablePowerFeed) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -686,6 +696,20 @@ func (m *WritablePowerFeed) contextValidateLastUpdated(ctx context.Context, form return nil } +func (m *WritablePowerFeed) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritablePowerFeed) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritablePowerFeed) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -694,6 +718,8 @@ func (m *WritablePowerFeed) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_power_outlet.go b/netbox/models/writable_power_outlet.go index d42238a4b..dc9350413 100644 --- a/netbox/models/writable_power_outlet.go +++ b/netbox/models/writable_power_outlet.go @@ -43,25 +43,13 @@ type WritablePowerOutlet struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -73,8 +61,8 @@ type WritablePowerOutlet struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -97,7 +85,7 @@ type WritablePowerOutlet struct { // Enum: [A B C] FeedLeg string `json:"feed_leg,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -112,11 +100,26 @@ type WritablePowerOutlet struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -132,7 +135,7 @@ type WritablePowerOutlet struct { // Type // // Physical port type - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r nema-l22-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o ita-multistandard usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid neutrik-powercon-20a neutrik-powercon-32a neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Type string `json:"type,omitempty"` // Url @@ -204,6 +207,8 @@ func (m *WritablePowerOutlet) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -217,7 +222,7 @@ func (m *WritablePowerOutlet) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -345,6 +350,8 @@ func (m *WritablePowerOutlet) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -359,7 +366,7 @@ var writablePowerOutletTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","nema-l22-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","ita-multistandard","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","neutrik-powercon-20a","neutrik-powercon-32a","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -543,6 +550,9 @@ const ( // WritablePowerOutletTypeNemaDashL21Dash30r captures enum value "nema-l21-30r" WritablePowerOutletTypeNemaDashL21Dash30r string = "nema-l21-30r" + // WritablePowerOutletTypeNemaDashL22Dash30r captures enum value "nema-l22-30r" + WritablePowerOutletTypeNemaDashL22Dash30r string = "nema-l22-30r" + // WritablePowerOutletTypeCS6360C captures enum value "CS6360C" WritablePowerOutletTypeCS6360C string = "CS6360C" @@ -594,6 +604,9 @@ const ( // WritablePowerOutletTypeItaDasho captures enum value "ita-o" WritablePowerOutletTypeItaDasho string = "ita-o" + // WritablePowerOutletTypeItaDashMultistandard captures enum value "ita-multistandard" + WritablePowerOutletTypeItaDashMultistandard string = "ita-multistandard" + // WritablePowerOutletTypeUsbDasha captures enum value "usb-a" WritablePowerOutletTypeUsbDasha string = "usb-a" @@ -612,6 +625,18 @@ const ( // WritablePowerOutletTypeSafDashdDashGrid captures enum value "saf-d-grid" WritablePowerOutletTypeSafDashdDashGrid string = "saf-d-grid" + // WritablePowerOutletTypeNeutrikDashPowerconDash20a captures enum value "neutrik-powercon-20a" + WritablePowerOutletTypeNeutrikDashPowerconDash20a string = "neutrik-powercon-20a" + + // WritablePowerOutletTypeNeutrikDashPowerconDash32a captures enum value "neutrik-powercon-32a" + WritablePowerOutletTypeNeutrikDashPowerconDash32a string = "neutrik-powercon-32a" + + // WritablePowerOutletTypeNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + WritablePowerOutletTypeNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // WritablePowerOutletTypeNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + WritablePowerOutletTypeNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // WritablePowerOutletTypeHardwired captures enum value "hardwired" WritablePowerOutletTypeHardwired string = "hardwired" ) @@ -661,7 +686,7 @@ func (m *WritablePowerOutlet) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -689,6 +714,14 @@ func (m *WritablePowerOutlet) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -718,6 +751,8 @@ func (m *WritablePowerOutlet) contextValidateCable(ctx context.Context, formats if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -726,11 +761,7 @@ func (m *WritablePowerOutlet) contextValidateCable(ctx context.Context, formats return nil } -func (m *WritablePowerOutlet) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *WritablePowerOutlet) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -755,7 +786,7 @@ func (m *WritablePowerOutlet) contextValidateConnectedEndpointType(ctx context.C func (m *WritablePowerOutlet) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -789,6 +820,20 @@ func (m *WritablePowerOutlet) contextValidateLastUpdated(ctx context.Context, fo return nil } +func (m *WritablePowerOutlet) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritablePowerOutlet) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritablePowerOutlet) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -797,6 +842,8 @@ func (m *WritablePowerOutlet) contextValidateTags(ctx context.Context, formats s if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_power_outlet_template.go b/netbox/models/writable_power_outlet_template.go index f05d75b44..c50845f05 100644 --- a/netbox/models/writable_power_outlet_template.go +++ b/netbox/models/writable_power_outlet_template.go @@ -37,8 +37,8 @@ type WritablePowerOutletTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -58,7 +58,7 @@ type WritablePowerOutletTemplate struct { // Enum: [A B C] FeedLeg string `json:"feed_leg,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -83,7 +83,7 @@ type WritablePowerOutletTemplate struct { PowerPort *int64 `json:"power_port,omitempty"` // Type - // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid hardwired] + // Enum: [iec-60320-c5 iec-60320-c7 iec-60320-c13 iec-60320-c15 iec-60320-c19 iec-60320-c21 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15r nema-5-15r nema-5-20r nema-5-30r nema-5-50r nema-6-15r nema-6-20r nema-6-30r nema-6-50r nema-10-30r nema-10-50r nema-14-20r nema-14-30r nema-14-50r nema-14-60r nema-15-15r nema-15-20r nema-15-30r nema-15-50r nema-15-60r nema-l1-15r nema-l5-15r nema-l5-20r nema-l5-30r nema-l5-50r nema-l6-15r nema-l6-20r nema-l6-30r nema-l6-50r nema-l10-30r nema-l14-20r nema-l14-30r nema-l14-50r nema-l14-60r nema-l15-20r nema-l15-30r nema-l15-50r nema-l15-60r nema-l21-20r nema-l21-30r nema-l22-30r CS6360C CS6364C CS8164C CS8264C CS8364C CS8464C ita-e ita-f ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o ita-multistandard usb-a usb-micro-b usb-c dc-terminal hdot-cx saf-d-grid neutrik-powercon-20a neutrik-powercon-32a neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Type string `json:"type,omitempty"` // Url @@ -143,7 +143,7 @@ func (m *WritablePowerOutletTemplate) validateCreated(formats strfmt.Registry) e return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -261,7 +261,7 @@ var writablePowerOutletTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c5","iec-60320-c7","iec-60320-c13","iec-60320-c15","iec-60320-c19","iec-60320-c21","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15r","nema-5-15r","nema-5-20r","nema-5-30r","nema-5-50r","nema-6-15r","nema-6-20r","nema-6-30r","nema-6-50r","nema-10-30r","nema-10-50r","nema-14-20r","nema-14-30r","nema-14-50r","nema-14-60r","nema-15-15r","nema-15-20r","nema-15-30r","nema-15-50r","nema-15-60r","nema-l1-15r","nema-l5-15r","nema-l5-20r","nema-l5-30r","nema-l5-50r","nema-l6-15r","nema-l6-20r","nema-l6-30r","nema-l6-50r","nema-l10-30r","nema-l14-20r","nema-l14-30r","nema-l14-50r","nema-l14-60r","nema-l15-20r","nema-l15-30r","nema-l15-50r","nema-l15-60r","nema-l21-20r","nema-l21-30r","nema-l22-30r","CS6360C","CS6364C","CS8164C","CS8264C","CS8364C","CS8464C","ita-e","ita-f","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","ita-multistandard","usb-a","usb-micro-b","usb-c","dc-terminal","hdot-cx","saf-d-grid","neutrik-powercon-20a","neutrik-powercon-32a","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -445,6 +445,9 @@ const ( // WritablePowerOutletTemplateTypeNemaDashL21Dash30r captures enum value "nema-l21-30r" WritablePowerOutletTemplateTypeNemaDashL21Dash30r string = "nema-l21-30r" + // WritablePowerOutletTemplateTypeNemaDashL22Dash30r captures enum value "nema-l22-30r" + WritablePowerOutletTemplateTypeNemaDashL22Dash30r string = "nema-l22-30r" + // WritablePowerOutletTemplateTypeCS6360C captures enum value "CS6360C" WritablePowerOutletTemplateTypeCS6360C string = "CS6360C" @@ -496,6 +499,9 @@ const ( // WritablePowerOutletTemplateTypeItaDasho captures enum value "ita-o" WritablePowerOutletTemplateTypeItaDasho string = "ita-o" + // WritablePowerOutletTemplateTypeItaDashMultistandard captures enum value "ita-multistandard" + WritablePowerOutletTemplateTypeItaDashMultistandard string = "ita-multistandard" + // WritablePowerOutletTemplateTypeUsbDasha captures enum value "usb-a" WritablePowerOutletTemplateTypeUsbDasha string = "usb-a" @@ -514,6 +520,18 @@ const ( // WritablePowerOutletTemplateTypeSafDashdDashGrid captures enum value "saf-d-grid" WritablePowerOutletTemplateTypeSafDashdDashGrid string = "saf-d-grid" + // WritablePowerOutletTemplateTypeNeutrikDashPowerconDash20a captures enum value "neutrik-powercon-20a" + WritablePowerOutletTemplateTypeNeutrikDashPowerconDash20a string = "neutrik-powercon-20a" + + // WritablePowerOutletTemplateTypeNeutrikDashPowerconDash32a captures enum value "neutrik-powercon-32a" + WritablePowerOutletTemplateTypeNeutrikDashPowerconDash32a string = "neutrik-powercon-32a" + + // WritablePowerOutletTemplateTypeNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + WritablePowerOutletTemplateTypeNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // WritablePowerOutletTemplateTypeNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + WritablePowerOutletTemplateTypeNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // WritablePowerOutletTemplateTypeHardwired captures enum value "hardwired" WritablePowerOutletTemplateTypeHardwired string = "hardwired" ) @@ -583,7 +601,7 @@ func (m *WritablePowerOutletTemplate) ContextValidate(ctx context.Context, forma func (m *WritablePowerOutletTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_power_panel.go b/netbox/models/writable_power_panel.go index e39da36c7..4b3710a8f 100644 --- a/netbox/models/writable_power_panel.go +++ b/netbox/models/writable_power_panel.go @@ -35,6 +35,11 @@ import ( // swagger:model WritablePowerPanel type WritablePowerPanel struct { + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -42,10 +47,15 @@ type WritablePowerPanel struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Location Location *int64 `json:"location,omitempty"` @@ -76,6 +86,14 @@ type WritablePowerPanel struct { func (m *WritablePowerPanel) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -98,6 +116,30 @@ func (m *WritablePowerPanel) Validate(formats strfmt.Registry) error { return nil } +func (m *WritablePowerPanel) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritablePowerPanel) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritablePowerPanel) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -138,6 +180,8 @@ func (m *WritablePowerPanel) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -164,6 +208,10 @@ func (m *WritablePowerPanel) validateURL(formats strfmt.Registry) error { func (m *WritablePowerPanel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -172,6 +220,10 @@ func (m *WritablePowerPanel) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidatePowerfeedCount(ctx, formats); err != nil { res = append(res, err) } @@ -190,6 +242,15 @@ func (m *WritablePowerPanel) ContextValidate(ctx context.Context, formats strfmt return nil } +func (m *WritablePowerPanel) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *WritablePowerPanel) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -208,6 +269,15 @@ func (m *WritablePowerPanel) contextValidateID(ctx context.Context, formats strf return nil } +func (m *WritablePowerPanel) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *WritablePowerPanel) contextValidatePowerfeedCount(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "powerfeed_count", "body", int64(m.PowerfeedCount)); err != nil { @@ -225,6 +295,8 @@ func (m *WritablePowerPanel) contextValidateTags(ctx context.Context, formats st if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_power_port.go b/netbox/models/writable_power_port.go index 91067cf0b..c077a0730 100644 --- a/netbox/models/writable_power_port.go +++ b/netbox/models/writable_power_port.go @@ -50,25 +50,13 @@ type WritablePowerPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Connected endpoint // // // Return the appropriate serializer for the type of connected object. // // Read Only: true - ConnectedEndpoint interface{} `json:"connected_endpoint,omitempty"` + ConnectedEndpoint map[string]*string `json:"connected_endpoint,omitempty"` // Connected endpoint reachable // Read Only: true @@ -80,8 +68,8 @@ type WritablePowerPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -98,7 +86,7 @@ type WritablePowerPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -113,6 +101,18 @@ type WritablePowerPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected @@ -125,6 +125,9 @@ type WritablePowerPort struct { // Minimum: 1 MaximumDraw *int64 `json:"maximum_draw,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -137,7 +140,7 @@ type WritablePowerPort struct { // Type // // Physical port type - // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-3-b usb-3-micro-b dc-terminal saf-d-grid hardwired] + // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p nema-l22-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab usb-3-b usb-3-micro-b dc-terminal saf-d-grid neutrik-powercon-20 neutrik-powercon-32 neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Type string `json:"type,omitempty"` // Url @@ -229,6 +232,8 @@ func (m *WritablePowerPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -242,7 +247,7 @@ func (m *WritablePowerPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -341,6 +346,8 @@ func (m *WritablePowerPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -355,7 +362,7 @@ var writablePowerPortTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","nema-l22-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","neutrik-powercon-20","neutrik-powercon-32","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -539,6 +546,9 @@ const ( // WritablePowerPortTypeNemaDashL21Dash30p captures enum value "nema-l21-30p" WritablePowerPortTypeNemaDashL21Dash30p string = "nema-l21-30p" + // WritablePowerPortTypeNemaDashL22Dash30p captures enum value "nema-l22-30p" + WritablePowerPortTypeNemaDashL22Dash30p string = "nema-l22-30p" + // WritablePowerPortTypeCs6361c captures enum value "cs6361c" WritablePowerPortTypeCs6361c string = "cs6361c" @@ -557,6 +567,9 @@ const ( // WritablePowerPortTypeCs8465c captures enum value "cs8465c" WritablePowerPortTypeCs8465c string = "cs8465c" + // WritablePowerPortTypeItaDashc captures enum value "ita-c" + WritablePowerPortTypeItaDashc string = "ita-c" + // WritablePowerPortTypeItaDashe captures enum value "ita-e" WritablePowerPortTypeItaDashe string = "ita-e" @@ -614,6 +627,9 @@ const ( // WritablePowerPortTypeUsbDashMicroDashb captures enum value "usb-micro-b" WritablePowerPortTypeUsbDashMicroDashb string = "usb-micro-b" + // WritablePowerPortTypeUsbDashMicroDashAb captures enum value "usb-micro-ab" + WritablePowerPortTypeUsbDashMicroDashAb string = "usb-micro-ab" + // WritablePowerPortTypeUsbDash3Dashb captures enum value "usb-3-b" WritablePowerPortTypeUsbDash3Dashb string = "usb-3-b" @@ -626,6 +642,18 @@ const ( // WritablePowerPortTypeSafDashdDashGrid captures enum value "saf-d-grid" WritablePowerPortTypeSafDashdDashGrid string = "saf-d-grid" + // WritablePowerPortTypeNeutrikDashPowerconDash20 captures enum value "neutrik-powercon-20" + WritablePowerPortTypeNeutrikDashPowerconDash20 string = "neutrik-powercon-20" + + // WritablePowerPortTypeNeutrikDashPowerconDash32 captures enum value "neutrik-powercon-32" + WritablePowerPortTypeNeutrikDashPowerconDash32 string = "neutrik-powercon-32" + + // WritablePowerPortTypeNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + WritablePowerPortTypeNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // WritablePowerPortTypeNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + WritablePowerPortTypeNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // WritablePowerPortTypeHardwired captures enum value "hardwired" WritablePowerPortTypeHardwired string = "hardwired" ) @@ -675,7 +703,7 @@ func (m *WritablePowerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { + if err := m.contextValidateConnectedEndpoint(ctx, formats); err != nil { res = append(res, err) } @@ -703,6 +731,14 @@ func (m *WritablePowerPort) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -732,6 +768,8 @@ func (m *WritablePowerPort) contextValidateCable(ctx context.Context, formats st if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -740,11 +778,7 @@ func (m *WritablePowerPort) contextValidateCable(ctx context.Context, formats st return nil } -func (m *WritablePowerPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } +func (m *WritablePowerPort) contextValidateConnectedEndpoint(ctx context.Context, formats strfmt.Registry) error { return nil } @@ -769,7 +803,7 @@ func (m *WritablePowerPort) contextValidateConnectedEndpointType(ctx context.Con func (m *WritablePowerPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -803,6 +837,20 @@ func (m *WritablePowerPort) contextValidateLastUpdated(ctx context.Context, form return nil } +func (m *WritablePowerPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritablePowerPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritablePowerPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -811,6 +859,8 @@ func (m *WritablePowerPort) contextValidateTags(ctx context.Context, formats str if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_power_port_template.go b/netbox/models/writable_power_port_template.go index bd6c0e95b..5eb5ffc37 100644 --- a/netbox/models/writable_power_port_template.go +++ b/netbox/models/writable_power_port_template.go @@ -44,8 +44,8 @@ type WritablePowerPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -59,7 +59,7 @@ type WritablePowerPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -88,7 +88,7 @@ type WritablePowerPortTemplate struct { Name *string `json:"name"` // Type - // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-3-b usb-3-micro-b dc-terminal saf-d-grid hardwired] + // Enum: [iec-60320-c6 iec-60320-c8 iec-60320-c14 iec-60320-c16 iec-60320-c20 iec-60320-c22 iec-60309-p-n-e-4h iec-60309-p-n-e-6h iec-60309-p-n-e-9h iec-60309-2p-e-4h iec-60309-2p-e-6h iec-60309-2p-e-9h iec-60309-3p-e-4h iec-60309-3p-e-6h iec-60309-3p-e-9h iec-60309-3p-n-e-4h iec-60309-3p-n-e-6h iec-60309-3p-n-e-9h nema-1-15p nema-5-15p nema-5-20p nema-5-30p nema-5-50p nema-6-15p nema-6-20p nema-6-30p nema-6-50p nema-10-30p nema-10-50p nema-14-20p nema-14-30p nema-14-50p nema-14-60p nema-15-15p nema-15-20p nema-15-30p nema-15-50p nema-15-60p nema-l1-15p nema-l5-15p nema-l5-20p nema-l5-30p nema-l5-50p nema-l6-15p nema-l6-20p nema-l6-30p nema-l6-50p nema-l10-30p nema-l14-20p nema-l14-30p nema-l14-50p nema-l14-60p nema-l15-20p nema-l15-30p nema-l15-50p nema-l15-60p nema-l21-20p nema-l21-30p nema-l22-30p cs6361c cs6365c cs8165c cs8265c cs8365c cs8465c ita-c ita-e ita-f ita-ef ita-g ita-h ita-i ita-j ita-k ita-l ita-m ita-n ita-o usb-a usb-b usb-c usb-mini-a usb-mini-b usb-micro-a usb-micro-b usb-micro-ab usb-3-b usb-3-micro-b dc-terminal saf-d-grid neutrik-powercon-20 neutrik-powercon-32 neutrik-powercon-true1 neutrik-powercon-true1-top hardwired] Type string `json:"type,omitempty"` // Url @@ -168,7 +168,7 @@ func (m *WritablePowerPortTemplate) validateCreated(formats strfmt.Registry) err return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -257,7 +257,7 @@ var writablePowerPortTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","hardwired"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["iec-60320-c6","iec-60320-c8","iec-60320-c14","iec-60320-c16","iec-60320-c20","iec-60320-c22","iec-60309-p-n-e-4h","iec-60309-p-n-e-6h","iec-60309-p-n-e-9h","iec-60309-2p-e-4h","iec-60309-2p-e-6h","iec-60309-2p-e-9h","iec-60309-3p-e-4h","iec-60309-3p-e-6h","iec-60309-3p-e-9h","iec-60309-3p-n-e-4h","iec-60309-3p-n-e-6h","iec-60309-3p-n-e-9h","nema-1-15p","nema-5-15p","nema-5-20p","nema-5-30p","nema-5-50p","nema-6-15p","nema-6-20p","nema-6-30p","nema-6-50p","nema-10-30p","nema-10-50p","nema-14-20p","nema-14-30p","nema-14-50p","nema-14-60p","nema-15-15p","nema-15-20p","nema-15-30p","nema-15-50p","nema-15-60p","nema-l1-15p","nema-l5-15p","nema-l5-20p","nema-l5-30p","nema-l5-50p","nema-l6-15p","nema-l6-20p","nema-l6-30p","nema-l6-50p","nema-l10-30p","nema-l14-20p","nema-l14-30p","nema-l14-50p","nema-l14-60p","nema-l15-20p","nema-l15-30p","nema-l15-50p","nema-l15-60p","nema-l21-20p","nema-l21-30p","nema-l22-30p","cs6361c","cs6365c","cs8165c","cs8265c","cs8365c","cs8465c","ita-c","ita-e","ita-f","ita-ef","ita-g","ita-h","ita-i","ita-j","ita-k","ita-l","ita-m","ita-n","ita-o","usb-a","usb-b","usb-c","usb-mini-a","usb-mini-b","usb-micro-a","usb-micro-b","usb-micro-ab","usb-3-b","usb-3-micro-b","dc-terminal","saf-d-grid","neutrik-powercon-20","neutrik-powercon-32","neutrik-powercon-true1","neutrik-powercon-true1-top","hardwired"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -441,6 +441,9 @@ const ( // WritablePowerPortTemplateTypeNemaDashL21Dash30p captures enum value "nema-l21-30p" WritablePowerPortTemplateTypeNemaDashL21Dash30p string = "nema-l21-30p" + // WritablePowerPortTemplateTypeNemaDashL22Dash30p captures enum value "nema-l22-30p" + WritablePowerPortTemplateTypeNemaDashL22Dash30p string = "nema-l22-30p" + // WritablePowerPortTemplateTypeCs6361c captures enum value "cs6361c" WritablePowerPortTemplateTypeCs6361c string = "cs6361c" @@ -459,6 +462,9 @@ const ( // WritablePowerPortTemplateTypeCs8465c captures enum value "cs8465c" WritablePowerPortTemplateTypeCs8465c string = "cs8465c" + // WritablePowerPortTemplateTypeItaDashc captures enum value "ita-c" + WritablePowerPortTemplateTypeItaDashc string = "ita-c" + // WritablePowerPortTemplateTypeItaDashe captures enum value "ita-e" WritablePowerPortTemplateTypeItaDashe string = "ita-e" @@ -516,6 +522,9 @@ const ( // WritablePowerPortTemplateTypeUsbDashMicroDashb captures enum value "usb-micro-b" WritablePowerPortTemplateTypeUsbDashMicroDashb string = "usb-micro-b" + // WritablePowerPortTemplateTypeUsbDashMicroDashAb captures enum value "usb-micro-ab" + WritablePowerPortTemplateTypeUsbDashMicroDashAb string = "usb-micro-ab" + // WritablePowerPortTemplateTypeUsbDash3Dashb captures enum value "usb-3-b" WritablePowerPortTemplateTypeUsbDash3Dashb string = "usb-3-b" @@ -528,6 +537,18 @@ const ( // WritablePowerPortTemplateTypeSafDashdDashGrid captures enum value "saf-d-grid" WritablePowerPortTemplateTypeSafDashdDashGrid string = "saf-d-grid" + // WritablePowerPortTemplateTypeNeutrikDashPowerconDash20 captures enum value "neutrik-powercon-20" + WritablePowerPortTemplateTypeNeutrikDashPowerconDash20 string = "neutrik-powercon-20" + + // WritablePowerPortTemplateTypeNeutrikDashPowerconDash32 captures enum value "neutrik-powercon-32" + WritablePowerPortTemplateTypeNeutrikDashPowerconDash32 string = "neutrik-powercon-32" + + // WritablePowerPortTemplateTypeNeutrikDashPowerconDashTrue1 captures enum value "neutrik-powercon-true1" + WritablePowerPortTemplateTypeNeutrikDashPowerconDashTrue1 string = "neutrik-powercon-true1" + + // WritablePowerPortTemplateTypeNeutrikDashPowerconDashTrue1DashTop captures enum value "neutrik-powercon-true1-top" + WritablePowerPortTemplateTypeNeutrikDashPowerconDashTrue1DashTop string = "neutrik-powercon-true1-top" + // WritablePowerPortTemplateTypeHardwired captures enum value "hardwired" WritablePowerPortTemplateTypeHardwired string = "hardwired" ) @@ -597,7 +618,7 @@ func (m *WritablePowerPortTemplate) ContextValidate(ctx context.Context, formats func (m *WritablePowerPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_prefix.go b/netbox/models/writable_prefix.go index 30ef8ba44..2b61c67c3 100644 --- a/netbox/models/writable_prefix.go +++ b/netbox/models/writable_prefix.go @@ -46,8 +46,8 @@ type WritablePrefix struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +64,7 @@ type WritablePrefix struct { // Read Only: true Family string `json:"family,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -164,7 +164,7 @@ func (m *WritablePrefix) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -266,6 +266,8 @@ func (m *WritablePrefix) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -354,7 +356,7 @@ func (m *WritablePrefix) contextValidateChildren(ctx context.Context, formats st func (m *WritablePrefix) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -405,6 +407,8 @@ func (m *WritablePrefix) contextValidateTags(ctx context.Context, formats strfmt if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_provider.go b/netbox/models/writable_provider.go new file mode 100644 index 000000000..7b44aea61 --- /dev/null +++ b/netbox/models/writable_provider.go @@ -0,0 +1,448 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableProvider writable provider +// +// swagger:model WritableProvider +type WritableProvider struct { + + // Account number + // Max Length: 30 + Account string `json:"account,omitempty"` + + // Admin contact + AdminContact string `json:"admin_contact,omitempty"` + + // ASN + // + // 32-bit autonomous system number + // Maximum: 4.294967295e+09 + // Minimum: 1 + Asn *int64 `json:"asn,omitempty"` + + // asns + // Unique: true + Asns []int64 `json:"asns"` + + // Circuit count + // Read Only: true + CircuitCount int64 `json:"circuit_count,omitempty"` + + // Comments + Comments string `json:"comments,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // NOC contact + NocContact string `json:"noc_contact,omitempty"` + + // Portal URL + // Max Length: 200 + // Format: uri + PortalURL strfmt.URI `json:"portal_url,omitempty"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable provider +func (m *WritableProvider) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAsn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAsns(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePortalURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableProvider) validateAccount(formats strfmt.Registry) error { + if swag.IsZero(m.Account) { // not required + return nil + } + + if err := validate.MaxLength("account", "body", m.Account, 30); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateAsn(formats strfmt.Registry) error { + if swag.IsZero(m.Asn) { // not required + return nil + } + + if err := validate.MinimumInt("asn", "body", *m.Asn, 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("asn", "body", *m.Asn, 4.294967295e+09, false); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateAsns(formats strfmt.Registry) error { + if swag.IsZero(m.Asns) { // not required + return nil + } + + if err := validate.UniqueItems("asns", "body", m.Asns); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validatePortalURL(formats strfmt.Registry) error { + if swag.IsZero(m.PortalURL) { // not required + return nil + } + + if err := validate.MaxLength("portal_url", "body", m.PortalURL.String(), 200); err != nil { + return err + } + + if err := validate.FormatOf("portal_url", "body", "uri", m.PortalURL.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableProvider) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable provider based on the context it is used +func (m *WritableProvider) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCircuitCount(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableProvider) contextValidateCircuitCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "circuit_count", "body", int64(m.CircuitCount)); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableProvider) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableProvider) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableProvider) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableProvider) UnmarshalBinary(b []byte) error { + var res WritableProvider + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_provider_network.go b/netbox/models/writable_provider_network.go index 96792b805..b08c443c8 100644 --- a/netbox/models/writable_provider_network.go +++ b/netbox/models/writable_provider_network.go @@ -40,8 +40,8 @@ type WritableProviderNetwork struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +54,7 @@ type WritableProviderNetwork struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -73,6 +73,10 @@ type WritableProviderNetwork struct { // Required: true Provider *int64 `json:"provider"` + // Service ID + // Max Length: 100 + ServiceID string `json:"service_id,omitempty"` + // tags Tags []*NestedTag `json:"tags"` @@ -106,6 +110,10 @@ func (m *WritableProviderNetwork) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateServiceID(formats); err != nil { + res = append(res, err) + } + if err := m.validateTags(formats); err != nil { res = append(res, err) } @@ -125,7 +133,7 @@ func (m *WritableProviderNetwork) validateCreated(formats strfmt.Registry) error return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -182,6 +190,18 @@ func (m *WritableProviderNetwork) validateProvider(formats strfmt.Registry) erro return nil } +func (m *WritableProviderNetwork) validateServiceID(formats strfmt.Registry) error { + if swag.IsZero(m.ServiceID) { // not required + return nil + } + + if err := validate.MaxLength("service_id", "body", m.ServiceID, 100); err != nil { + return err + } + + return nil +} + func (m *WritableProviderNetwork) validateTags(formats strfmt.Registry) error { if swag.IsZero(m.Tags) { // not required return nil @@ -196,6 +216,8 @@ func (m *WritableProviderNetwork) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -254,7 +276,7 @@ func (m *WritableProviderNetwork) ContextValidate(ctx context.Context, formats s func (m *WritableProviderNetwork) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -296,6 +318,8 @@ func (m *WritableProviderNetwork) contextValidateTags(ctx context.Context, forma if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_rack.go b/netbox/models/writable_rack.go index 1bb8059eb..f249e6933 100644 --- a/netbox/models/writable_rack.go +++ b/netbox/models/writable_rack.go @@ -47,8 +47,8 @@ type WritableRack struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -67,12 +67,10 @@ type WritableRack struct { Display string `json:"display,omitempty"` // Facility ID - // - // Locally-assigned identifier // Max Length: 50 FacilityID *string `json:"facility_id,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -82,7 +80,8 @@ type WritableRack struct { LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` // Location - Location *int64 `json:"location,omitempty"` + // Required: true + Location *int64 `json:"location"` // Name // Required: true @@ -178,6 +177,10 @@ func (m *WritableRack) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -249,7 +252,7 @@ func (m *WritableRack) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -280,6 +283,15 @@ func (m *WritableRack) validateLastUpdated(formats strfmt.Registry) error { return nil } +func (m *WritableRack) validateLocation(formats strfmt.Registry) error { + + if err := validate.Required("location", "body", m.Location); err != nil { + return err + } + + return nil +} + func (m *WritableRack) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -457,6 +469,8 @@ func (m *WritableRack) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -623,7 +637,7 @@ func (m *WritableRack) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *WritableRack) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -683,6 +697,8 @@ func (m *WritableRack) contextValidateTags(ctx context.Context, formats strfmt.R if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_rack_reservation.go b/netbox/models/writable_rack_reservation.go index 592a95798..60fde75ba 100644 --- a/netbox/models/writable_rack_reservation.go +++ b/netbox/models/writable_rack_reservation.go @@ -37,8 +37,8 @@ type WritableRackReservation struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -53,10 +53,15 @@ type WritableRackReservation struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Rack // Required: true Rack *int64 `json:"rack"` @@ -93,6 +98,10 @@ func (m *WritableRackReservation) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateRack(formats); err != nil { res = append(res, err) } @@ -124,7 +133,7 @@ func (m *WritableRackReservation) validateCreated(formats strfmt.Registry) error return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -148,6 +157,18 @@ func (m *WritableRackReservation) validateDescription(formats strfmt.Registry) e return nil } +func (m *WritableRackReservation) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableRackReservation) validateRack(formats strfmt.Registry) error { if err := validate.Required("rack", "body", m.Rack); err != nil { @@ -171,6 +192,8 @@ func (m *WritableRackReservation) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -242,6 +265,10 @@ func (m *WritableRackReservation) ContextValidate(ctx context.Context, formats s res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -258,7 +285,7 @@ func (m *WritableRackReservation) ContextValidate(ctx context.Context, formats s func (m *WritableRackReservation) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -283,6 +310,15 @@ func (m *WritableRackReservation) contextValidateID(ctx context.Context, formats return nil } +func (m *WritableRackReservation) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *WritableRackReservation) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -291,6 +327,8 @@ func (m *WritableRackReservation) contextValidateTags(ctx context.Context, forma if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_rear_port.go b/netbox/models/writable_rear_port.go index 0e77a2765..010689ce1 100644 --- a/netbox/models/writable_rear_port.go +++ b/netbox/models/writable_rear_port.go @@ -43,18 +43,6 @@ type WritableRearPort struct { // cable Cable *NestedCable `json:"cable,omitempty"` - // Cable peer - // - // - // Return the appropriate serializer for the cable termination model. - // - // Read Only: true - CablePeer interface{} `json:"cable_peer,omitempty"` - - // Cable peer type - // Read Only: true - CablePeerType string `json:"cable_peer_type,omitempty"` - // Color // Max Length: 6 // Pattern: ^[0-9a-f]{6}$ @@ -62,8 +50,8 @@ type WritableRearPort struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -80,7 +68,7 @@ type WritableRearPort struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -95,11 +83,26 @@ type WritableRearPort struct { // Format: date-time LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Link peer + // + // + // Return the appropriate serializer for the link termination model. + // + // Read Only: true + LinkPeer map[string]*string `json:"link_peer,omitempty"` + + // Link peer type + // Read Only: true + LinkPeerType string `json:"link_peer_type,omitempty"` + // Mark connected // // Treat as if a cable is connected MarkConnected bool `json:"mark_connected,omitempty"` + // Module + Module *int64 `json:"module,omitempty"` + // Name // Required: true // Max Length: 64 @@ -116,7 +119,7 @@ type WritableRearPort struct { // Type // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Type *string `json:"type"` // Url @@ -192,6 +195,8 @@ func (m *WritableRearPort) validateCable(formats strfmt.Registry) error { if err := m.Cable.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -221,7 +226,7 @@ func (m *WritableRearPort) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -320,6 +325,8 @@ func (m *WritableRearPort) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -334,7 +341,7 @@ var writableRearPortTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -404,12 +411,24 @@ const ( // WritableRearPortTypeLc captures enum value "lc" WritableRearPortTypeLc string = "lc" + // WritableRearPortTypeLcDashPc captures enum value "lc-pc" + WritableRearPortTypeLcDashPc string = "lc-pc" + + // WritableRearPortTypeLcDashUpc captures enum value "lc-upc" + WritableRearPortTypeLcDashUpc string = "lc-upc" + // WritableRearPortTypeLcDashApc captures enum value "lc-apc" WritableRearPortTypeLcDashApc string = "lc-apc" // WritableRearPortTypeLsh captures enum value "lsh" WritableRearPortTypeLsh string = "lsh" + // WritableRearPortTypeLshDashPc captures enum value "lsh-pc" + WritableRearPortTypeLshDashPc string = "lsh-pc" + + // WritableRearPortTypeLshDashUpc captures enum value "lsh-upc" + WritableRearPortTypeLshDashUpc string = "lsh-upc" + // WritableRearPortTypeLshDashApc captures enum value "lsh-apc" WritableRearPortTypeLshDashApc string = "lsh-apc" @@ -422,6 +441,12 @@ const ( // WritableRearPortTypeSc captures enum value "sc" WritableRearPortTypeSc string = "sc" + // WritableRearPortTypeScDashPc captures enum value "sc-pc" + WritableRearPortTypeScDashPc string = "sc-pc" + + // WritableRearPortTypeScDashUpc captures enum value "sc-upc" + WritableRearPortTypeScDashUpc string = "sc-upc" + // WritableRearPortTypeScDashApc captures enum value "sc-apc" WritableRearPortTypeScDashApc string = "sc-apc" @@ -434,6 +459,21 @@ const ( // WritableRearPortTypeSn captures enum value "sn" WritableRearPortTypeSn string = "sn" + // WritableRearPortTypeSmaDash905 captures enum value "sma-905" + WritableRearPortTypeSmaDash905 string = "sma-905" + + // WritableRearPortTypeSmaDash906 captures enum value "sma-906" + WritableRearPortTypeSmaDash906 string = "sma-906" + + // WritableRearPortTypeUrmDashP2 captures enum value "urm-p2" + WritableRearPortTypeUrmDashP2 string = "urm-p2" + + // WritableRearPortTypeUrmDashP4 captures enum value "urm-p4" + WritableRearPortTypeUrmDashP4 string = "urm-p4" + + // WritableRearPortTypeUrmDashP8 captures enum value "urm-p8" + WritableRearPortTypeUrmDashP8 string = "urm-p8" + // WritableRearPortTypeSplice captures enum value "splice" WritableRearPortTypeSplice string = "splice" ) @@ -484,10 +524,6 @@ func (m *WritableRearPort) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } - if err := m.contextValidateCablePeerType(ctx, formats); err != nil { - res = append(res, err) - } - if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -504,6 +540,14 @@ func (m *WritableRearPort) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateLinkPeer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLinkPeerType(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTags(ctx, formats); err != nil { res = append(res, err) } @@ -533,6 +577,8 @@ func (m *WritableRearPort) contextValidateCable(ctx context.Context, formats str if err := m.Cable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cable") } return err } @@ -541,18 +587,9 @@ func (m *WritableRearPort) contextValidateCable(ctx context.Context, formats str return nil } -func (m *WritableRearPort) contextValidateCablePeerType(ctx context.Context, formats strfmt.Registry) error { - - if err := validate.ReadOnly(ctx, "cable_peer_type", "body", string(m.CablePeerType)); err != nil { - return err - } - - return nil -} - func (m *WritableRearPort) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -586,6 +623,20 @@ func (m *WritableRearPort) contextValidateLastUpdated(ctx context.Context, forma return nil } +func (m *WritableRearPort) contextValidateLinkPeer(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *WritableRearPort) contextValidateLinkPeerType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "link_peer_type", "body", string(m.LinkPeerType)); err != nil { + return err + } + + return nil +} + func (m *WritableRearPort) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.Tags); i++ { @@ -594,6 +645,8 @@ func (m *WritableRearPort) contextValidateTags(ctx context.Context, formats strf if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_rear_port_template.go b/netbox/models/writable_rear_port_template.go index faa9ff2ba..15588b09a 100644 --- a/netbox/models/writable_rear_port_template.go +++ b/netbox/models/writable_rear_port_template.go @@ -42,8 +42,8 @@ type WritableRearPortTemplate struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Description // Max Length: 200 @@ -57,7 +57,7 @@ type WritableRearPortTemplate struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -85,7 +85,7 @@ type WritableRearPortTemplate struct { // Type // Required: true - // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-apc lsh lsh-apc mpo mtrj sc sc-apc st cs sn splice] + // Enum: [8p8c 8p6c 8p4c 8p2c 6p6c 6p4c 6p2c 4p4c 4p2c gg45 tera-4p tera-2p tera-1p 110-punch bnc f n mrj21 fc lc lc-pc lc-upc lc-apc lsh lsh-pc lsh-upc lsh-apc mpo mtrj sc sc-pc sc-upc sc-apc st cs sn sma-905 sma-906 urm-p2 urm-p4 urm-p8 splice] Type *string `json:"type"` // Url @@ -165,7 +165,7 @@ func (m *WritableRearPortTemplate) validateCreated(formats strfmt.Registry) erro return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -254,7 +254,7 @@ var writableRearPortTemplateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-apc","lsh","lsh-apc","mpo","mtrj","sc","sc-apc","st","cs","sn","splice"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["8p8c","8p6c","8p4c","8p2c","6p6c","6p4c","6p2c","4p4c","4p2c","gg45","tera-4p","tera-2p","tera-1p","110-punch","bnc","f","n","mrj21","fc","lc","lc-pc","lc-upc","lc-apc","lsh","lsh-pc","lsh-upc","lsh-apc","mpo","mtrj","sc","sc-pc","sc-upc","sc-apc","st","cs","sn","sma-905","sma-906","urm-p2","urm-p4","urm-p8","splice"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -324,12 +324,24 @@ const ( // WritableRearPortTemplateTypeLc captures enum value "lc" WritableRearPortTemplateTypeLc string = "lc" + // WritableRearPortTemplateTypeLcDashPc captures enum value "lc-pc" + WritableRearPortTemplateTypeLcDashPc string = "lc-pc" + + // WritableRearPortTemplateTypeLcDashUpc captures enum value "lc-upc" + WritableRearPortTemplateTypeLcDashUpc string = "lc-upc" + // WritableRearPortTemplateTypeLcDashApc captures enum value "lc-apc" WritableRearPortTemplateTypeLcDashApc string = "lc-apc" // WritableRearPortTemplateTypeLsh captures enum value "lsh" WritableRearPortTemplateTypeLsh string = "lsh" + // WritableRearPortTemplateTypeLshDashPc captures enum value "lsh-pc" + WritableRearPortTemplateTypeLshDashPc string = "lsh-pc" + + // WritableRearPortTemplateTypeLshDashUpc captures enum value "lsh-upc" + WritableRearPortTemplateTypeLshDashUpc string = "lsh-upc" + // WritableRearPortTemplateTypeLshDashApc captures enum value "lsh-apc" WritableRearPortTemplateTypeLshDashApc string = "lsh-apc" @@ -342,6 +354,12 @@ const ( // WritableRearPortTemplateTypeSc captures enum value "sc" WritableRearPortTemplateTypeSc string = "sc" + // WritableRearPortTemplateTypeScDashPc captures enum value "sc-pc" + WritableRearPortTemplateTypeScDashPc string = "sc-pc" + + // WritableRearPortTemplateTypeScDashUpc captures enum value "sc-upc" + WritableRearPortTemplateTypeScDashUpc string = "sc-upc" + // WritableRearPortTemplateTypeScDashApc captures enum value "sc-apc" WritableRearPortTemplateTypeScDashApc string = "sc-apc" @@ -354,6 +372,21 @@ const ( // WritableRearPortTemplateTypeSn captures enum value "sn" WritableRearPortTemplateTypeSn string = "sn" + // WritableRearPortTemplateTypeSmaDash905 captures enum value "sma-905" + WritableRearPortTemplateTypeSmaDash905 string = "sma-905" + + // WritableRearPortTemplateTypeSmaDash906 captures enum value "sma-906" + WritableRearPortTemplateTypeSmaDash906 string = "sma-906" + + // WritableRearPortTemplateTypeUrmDashP2 captures enum value "urm-p2" + WritableRearPortTemplateTypeUrmDashP2 string = "urm-p2" + + // WritableRearPortTemplateTypeUrmDashP4 captures enum value "urm-p4" + WritableRearPortTemplateTypeUrmDashP4 string = "urm-p4" + + // WritableRearPortTemplateTypeUrmDashP8 captures enum value "urm-p8" + WritableRearPortTemplateTypeUrmDashP8 string = "urm-p8" + // WritableRearPortTemplateTypeSplice captures enum value "splice" WritableRearPortTemplateTypeSplice string = "splice" ) @@ -424,7 +457,7 @@ func (m *WritableRearPortTemplate) ContextValidate(ctx context.Context, formats func (m *WritableRearPortTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } diff --git a/netbox/models/writable_region.go b/netbox/models/writable_region.go index 77f339d29..fc2edb532 100644 --- a/netbox/models/writable_region.go +++ b/netbox/models/writable_region.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type WritableRegion struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type WritableRegion struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -83,6 +84,9 @@ type WritableRegion struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -113,6 +117,10 @@ func (m *WritableRegion) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -128,7 +136,7 @@ func (m *WritableRegion) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -197,6 +205,32 @@ func (m *WritableRegion) validateSlug(formats strfmt.Registry) error { return nil } +func (m *WritableRegion) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableRegion) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -237,6 +271,10 @@ func (m *WritableRegion) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -258,7 +296,7 @@ func (m *WritableRegion) contextValidateDepth(ctx context.Context, formats strfm func (m *WritableRegion) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -301,6 +339,26 @@ func (m *WritableRegion) contextValidateSiteCount(ctx context.Context, formats s return nil } +func (m *WritableRegion) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableRegion) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_route_target.go b/netbox/models/writable_route_target.go index ea042613d..0671a3b15 100644 --- a/netbox/models/writable_route_target.go +++ b/netbox/models/writable_route_target.go @@ -37,8 +37,8 @@ type WritableRouteTarget struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -51,7 +51,7 @@ type WritableRouteTarget struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -119,7 +119,7 @@ func (m *WritableRouteTarget) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -181,6 +181,8 @@ func (m *WritableRouteTarget) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -239,7 +241,7 @@ func (m *WritableRouteTarget) ContextValidate(ctx context.Context, formats strfm func (m *WritableRouteTarget) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -281,6 +283,8 @@ func (m *WritableRouteTarget) contextValidateTags(ctx context.Context, formats s if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_service.go b/netbox/models/writable_service.go index 0a1ccd415..c11efa67a 100644 --- a/netbox/models/writable_service.go +++ b/netbox/models/writable_service.go @@ -38,8 +38,8 @@ type WritableService struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -55,7 +55,7 @@ type WritableService struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -80,7 +80,7 @@ type WritableService struct { // Protocol // Required: true - // Enum: [tcp udp] + // Enum: [tcp udp sctp] Protocol *string `json:"protocol"` // tags @@ -146,7 +146,7 @@ func (m *WritableService) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -231,7 +231,7 @@ var writableServiceTypeProtocolPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["tcp","udp"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["tcp","udp","sctp"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -246,6 +246,9 @@ const ( // WritableServiceProtocolUDP captures enum value "udp" WritableServiceProtocolUDP string = "udp" + + // WritableServiceProtocolSctp captures enum value "sctp" + WritableServiceProtocolSctp string = "sctp" ) // prop value enum @@ -284,6 +287,8 @@ func (m *WritableService) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -342,7 +347,7 @@ func (m *WritableService) ContextValidate(ctx context.Context, formats strfmt.Re func (m *WritableService) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -384,6 +389,8 @@ func (m *WritableService) contextValidateTags(ctx context.Context, formats strfm if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_service_template.go b/netbox/models/writable_service_template.go new file mode 100644 index 000000000..be965af8c --- /dev/null +++ b/netbox/models/writable_service_template.go @@ -0,0 +1,403 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableServiceTemplate writable service template +// +// swagger:model WritableServiceTemplate +type WritableServiceTemplate struct { + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // ports + // Required: true + Ports []int64 `json:"ports"` + + // Protocol + // Required: true + // Enum: [tcp udp sctp] + Protocol *string `json:"protocol"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable service template +func (m *WritableServiceTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProtocol(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableServiceTemplate) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) validatePorts(formats strfmt.Registry) error { + + if err := validate.Required("ports", "body", m.Ports); err != nil { + return err + } + + for i := 0; i < len(m.Ports); i++ { + + if err := validate.MinimumInt("ports"+"."+strconv.Itoa(i), "body", m.Ports[i], 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("ports"+"."+strconv.Itoa(i), "body", m.Ports[i], 65535, false); err != nil { + return err + } + + } + + return nil +} + +var writableServiceTemplateTypeProtocolPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["tcp","udp","sctp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableServiceTemplateTypeProtocolPropEnum = append(writableServiceTemplateTypeProtocolPropEnum, v) + } +} + +const ( + + // WritableServiceTemplateProtocolTCP captures enum value "tcp" + WritableServiceTemplateProtocolTCP string = "tcp" + + // WritableServiceTemplateProtocolUDP captures enum value "udp" + WritableServiceTemplateProtocolUDP string = "udp" + + // WritableServiceTemplateProtocolSctp captures enum value "sctp" + WritableServiceTemplateProtocolSctp string = "sctp" +) + +// prop value enum +func (m *WritableServiceTemplate) validateProtocolEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableServiceTemplateTypeProtocolPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableServiceTemplate) validateProtocol(formats strfmt.Registry) error { + + if err := validate.Required("protocol", "body", m.Protocol); err != nil { + return err + } + + // value enum + if err := m.validateProtocolEnum("protocol", "body", *m.Protocol); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableServiceTemplate) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable service template based on the context it is used +func (m *WritableServiceTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableServiceTemplate) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableServiceTemplate) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableServiceTemplate) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableServiceTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableServiceTemplate) UnmarshalBinary(b []byte) error { + var res WritableServiceTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_site.go b/netbox/models/writable_site.go index bd6222d86..5e638f037 100644 --- a/netbox/models/writable_site.go +++ b/netbox/models/writable_site.go @@ -36,12 +36,9 @@ import ( // swagger:model WritableSite type WritableSite struct { - // ASN - // - // 32-bit autonomous system number - // Maximum: 4.294967295e+09 - // Minimum: 1 - Asn *int64 `json:"asn,omitempty"` + // asns + // Unique: true + Asns []int64 `json:"asns"` // Circuit count // Read Only: true @@ -50,23 +47,10 @@ type WritableSite struct { // Comments Comments string `json:"comments,omitempty"` - // Contact E-mail - // Max Length: 254 - // Format: email - ContactEmail strfmt.Email `json:"contact_email,omitempty"` - - // Contact name - // Max Length: 50 - ContactName string `json:"contact_name,omitempty"` - - // Contact phone - // Max Length: 20 - ContactPhone string `json:"contact_phone,omitempty"` - // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -92,7 +76,7 @@ type WritableSite struct { // Group Group *int64 `json:"group,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -174,19 +158,7 @@ type WritableSite struct { func (m *WritableSite) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateAsn(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContactEmail(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContactName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateContactPhone(formats); err != nil { + if err := m.validateAsns(formats); err != nil { res = append(res, err) } @@ -240,56 +212,12 @@ func (m *WritableSite) Validate(formats strfmt.Registry) error { return nil } -func (m *WritableSite) validateAsn(formats strfmt.Registry) error { - if swag.IsZero(m.Asn) { // not required - return nil - } - - if err := validate.MinimumInt("asn", "body", *m.Asn, 1, false); err != nil { - return err - } - - if err := validate.MaximumInt("asn", "body", *m.Asn, 4.294967295e+09, false); err != nil { - return err - } - - return nil -} - -func (m *WritableSite) validateContactEmail(formats strfmt.Registry) error { - if swag.IsZero(m.ContactEmail) { // not required - return nil - } - - if err := validate.MaxLength("contact_email", "body", m.ContactEmail.String(), 254); err != nil { - return err - } - - if err := validate.FormatOf("contact_email", "body", "email", m.ContactEmail.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *WritableSite) validateContactName(formats strfmt.Registry) error { - if swag.IsZero(m.ContactName) { // not required - return nil - } - - if err := validate.MaxLength("contact_name", "body", m.ContactName, 50); err != nil { - return err - } - - return nil -} - -func (m *WritableSite) validateContactPhone(formats strfmt.Registry) error { - if swag.IsZero(m.ContactPhone) { // not required +func (m *WritableSite) validateAsns(formats strfmt.Registry) error { + if swag.IsZero(m.Asns) { // not required return nil } - if err := validate.MaxLength("contact_phone", "body", m.ContactPhone, 20); err != nil { + if err := validate.UniqueItems("asns", "body", m.Asns); err != nil { return err } @@ -301,7 +229,7 @@ func (m *WritableSite) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -471,6 +399,8 @@ func (m *WritableSite) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -562,7 +492,7 @@ func (m *WritableSite) contextValidateCircuitCount(ctx context.Context, formats func (m *WritableSite) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -631,6 +561,8 @@ func (m *WritableSite) contextValidateTags(ctx context.Context, formats strfmt.R if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_site_group.go b/netbox/models/writable_site_group.go index dc328d7fa..ae7260c7c 100644 --- a/netbox/models/writable_site_group.go +++ b/netbox/models/writable_site_group.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type WritableSiteGroup struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type WritableSiteGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -83,6 +84,9 @@ type WritableSiteGroup struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Url // Read Only: true // Format: uri @@ -113,6 +117,10 @@ func (m *WritableSiteGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -128,7 +136,7 @@ func (m *WritableSiteGroup) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -197,6 +205,32 @@ func (m *WritableSiteGroup) validateSlug(formats strfmt.Registry) error { return nil } +func (m *WritableSiteGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableSiteGroup) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -237,6 +271,10 @@ func (m *WritableSiteGroup) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateURL(ctx, formats); err != nil { res = append(res, err) } @@ -258,7 +296,7 @@ func (m *WritableSiteGroup) contextValidateDepth(ctx context.Context, formats st func (m *WritableSiteGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -301,6 +339,26 @@ func (m *WritableSiteGroup) contextValidateSiteCount(ctx context.Context, format return nil } +func (m *WritableSiteGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableSiteGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { diff --git a/netbox/models/writable_tenant.go b/netbox/models/writable_tenant.go index e3264da59..2cef56984 100644 --- a/netbox/models/writable_tenant.go +++ b/netbox/models/writable_tenant.go @@ -48,8 +48,8 @@ type WritableTenant struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -69,7 +69,7 @@ type WritableTenant struct { // Group Group *int64 `json:"group,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -171,7 +171,7 @@ func (m *WritableTenant) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -254,6 +254,8 @@ func (m *WritableTenant) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -370,7 +372,7 @@ func (m *WritableTenant) contextValidateClusterCount(ctx context.Context, format func (m *WritableTenant) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -457,6 +459,8 @@ func (m *WritableTenant) contextValidateTags(ctx context.Context, formats strfmt if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_tenant_group.go b/netbox/models/writable_tenant_group.go index 1cf4429f5..ef5b46593 100644 --- a/netbox/models/writable_tenant_group.go +++ b/netbox/models/writable_tenant_group.go @@ -22,6 +22,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -40,8 +41,8 @@ type WritableTenantGroup struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -54,7 +55,7 @@ type WritableTenantGroup struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -79,6 +80,9 @@ type WritableTenantGroup struct { // Pattern: ^[-a-zA-Z0-9_]+$ Slug *string `json:"slug"` + // tags + Tags []*NestedTag `json:"tags"` + // Tenant count // Read Only: true TenantCount int64 `json:"tenant_count,omitempty"` @@ -113,6 +117,10 @@ func (m *WritableTenantGroup) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + if err := m.validateURL(formats); err != nil { res = append(res, err) } @@ -128,7 +136,7 @@ func (m *WritableTenantGroup) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -197,6 +205,32 @@ func (m *WritableTenantGroup) validateSlug(formats strfmt.Registry) error { return nil } +func (m *WritableTenantGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableTenantGroup) validateURL(formats strfmt.Registry) error { if swag.IsZero(m.URL) { // not required return nil @@ -233,6 +267,10 @@ func (m *WritableTenantGroup) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTenantCount(ctx, formats); err != nil { res = append(res, err) } @@ -258,7 +296,7 @@ func (m *WritableTenantGroup) contextValidateDepth(ctx context.Context, formats func (m *WritableTenantGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -292,6 +330,26 @@ func (m *WritableTenantGroup) contextValidateLastUpdated(ctx context.Context, fo return nil } +func (m *WritableTenantGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *WritableTenantGroup) contextValidateTenantCount(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "tenant_count", "body", int64(m.TenantCount)); err != nil { diff --git a/netbox/models/writable_token.go b/netbox/models/writable_token.go index 3ecd67c0d..c877e5082 100644 --- a/netbox/models/writable_token.go +++ b/netbox/models/writable_token.go @@ -51,7 +51,7 @@ type WritableToken struct { // Format: date-time Expires *strfmt.DateTime `json:"expires,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` diff --git a/netbox/models/writable_v_l_a_n.go b/netbox/models/writable_v_l_a_n.go index bfb28d383..bb2f7c4b7 100644 --- a/netbox/models/writable_v_l_a_n.go +++ b/netbox/models/writable_v_l_a_n.go @@ -38,8 +38,8 @@ type WritableVLAN struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -53,9 +53,10 @@ type WritableVLAN struct { Display string `json:"display,omitempty"` // Group - Group *int64 `json:"group,omitempty"` + // Required: true + Group *int64 `json:"group"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -114,6 +115,10 @@ func (m *WritableVLAN) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateGroup(formats); err != nil { + res = append(res, err) + } + if err := m.validateLastUpdated(formats); err != nil { res = append(res, err) } @@ -149,7 +154,7 @@ func (m *WritableVLAN) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -168,6 +173,15 @@ func (m *WritableVLAN) validateDescription(formats strfmt.Registry) error { return nil } +func (m *WritableVLAN) validateGroup(formats strfmt.Registry) error { + + if err := validate.Required("group", "body", m.Group); err != nil { + return err + } + + return nil +} + func (m *WritableVLAN) validateLastUpdated(formats strfmt.Registry) error { if swag.IsZero(m.LastUpdated) { // not required return nil @@ -256,6 +270,8 @@ func (m *WritableVLAN) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -335,7 +351,7 @@ func (m *WritableVLAN) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *WritableVLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -386,6 +402,8 @@ func (m *WritableVLAN) contextValidateTags(ctx context.Context, formats strfmt.R if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_v_r_f.go b/netbox/models/writable_v_r_f.go index 32977ae41..f15834e87 100644 --- a/netbox/models/writable_v_r_f.go +++ b/netbox/models/writable_v_r_f.go @@ -37,8 +37,8 @@ type WritableVRF struct { // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -60,7 +60,7 @@ type WritableVRF struct { // Unique: true ExportTargets []int64 `json:"export_targets"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -156,7 +156,7 @@ func (m *WritableVRF) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -254,6 +254,8 @@ func (m *WritableVRF) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -320,7 +322,7 @@ func (m *WritableVRF) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *WritableVRF) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -380,6 +382,8 @@ func (m *WritableVRF) contextValidateTags(ctx context.Context, formats strfmt.Re if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_virtual_chassis.go b/netbox/models/writable_virtual_chassis.go index 1bc757365..0a442dd27 100644 --- a/netbox/models/writable_virtual_chassis.go +++ b/netbox/models/writable_virtual_chassis.go @@ -35,6 +35,11 @@ import ( // swagger:model WritableVirtualChassis type WritableVirtualChassis struct { + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -46,10 +51,15 @@ type WritableVirtualChassis struct { // Max Length: 30 Domain string `json:"domain,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + // Master Master *int64 `json:"master,omitempty"` @@ -76,10 +86,18 @@ type WritableVirtualChassis struct { func (m *WritableVirtualChassis) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + if err := m.validateDomain(formats); err != nil { res = append(res, err) } + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -98,6 +116,18 @@ func (m *WritableVirtualChassis) Validate(formats strfmt.Registry) error { return nil } +func (m *WritableVirtualChassis) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableVirtualChassis) validateDomain(formats strfmt.Registry) error { if swag.IsZero(m.Domain) { // not required return nil @@ -110,6 +140,18 @@ func (m *WritableVirtualChassis) validateDomain(formats strfmt.Registry) error { return nil } +func (m *WritableVirtualChassis) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + func (m *WritableVirtualChassis) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { @@ -141,6 +183,8 @@ func (m *WritableVirtualChassis) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -167,6 +211,10 @@ func (m *WritableVirtualChassis) validateURL(formats strfmt.Registry) error { func (m *WritableVirtualChassis) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDisplay(ctx, formats); err != nil { res = append(res, err) } @@ -175,6 +223,10 @@ func (m *WritableVirtualChassis) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMemberCount(ctx, formats); err != nil { res = append(res, err) } @@ -193,6 +245,15 @@ func (m *WritableVirtualChassis) ContextValidate(ctx context.Context, formats st return nil } +func (m *WritableVirtualChassis) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + func (m *WritableVirtualChassis) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { @@ -211,6 +272,15 @@ func (m *WritableVirtualChassis) contextValidateID(ctx context.Context, formats return nil } +func (m *WritableVirtualChassis) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + func (m *WritableVirtualChassis) contextValidateMemberCount(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "member_count", "body", int64(m.MemberCount)); err != nil { @@ -228,6 +298,8 @@ func (m *WritableVirtualChassis) contextValidateTags(ctx context.Context, format if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_virtual_machine_with_config_context.go b/netbox/models/writable_virtual_machine_with_config_context.go index c6b7897b4..fe3ac54ae 100644 --- a/netbox/models/writable_virtual_machine_with_config_context.go +++ b/netbox/models/writable_virtual_machine_with_config_context.go @@ -45,12 +45,12 @@ type WritableVirtualMachineWithConfigContext struct { // Config context // Read Only: true - ConfigContext interface{} `json:"config_context,omitempty"` + ConfigContext map[string]*string `json:"config_context,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -64,7 +64,7 @@ type WritableVirtualMachineWithConfigContext struct { // Read Only: true Display string `json:"display,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -191,7 +191,7 @@ func (m *WritableVirtualMachineWithConfigContext) validateCreated(formats strfmt return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -327,6 +327,8 @@ func (m *WritableVirtualMachineWithConfigContext) validateTags(formats strfmt.Re if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -365,6 +367,10 @@ func (m *WritableVirtualMachineWithConfigContext) validateVcpus(formats strfmt.R func (m *WritableVirtualMachineWithConfigContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateConfigContext(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCreated(ctx, formats); err != nil { res = append(res, err) } @@ -403,9 +409,14 @@ func (m *WritableVirtualMachineWithConfigContext) ContextValidate(ctx context.Co return nil } +func (m *WritableVirtualMachineWithConfigContext) contextValidateConfigContext(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + func (m *WritableVirtualMachineWithConfigContext) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -465,6 +476,8 @@ func (m *WritableVirtualMachineWithConfigContext) contextValidateTags(ctx contex if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_vm_interface.go b/netbox/models/writable_vm_interface.go index 62821d275..bb85f92b3 100644 --- a/netbox/models/writable_vm_interface.go +++ b/netbox/models/writable_vm_interface.go @@ -36,14 +36,21 @@ import ( // swagger:model WritableVMInterface type WritableVMInterface struct { + // Bridge interface + Bridge *int64 `json:"bridge,omitempty"` + + // Count fhrp groups + // Read Only: true + CountFhrpGroups int64 `json:"count_fhrp_groups,omitempty"` + // Count ipaddresses // Read Only: true CountIpaddresses int64 `json:"count_ipaddresses,omitempty"` // Created // Read Only: true - // Format: date - Created strfmt.Date `json:"created,omitempty"` + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` // Custom fields CustomFields interface{} `json:"custom_fields,omitempty"` @@ -59,7 +66,7 @@ type WritableVMInterface struct { // Enabled Enabled bool `json:"enabled,omitempty"` - // Id + // ID // Read Only: true ID int64 `json:"id,omitempty"` @@ -107,6 +114,9 @@ type WritableVMInterface struct { // Virtual machine // Required: true VirtualMachine *int64 `json:"virtual_machine"` + + // VRF + Vrf *int64 `json:"vrf,omitempty"` } // Validate validates this writable VM interface @@ -164,7 +174,7 @@ func (m *WritableVMInterface) validateCreated(formats strfmt.Registry) error { return nil } - if err := validate.FormatOf("created", "body", "date", m.Created.String(), formats); err != nil { + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { return err } @@ -299,6 +309,8 @@ func (m *WritableVMInterface) validateTags(formats strfmt.Registry) error { if err := m.Tags[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } @@ -334,6 +346,10 @@ func (m *WritableVMInterface) validateVirtualMachine(formats strfmt.Registry) er func (m *WritableVMInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCountFhrpGroups(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCountIpaddresses(ctx, formats); err != nil { res = append(res, err) } @@ -368,6 +384,15 @@ func (m *WritableVMInterface) ContextValidate(ctx context.Context, formats strfm return nil } +func (m *WritableVMInterface) contextValidateCountFhrpGroups(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "count_fhrp_groups", "body", int64(m.CountFhrpGroups)); err != nil { + return err + } + + return nil +} + func (m *WritableVMInterface) contextValidateCountIpaddresses(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "count_ipaddresses", "body", int64(m.CountIpaddresses)); err != nil { @@ -379,7 +404,7 @@ func (m *WritableVMInterface) contextValidateCountIpaddresses(ctx context.Contex func (m *WritableVMInterface) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - if err := validate.ReadOnly(ctx, "created", "body", strfmt.Date(m.Created)); err != nil { + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { return err } @@ -421,6 +446,8 @@ func (m *WritableVMInterface) contextValidateTags(ctx context.Context, formats s if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) } return err } diff --git a/netbox/models/writable_wireless_l_a_n.go b/netbox/models/writable_wireless_l_a_n.go new file mode 100644 index 000000000..cbc96a232 --- /dev/null +++ b/netbox/models/writable_wireless_l_a_n.go @@ -0,0 +1,454 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableWirelessLAN writable wireless l a n +// +// swagger:model WritableWirelessLAN +type WritableWirelessLAN struct { + + // Auth cipher + // Enum: [auto tkip aes] + AuthCipher string `json:"auth_cipher,omitempty"` + + // Pre-shared key + // Max Length: 64 + AuthPsk string `json:"auth_psk,omitempty"` + + // Auth type + // Enum: [open wep wpa-personal wpa-enterprise] + AuthType string `json:"auth_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // Group + Group *int64 `json:"group,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // SSID + // Required: true + // Max Length: 32 + // Min Length: 1 + Ssid *string `json:"ssid"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // VLAN + Vlan *int64 `json:"vlan,omitempty"` +} + +// Validate validates this writable wireless l a n +func (m *WritableWirelessLAN) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthCipher(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthPsk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSsid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var writableWirelessLANTypeAuthCipherPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["auto","tkip","aes"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableWirelessLANTypeAuthCipherPropEnum = append(writableWirelessLANTypeAuthCipherPropEnum, v) + } +} + +const ( + + // WritableWirelessLANAuthCipherAuto captures enum value "auto" + WritableWirelessLANAuthCipherAuto string = "auto" + + // WritableWirelessLANAuthCipherTkip captures enum value "tkip" + WritableWirelessLANAuthCipherTkip string = "tkip" + + // WritableWirelessLANAuthCipherAes captures enum value "aes" + WritableWirelessLANAuthCipherAes string = "aes" +) + +// prop value enum +func (m *WritableWirelessLAN) validateAuthCipherEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableWirelessLANTypeAuthCipherPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableWirelessLAN) validateAuthCipher(formats strfmt.Registry) error { + if swag.IsZero(m.AuthCipher) { // not required + return nil + } + + // value enum + if err := m.validateAuthCipherEnum("auth_cipher", "body", m.AuthCipher); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) validateAuthPsk(formats strfmt.Registry) error { + if swag.IsZero(m.AuthPsk) { // not required + return nil + } + + if err := validate.MaxLength("auth_psk", "body", m.AuthPsk, 64); err != nil { + return err + } + + return nil +} + +var writableWirelessLANTypeAuthTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["open","wep","wpa-personal","wpa-enterprise"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableWirelessLANTypeAuthTypePropEnum = append(writableWirelessLANTypeAuthTypePropEnum, v) + } +} + +const ( + + // WritableWirelessLANAuthTypeOpen captures enum value "open" + WritableWirelessLANAuthTypeOpen string = "open" + + // WritableWirelessLANAuthTypeWep captures enum value "wep" + WritableWirelessLANAuthTypeWep string = "wep" + + // WritableWirelessLANAuthTypeWpaDashPersonal captures enum value "wpa-personal" + WritableWirelessLANAuthTypeWpaDashPersonal string = "wpa-personal" + + // WritableWirelessLANAuthTypeWpaDashEnterprise captures enum value "wpa-enterprise" + WritableWirelessLANAuthTypeWpaDashEnterprise string = "wpa-enterprise" +) + +// prop value enum +func (m *WritableWirelessLAN) validateAuthTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableWirelessLANTypeAuthTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableWirelessLAN) validateAuthType(formats strfmt.Registry) error { + if swag.IsZero(m.AuthType) { // not required + return nil + } + + // value enum + if err := m.validateAuthTypeEnum("auth_type", "body", m.AuthType); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) validateSsid(formats strfmt.Registry) error { + + if err := validate.Required("ssid", "body", m.Ssid); err != nil { + return err + } + + if err := validate.MinLength("ssid", "body", *m.Ssid, 1); err != nil { + return err + } + + if err := validate.MaxLength("ssid", "body", *m.Ssid, 32); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableWirelessLAN) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable wireless l a n based on the context it is used +func (m *WritableWirelessLAN) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableWirelessLAN) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLAN) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableWirelessLAN) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableWirelessLAN) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableWirelessLAN) UnmarshalBinary(b []byte) error { + var res WritableWirelessLAN + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_wireless_l_a_n_group.go b/netbox/models/writable_wireless_l_a_n_group.go new file mode 100644 index 000000000..76f786ec5 --- /dev/null +++ b/netbox/models/writable_wireless_l_a_n_group.go @@ -0,0 +1,401 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableWirelessLANGroup writable wireless l a n group +// +// swagger:model WritableWirelessLANGroup +type WritableWirelessLANGroup struct { + + // depth + // Read Only: true + Depth int64 `json:"_depth,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // Name + // Required: true + // Max Length: 100 + // Min Length: 1 + Name *string `json:"name"` + + // Parent + // Required: true + Parent *int64 `json:"parent"` + + // Slug + // Required: true + // Max Length: 100 + // Min Length: 1 + // Pattern: ^[-a-zA-Z0-9_]+$ + Slug *string `json:"slug"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` + + // Wirelesslan count + // Read Only: true + WirelesslanCount int64 `json:"wirelesslan_count,omitempty"` +} + +// Validate validates this writable wireless l a n group +func (m *WritableWirelessLANGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSlug(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableWirelessLANGroup) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + if err := validate.MinLength("name", "body", *m.Name, 1); err != nil { + return err + } + + if err := validate.MaxLength("name", "body", *m.Name, 100); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateParent(formats strfmt.Registry) error { + + if err := validate.Required("parent", "body", m.Parent); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateSlug(formats strfmt.Registry) error { + + if err := validate.Required("slug", "body", m.Slug); err != nil { + return err + } + + if err := validate.MinLength("slug", "body", *m.Slug, 1); err != nil { + return err + } + + if err := validate.MaxLength("slug", "body", *m.Slug, 100); err != nil { + return err + } + + if err := validate.Pattern("slug", "body", *m.Slug, `^[-a-zA-Z0-9_]+$`); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableWirelessLANGroup) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable wireless l a n group based on the context it is used +func (m *WritableWirelessLANGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDepth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWirelesslanCount(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateDepth(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "_depth", "body", int64(m.Depth)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLANGroup) contextValidateWirelesslanCount(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "wirelesslan_count", "body", int64(m.WirelesslanCount)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableWirelessLANGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableWirelessLANGroup) UnmarshalBinary(b []byte) error { + var res WritableWirelessLANGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/netbox/models/writable_wireless_link.go b/netbox/models/writable_wireless_link.go new file mode 100644 index 000000000..cbdf105aa --- /dev/null +++ b/netbox/models/writable_wireless_link.go @@ -0,0 +1,528 @@ +// 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 models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// WritableWirelessLink writable wireless link +// +// swagger:model WritableWirelessLink +type WritableWirelessLink struct { + + // Auth cipher + // Enum: [auto tkip aes] + AuthCipher string `json:"auth_cipher,omitempty"` + + // Pre-shared key + // Max Length: 64 + AuthPsk string `json:"auth_psk,omitempty"` + + // Auth type + // Enum: [open wep wpa-personal wpa-enterprise] + AuthType string `json:"auth_type,omitempty"` + + // Created + // Read Only: true + // Format: date-time + Created strfmt.DateTime `json:"created,omitempty"` + + // Custom fields + CustomFields interface{} `json:"custom_fields,omitempty"` + + // Description + // Max Length: 200 + Description string `json:"description,omitempty"` + + // Display + // Read Only: true + Display string `json:"display,omitempty"` + + // ID + // Read Only: true + ID int64 `json:"id,omitempty"` + + // Interface a + // Required: true + Interfacea *int64 `json:"interface_a"` + + // Interface b + // Required: true + Interfaceb *int64 `json:"interface_b"` + + // Last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"last_updated,omitempty"` + + // SSID + // Max Length: 32 + Ssid string `json:"ssid,omitempty"` + + // Status + // Enum: [connected planned decommissioning] + Status string `json:"status,omitempty"` + + // tags + Tags []*NestedTag `json:"tags"` + + // Url + // Read Only: true + // Format: uri + URL strfmt.URI `json:"url,omitempty"` +} + +// Validate validates this writable wireless link +func (m *WritableWirelessLink) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthCipher(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthPsk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAuthType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfacea(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaceb(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSsid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var writableWirelessLinkTypeAuthCipherPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["auto","tkip","aes"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableWirelessLinkTypeAuthCipherPropEnum = append(writableWirelessLinkTypeAuthCipherPropEnum, v) + } +} + +const ( + + // WritableWirelessLinkAuthCipherAuto captures enum value "auto" + WritableWirelessLinkAuthCipherAuto string = "auto" + + // WritableWirelessLinkAuthCipherTkip captures enum value "tkip" + WritableWirelessLinkAuthCipherTkip string = "tkip" + + // WritableWirelessLinkAuthCipherAes captures enum value "aes" + WritableWirelessLinkAuthCipherAes string = "aes" +) + +// prop value enum +func (m *WritableWirelessLink) validateAuthCipherEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableWirelessLinkTypeAuthCipherPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableWirelessLink) validateAuthCipher(formats strfmt.Registry) error { + if swag.IsZero(m.AuthCipher) { // not required + return nil + } + + // value enum + if err := m.validateAuthCipherEnum("auth_cipher", "body", m.AuthCipher); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateAuthPsk(formats strfmt.Registry) error { + if swag.IsZero(m.AuthPsk) { // not required + return nil + } + + if err := validate.MaxLength("auth_psk", "body", m.AuthPsk, 64); err != nil { + return err + } + + return nil +} + +var writableWirelessLinkTypeAuthTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["open","wep","wpa-personal","wpa-enterprise"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableWirelessLinkTypeAuthTypePropEnum = append(writableWirelessLinkTypeAuthTypePropEnum, v) + } +} + +const ( + + // WritableWirelessLinkAuthTypeOpen captures enum value "open" + WritableWirelessLinkAuthTypeOpen string = "open" + + // WritableWirelessLinkAuthTypeWep captures enum value "wep" + WritableWirelessLinkAuthTypeWep string = "wep" + + // WritableWirelessLinkAuthTypeWpaDashPersonal captures enum value "wpa-personal" + WritableWirelessLinkAuthTypeWpaDashPersonal string = "wpa-personal" + + // WritableWirelessLinkAuthTypeWpaDashEnterprise captures enum value "wpa-enterprise" + WritableWirelessLinkAuthTypeWpaDashEnterprise string = "wpa-enterprise" +) + +// prop value enum +func (m *WritableWirelessLink) validateAuthTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableWirelessLinkTypeAuthTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableWirelessLink) validateAuthType(formats strfmt.Registry) error { + if swag.IsZero(m.AuthType) { // not required + return nil + } + + // value enum + if err := m.validateAuthTypeEnum("auth_type", "body", m.AuthType); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateCreated(formats strfmt.Registry) error { + if swag.IsZero(m.Created) { // not required + return nil + } + + if err := validate.FormatOf("created", "body", "date-time", m.Created.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateDescription(formats strfmt.Registry) error { + if swag.IsZero(m.Description) { // not required + return nil + } + + if err := validate.MaxLength("description", "body", m.Description, 200); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateInterfacea(formats strfmt.Registry) error { + + if err := validate.Required("interface_a", "body", m.Interfacea); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateInterfaceb(formats strfmt.Registry) error { + + if err := validate.Required("interface_b", "body", m.Interfaceb); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("last_updated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateSsid(formats strfmt.Registry) error { + if swag.IsZero(m.Ssid) { // not required + return nil + } + + if err := validate.MaxLength("ssid", "body", m.Ssid, 32); err != nil { + return err + } + + return nil +} + +var writableWirelessLinkTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["connected","planned","decommissioning"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + writableWirelessLinkTypeStatusPropEnum = append(writableWirelessLinkTypeStatusPropEnum, v) + } +} + +const ( + + // WritableWirelessLinkStatusConnected captures enum value "connected" + WritableWirelessLinkStatusConnected string = "connected" + + // WritableWirelessLinkStatusPlanned captures enum value "planned" + WritableWirelessLinkStatusPlanned string = "planned" + + // WritableWirelessLinkStatusDecommissioning captures enum value "decommissioning" + WritableWirelessLinkStatusDecommissioning string = "decommissioning" +) + +// prop value enum +func (m *WritableWirelessLink) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, writableWirelessLinkTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *WritableWirelessLink) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) validateTags(formats strfmt.Registry) error { + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableWirelessLink) validateURL(formats strfmt.Registry) error { + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := validate.FormatOf("url", "body", "uri", m.URL.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this writable wireless link based on the context it is used +func (m *WritableWirelessLink) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTags(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WritableWirelessLink) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "created", "body", strfmt.DateTime(m.Created)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) contextValidateDisplay(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "display", "body", string(m.Display)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", int64(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "last_updated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *WritableWirelessLink) contextValidateTags(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tags); i++ { + + if m.Tags[i] != nil { + if err := m.Tags[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *WritableWirelessLink) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "url", "body", strfmt.URI(m.URL)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *WritableWirelessLink) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WritableWirelessLink) UnmarshalBinary(b []byte) error { + var res WritableWirelessLink + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/swagger.json b/swagger.json index 977c1fdfc..a53d3d0af 100644 --- a/swagger.json +++ b/swagger.json @@ -7,11 +7,11 @@ "license": { "name": "Apache v2 License" }, - "version": "3.0" + "version": "3.2" }, - "host": "localhost:8099", + "host": "localhost", "schemes": [ - "http" + "https" ], "basePath": "/api", "consumes": [ @@ -73,6 +73,13 @@ "required": false, "type": "string" }, + { + "name": "description", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -333,7 +340,63 @@ "type": "string" }, { - "name": "xconnect_id__empty", + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", "in": "query", "description": "", "required": false, @@ -652,6 +715,13 @@ "required": false, "type": "string" }, + { + "name": "description", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -701,6 +771,13 @@ "required": false, "type": "string" }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -799,13 +876,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "slug__n", "in": "query", @@ -870,7 +940,70 @@ "type": "string" }, { - "name": "slug__empty", + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", "in": "query", "description": "", "required": false, @@ -1127,6 +1260,13 @@ "required": false, "type": "string" }, + { + "name": "description", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "install_date", "in": "query", @@ -1183,6 +1323,20 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tenant_group_id", "in": "query", @@ -1212,7 +1366,14 @@ "type": "string" }, { - "name": "q", + "name": "contact", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role", "in": "query", "description": "", "required": false, @@ -1302,13 +1463,6 @@ "required": false, "type": "string" }, - { - "name": "tag", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "id__n", "in": "query", @@ -1408,7 +1562,63 @@ "type": "string" }, { - "name": "cid__empty", + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", "in": "query", "description": "", "required": false, @@ -1484,6 +1694,13 @@ "required": false, "type": "string" }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tenant_group_id__n", "in": "query", @@ -1512,6 +1729,20 @@ "required": false, "type": "string" }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "provider_id__n", "in": "query", @@ -1596,13 +1827,6 @@ "required": false, "type": "string" }, - { - "name": "tag__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "limit", "in": "query", @@ -1854,6 +2078,20 @@ "required": false, "type": "string" }, + { + "name": "service_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -1904,21 +2142,21 @@ "type": "string" }, { - "name": "provider_id", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "provider", + "name": "provider_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "provider", "in": "query", "description": "", "required": false, @@ -2023,21 +2261,126 @@ "type": "string" }, { - "name": "name__empty", + "name": "service_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "provider_id__n", + "name": "service_id__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "provider__n", + "name": "service_id__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "service_id__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "service_id__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "service_id__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "service_id__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "service_id__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "service_id__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", "in": "query", "description": "", "required": false, @@ -2050,6 +2393,20 @@ "required": false, "type": "string" }, + { + "name": "provider_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "provider__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -2371,6 +2728,27 @@ "required": false, "type": "string" }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "region_id", "in": "query", @@ -2414,7 +2792,7 @@ "type": "string" }, { - "name": "tag", + "name": "asn_id", "in": "query", "description": "", "required": false, @@ -2518,13 +2896,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "slug__n", "in": "query", @@ -2588,13 +2959,6 @@ "required": false, "type": "string" }, - { - "name": "slug__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "asn__n", "in": "query", @@ -2694,7 +3058,21 @@ "type": "string" }, { - "name": "account__empty", + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", "in": "query", "description": "", "required": false, @@ -2743,7 +3121,7 @@ "type": "string" }, { - "name": "tag__n", + "name": "asn_id__n", "in": "query", "description": "", "required": false, @@ -2810,7 +3188,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Provider" + "$ref": "#/definitions/WritableProvider" } } ], @@ -2835,7 +3213,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Provider" + "$ref": "#/definitions/WritableProvider" } } ], @@ -2860,7 +3238,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Provider" + "$ref": "#/definitions/WritableProvider" } } ], @@ -2917,7 +3295,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Provider" + "$ref": "#/definitions/WritableProvider" } } ], @@ -2942,7 +3320,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Provider" + "$ref": "#/definitions/WritableProvider" } } ], @@ -3014,6 +3392,48 @@ "required": false, "type": "string" }, + { + "name": "termination_a_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -3064,84 +3484,84 @@ "type": "string" }, { - "name": "type", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status", + "name": "termination_a_type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color", + "name": "termination_b_type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack_id", + "name": "color", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "rack_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "rack", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "site", "in": "query", "description": "", "required": false, @@ -3245,13 +3665,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "length__n", "in": "query", @@ -3295,21 +3708,98 @@ "type": "string" }, { - "name": "type__n", + "name": "termination_a_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status__n", + "name": "termination_a_id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__n", + "name": "termination_a_id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_a_id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_a_id__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_id__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_id__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant__n", "in": "query", "description": "", "required": false, @@ -3322,6 +3812,41 @@ "required": false, "type": "string" }, + { + "name": "termination_a_type__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "termination_b_type__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "type__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "color__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -3656,6 +4181,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -3663,6 +4195,13 @@ "required": false, "type": "string" }, + { + "name": "moduletype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -3762,21 +4301,21 @@ "type": "string" }, { - "name": "name__empty", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id__n", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -4048,119 +4587,140 @@ "type": "string" }, { - "name": "created", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "virtual_chassis", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id", + "name": "module_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "created__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", "in": "query", "description": "", "required": false, @@ -4292,13 +4852,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "label__n", "in": "query", @@ -4362,13 +4915,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "description__n", "in": "query", @@ -4432,13 +4978,6 @@ "required": false, "type": "string" }, - { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "region_id__n", "in": "query", @@ -4509,6 +5048,27 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag__n", "in": "query", @@ -4850,6 +5410,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -4857,6 +5424,13 @@ "required": false, "type": "string" }, + { + "name": "moduletype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -4956,21 +5530,21 @@ "type": "string" }, { - "name": "name__empty", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id__n", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -5241,48 +5815,6 @@ "required": false, "type": "string" }, - { - "name": "created", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "created__gte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "created__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated__gte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "q", "in": "query", @@ -5360,6 +5892,69 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag", "in": "query", @@ -5486,13 +6081,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "label__n", "in": "query", @@ -5556,13 +6144,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "description__n", "in": "query", @@ -5626,13 +6207,6 @@ "required": false, "type": "string" }, - { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "region_id__n", "in": "query", @@ -5703,6 +6277,27 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag__n", "in": "query", @@ -6037,6 +6632,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -6142,13 +6744,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "devicetype_id__n", "in": "query", @@ -6422,119 +7017,133 @@ "type": "string" }, { - "name": "created", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "virtual_chassis", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "last_updated", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", "in": "query", "description": "", "required": false, @@ -6645,13 +7254,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "label__n", "in": "query", @@ -6715,13 +7317,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "description__n", "in": "query", @@ -6785,13 +7380,6 @@ "required": false, "type": "string" }, - { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "region_id__n", "in": "query", @@ -6862,6 +7450,20 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag__n", "in": "query", @@ -7141,6 +7743,13 @@ "required": false, "type": "string" }, + { + "name": "description", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -7190,6 +7799,13 @@ "required": false, "type": "string" }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -7288,13 +7904,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "slug__n", "in": "query", @@ -7358,13 +7967,6 @@ "required": false, "type": "string" }, - { - "name": "slug__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "color__n", "in": "query", @@ -7429,7 +8031,70 @@ "type": "string" }, { - "name": "color__empty", + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", "in": "query", "description": "", "required": false, @@ -7721,6 +8386,13 @@ "required": false, "type": "string" }, + { + "name": "airflow", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -7770,6 +8442,13 @@ "required": false, "type": "string" }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "manufacturer_id", "in": "query", @@ -7827,14 +8506,14 @@ "type": "string" }, { - "name": "device_bays", + "name": "module_bays", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "device_bays", "in": "query", "description": "", "required": false, @@ -7938,13 +8617,6 @@ "required": false, "type": "string" }, - { - "name": "model__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "slug__n", "in": "query", @@ -8008,13 +8680,6 @@ "required": false, "type": "string" }, - { - "name": "slug__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "part_number__n", "in": "query", @@ -8078,13 +8743,6 @@ "required": false, "type": "string" }, - { - "name": "part_number__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "u_height__n", "in": "query", @@ -8128,21 +8786,28 @@ "type": "string" }, { - "name": "manufacturer_id__n", + "name": "airflow__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer__n", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "manufacturer_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer__n", "in": "query", "description": "", "required": false, @@ -8420,6 +9085,13 @@ "required": false, "type": "string" }, + { + "name": "airflow", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "vc_position", "in": "query", @@ -8476,6 +9148,20 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tenant_group_id", "in": "query", @@ -8505,14 +9191,21 @@ "type": "string" }, { - "name": "local_context_data", + "name": "contact", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "contact_role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "local_context_data", "in": "query", "description": "", "required": false, @@ -8553,6 +9246,13 @@ "required": false, "type": "string" }, + { + "name": "parent_device_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "platform_id", "in": "query", @@ -8729,14 +9429,14 @@ "type": "string" }, { - "name": "device_bays", + "name": "module_bays", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "device_bays", "in": "query", "description": "", "required": false, @@ -8840,13 +9540,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "asset_tag__n", "in": "query", @@ -8910,13 +9603,6 @@ "required": false, "type": "string" }, - { - "name": "asset_tag__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "face__n", "in": "query", @@ -8959,6 +9645,13 @@ "required": false, "type": "string" }, + { + "name": "airflow__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "vc_position__n", "in": "query", @@ -9029,6 +9722,13 @@ "required": false, "type": "string" }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tenant_group_id__n", "in": "query", @@ -9057,6 +9757,20 @@ "required": false, "type": "string" }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "manufacturer_id__n", "in": "query", @@ -9092,6 +9806,13 @@ "required": false, "type": "string" }, + { + "name": "parent_device_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "platform_id__n", "in": "query", @@ -9253,13 +9974,6 @@ "required": false, "type": "string" }, - { - "name": "tag__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "limit", "in": "query", @@ -9601,6 +10315,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -9608,6 +10329,13 @@ "required": false, "type": "string" }, + { + "name": "moduletype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -9706,13 +10434,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "type__n", "in": "query", @@ -9784,14 +10505,14 @@ "type": "string" }, { - "name": "color__empty", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id__n", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -10077,119 +10798,140 @@ "type": "string" }, { - "name": "created", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "virtual_chassis", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id", + "name": "module_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "created__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", "in": "query", "description": "", "required": false, @@ -10307,13 +11049,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "label__n", "in": "query", @@ -10377,13 +11112,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "type__n", "in": "query", @@ -10454,13 +11182,6 @@ "required": false, "type": "string" }, - { - "name": "color__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "description__n", "in": "query", @@ -10524,13 +11245,6 @@ "required": false, "type": "string" }, - { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "region_id__n", "in": "query", @@ -10601,6 +11315,27 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag__n", "in": "query", @@ -10942,6 +11677,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -10949,6 +11691,13 @@ "required": false, "type": "string" }, + { + "name": "moduletype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -11048,21 +11797,21 @@ "type": "string" }, { - "name": "name__empty", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id__n", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -11362,49 +12111,42 @@ "type": "string" }, { - "name": "description", + "name": "rf_role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "rf_channel", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "rf_channel_frequency", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "rf_channel_width", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "tx_power", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated__lte", + "name": "description", "in": "query", "description": "", "required": false, @@ -11487,6 +12229,69 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag", "in": "query", @@ -11522,6 +12327,13 @@ "required": false, "type": "string" }, + { + "name": "bridge_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "lag_id", "in": "query", @@ -11529,6 +12341,20 @@ "required": false, "type": "string" }, + { + "name": "speed", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "duplex", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "mac_address", "in": "query", @@ -11536,6 +12362,13 @@ "required": false, "type": "string" }, + { + "name": "wwn", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "vlan_id", "in": "query", @@ -11550,6 +12383,20 @@ "required": false, "type": "string" }, + { + "name": "vrf_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vrf", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -11648,13 +12495,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "label__n", "in": "query", @@ -11718,13 +12558,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "type__n", "in": "query", @@ -11774,6 +12607,125 @@ "required": false, "type": "string" }, + { + "name": "rf_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_frequency__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_frequency__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_frequency__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_frequency__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_frequency__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_width__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_width__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_width__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_width__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rf_channel_width__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tx_power__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tx_power__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tx_power__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tx_power__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tx_power__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "description__n", "in": "query", @@ -11837,13 +12789,6 @@ "required": false, "type": "string" }, - { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "region_id__n", "in": "query", @@ -11900,6 +12845,27 @@ "required": false, "type": "string" }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "tag__n", "in": "query", @@ -11914,6 +12880,13 @@ "required": false, "type": "string" }, + { + "name": "bridge_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "lag_id__n", "in": "query", @@ -11921,6 +12894,48 @@ "required": false, "type": "string" }, + { + "name": "speed__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "speed__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "speed__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "speed__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "speed__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "duplex__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "mac_address__n", "in": "query", @@ -11984,6 +12999,83 @@ "required": false, "type": "string" }, + { + "name": "wwn__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "wwn__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vrf_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "vrf__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -12243,9 +13335,9 @@ } ] }, - "/dcim/inventory-items/": { + "/dcim/inventory-item-roles/": { "get": { - "operationId": "dcim_inventory-items_list", + "operationId": "dcim_inventory-item-roles_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -12263,28 +13355,14 @@ "type": "string" }, { - "name": "label", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "discovered", + "name": "color", "in": "query", "description": "", "required": false, @@ -12339,76 +13417,6 @@ "required": false, "type": "string" }, - { - "name": "region_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "tag", "in": "query", @@ -12416,34 +13424,6 @@ "required": false, "type": "string" }, - { - "name": "parent_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "manufacturer_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "manufacturer", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "serial", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "id__n", "in": "query", @@ -12543,287 +13523,126 @@ "type": "string" }, { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "part_id__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__nic", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__iew", + "name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__niew", + "name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__isw", + "name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__nisw", + "name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__ie", + "name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__nie", + "name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag__empty", + "name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "color__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "color__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group__n", + "name": "color__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "color__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "color__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id__n", + "name": "color__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location__n", + "name": "color__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id__n", + "name": "color__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device__n", + "name": "color__nie", "in": "query", "description": "", "required": false, @@ -12836,27 +13655,6 @@ "required": false, "type": "string" }, - { - "name": "parent_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "manufacturer_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "manufacturer__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "limit", "in": "query", @@ -12898,7 +13696,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } } @@ -12910,7 +13708,7 @@ ] }, "post": { - "operationId": "dcim_inventory-items_create", + "operationId": "dcim_inventory-item-roles_create", "description": "", "parameters": [ { @@ -12918,7 +13716,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } ], @@ -12926,7 +13724,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } }, @@ -12935,7 +13733,7 @@ ] }, "put": { - "operationId": "dcim_inventory-items_bulk_update", + "operationId": "dcim_inventory-item-roles_bulk_update", "description": "", "parameters": [ { @@ -12943,7 +13741,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } ], @@ -12951,7 +13749,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } }, @@ -12960,7 +13758,7 @@ ] }, "patch": { - "operationId": "dcim_inventory-items_bulk_partial_update", + "operationId": "dcim_inventory-item-roles_bulk_partial_update", "description": "", "parameters": [ { @@ -12968,7 +13766,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } ], @@ -12976,7 +13774,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } }, @@ -12985,7 +13783,7 @@ ] }, "delete": { - "operationId": "dcim_inventory-items_bulk_delete", + "operationId": "dcim_inventory-item-roles_bulk_delete", "description": "", "parameters": [], "responses": { @@ -12999,16 +13797,16 @@ }, "parameters": [] }, - "/dcim/inventory-items/{id}/": { + "/dcim/inventory-item-roles/{id}/": { "get": { - "operationId": "dcim_inventory-items_read", + "operationId": "dcim_inventory-item-roles_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } }, @@ -13017,7 +13815,7 @@ ] }, "put": { - "operationId": "dcim_inventory-items_update", + "operationId": "dcim_inventory-item-roles_update", "description": "", "parameters": [ { @@ -13025,7 +13823,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } ], @@ -13033,7 +13831,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } }, @@ -13042,7 +13840,7 @@ ] }, "patch": { - "operationId": "dcim_inventory-items_partial_update", + "operationId": "dcim_inventory-item-roles_partial_update", "description": "", "parameters": [ { @@ -13050,7 +13848,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableInventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } ], @@ -13058,7 +13856,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/InventoryItem" + "$ref": "#/definitions/InventoryItemRole" } } }, @@ -13067,7 +13865,7 @@ ] }, "delete": { - "operationId": "dcim_inventory-items_delete", + "operationId": "dcim_inventory-item-roles_delete", "description": "", "parameters": [], "responses": { @@ -13083,15 +13881,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this inventory item.", + "description": "A unique integer value identifying this inventory item role.", "required": true, "type": "integer" } ] }, - "/dcim/locations/": { + "/dcim/inventory-item-templates/": { "get": { - "operationId": "dcim_locations_list", + "operationId": "dcim_inventory-item-templates_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -13109,14 +13907,14 @@ "type": "string" }, { - "name": "slug", + "name": "label", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description", + "name": "part_id", "in": "query", "description": "", "required": false, @@ -13172,56 +13970,56 @@ "type": "string" }, { - "name": "region_id", + "name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "parent_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "role_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id", + "name": "component_type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent", + "name": "component_id", "in": "query", "description": "", "required": false, @@ -13326,203 +14124,210 @@ "type": "string" }, { - "name": "name__empty", + "name": "label__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__n", + "name": "label__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ic", + "name": "label__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nic", + "name": "label__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__iew", + "name": "label__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__niew", + "name": "label__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__isw", + "name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nisw", + "name": "label__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ie", + "name": "label__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nie", + "name": "part_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__empty", + "name": "part_id__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__n", + "name": "part_id__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__ic", + "name": "part_id__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nic", + "name": "part_id__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__iew", + "name": "part_id__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__niew", + "name": "part_id__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__isw", + "name": "part_id__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nisw", + "name": "part_id__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__ie", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nie", + "name": "parent_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__empty", + "name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "manufacturer__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "role_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "role__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group__n", + "name": "component_type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "component_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "component_id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id__n", + "name": "component_id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent__n", + "name": "component_id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id__gt", "in": "query", "description": "", "required": false, @@ -13569,7 +14374,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } } @@ -13581,7 +14386,7 @@ ] }, "post": { - "operationId": "dcim_locations_create", + "operationId": "dcim_inventory-item-templates_create", "description": "", "parameters": [ { @@ -13589,7 +14394,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableLocation" + "$ref": "#/definitions/WritableInventoryItemTemplate" } } ], @@ -13597,7 +14402,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } }, @@ -13606,7 +14411,7 @@ ] }, "put": { - "operationId": "dcim_locations_bulk_update", + "operationId": "dcim_inventory-item-templates_bulk_update", "description": "", "parameters": [ { @@ -13614,7 +14419,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableLocation" + "$ref": "#/definitions/WritableInventoryItemTemplate" } } ], @@ -13622,7 +14427,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } }, @@ -13631,7 +14436,7 @@ ] }, "patch": { - "operationId": "dcim_locations_bulk_partial_update", + "operationId": "dcim_inventory-item-templates_bulk_partial_update", "description": "", "parameters": [ { @@ -13639,7 +14444,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableLocation" + "$ref": "#/definitions/WritableInventoryItemTemplate" } } ], @@ -13647,7 +14452,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } }, @@ -13656,7 +14461,7 @@ ] }, "delete": { - "operationId": "dcim_locations_bulk_delete", + "operationId": "dcim_inventory-item-templates_bulk_delete", "description": "", "parameters": [], "responses": { @@ -13670,16 +14475,16 @@ }, "parameters": [] }, - "/dcim/locations/{id}/": { + "/dcim/inventory-item-templates/{id}/": { "get": { - "operationId": "dcim_locations_read", + "operationId": "dcim_inventory-item-templates_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } }, @@ -13688,7 +14493,7 @@ ] }, "put": { - "operationId": "dcim_locations_update", + "operationId": "dcim_inventory-item-templates_update", "description": "", "parameters": [ { @@ -13696,7 +14501,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableLocation" + "$ref": "#/definitions/WritableInventoryItemTemplate" } } ], @@ -13704,7 +14509,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } }, @@ -13713,7 +14518,7 @@ ] }, "patch": { - "operationId": "dcim_locations_partial_update", + "operationId": "dcim_inventory-item-templates_partial_update", "description": "", "parameters": [ { @@ -13721,7 +14526,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableLocation" + "$ref": "#/definitions/WritableInventoryItemTemplate" } } ], @@ -13729,7 +14534,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/InventoryItemTemplate" } } }, @@ -13738,7 +14543,7 @@ ] }, "delete": { - "operationId": "dcim_locations_delete", + "operationId": "dcim_inventory-item-templates_delete", "description": "", "parameters": [], "responses": { @@ -13754,15 +14559,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this location.", + "description": "A unique integer value identifying this inventory item template.", "required": true, "type": "integer" } ] }, - "/dcim/manufacturers/": { + "/dcim/inventory-items/": { "get": { - "operationId": "dcim_manufacturers_list", + "operationId": "dcim_inventory-items_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -13780,14 +14585,119 @@ "type": "string" }, { - "name": "slug", + "name": "label", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description", + "name": "part_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "discovered", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis", "in": "query", "description": "", "required": false, @@ -13836,7 +14746,63 @@ "type": "string" }, { - "name": "q", + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "role_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "serial", "in": "query", "description": "", "required": false, @@ -13941,147 +14907,357 @@ "type": "string" }, { - "name": "name__empty", + "name": "label__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__n", + "name": "label__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ic", + "name": "label__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nic", + "name": "label__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__iew", + "name": "label__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__niew", + "name": "label__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__isw", + "name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nisw", + "name": "label__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ie", + "name": "label__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nie", + "name": "part_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__empty", + "name": "part_id__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__n", + "name": "part_id__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__ic", + "name": "part_id__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nic", + "name": "part_id__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__iew", + "name": "part_id__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__niew", + "name": "part_id__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__isw", + "name": "part_id__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nisw", + "name": "part_id__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__ie", + "name": "asset_tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nie", + "name": "asset_tag__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__empty", + "name": "asset_tag__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asset_tag__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "role_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_type__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "component_id__gt", "in": "query", "description": "", "required": false, @@ -14128,7 +15304,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } } @@ -14140,7 +15316,7 @@ ] }, "post": { - "operationId": "dcim_manufacturers_create", + "operationId": "dcim_inventory-items_create", "description": "", "parameters": [ { @@ -14148,7 +15324,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -14156,7 +15332,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } }, @@ -14165,7 +15341,7 @@ ] }, "put": { - "operationId": "dcim_manufacturers_bulk_update", + "operationId": "dcim_inventory-items_bulk_update", "description": "", "parameters": [ { @@ -14173,7 +15349,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -14181,7 +15357,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } }, @@ -14190,7 +15366,7 @@ ] }, "patch": { - "operationId": "dcim_manufacturers_bulk_partial_update", + "operationId": "dcim_inventory-items_bulk_partial_update", "description": "", "parameters": [ { @@ -14198,7 +15374,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -14206,7 +15382,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } }, @@ -14215,7 +15391,7 @@ ] }, "delete": { - "operationId": "dcim_manufacturers_bulk_delete", + "operationId": "dcim_inventory-items_bulk_delete", "description": "", "parameters": [], "responses": { @@ -14229,16 +15405,16 @@ }, "parameters": [] }, - "/dcim/manufacturers/{id}/": { + "/dcim/inventory-items/{id}/": { "get": { - "operationId": "dcim_manufacturers_read", + "operationId": "dcim_inventory-items_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } }, @@ -14247,7 +15423,7 @@ ] }, "put": { - "operationId": "dcim_manufacturers_update", + "operationId": "dcim_inventory-items_update", "description": "", "parameters": [ { @@ -14255,7 +15431,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -14263,7 +15439,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } }, @@ -14272,7 +15448,7 @@ ] }, "patch": { - "operationId": "dcim_manufacturers_partial_update", + "operationId": "dcim_inventory-items_partial_update", "description": "", "parameters": [ { @@ -14280,7 +15456,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/WritableInventoryItem" } } ], @@ -14288,7 +15464,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Manufacturer" + "$ref": "#/definitions/InventoryItem" } } }, @@ -14297,7 +15473,7 @@ ] }, "delete": { - "operationId": "dcim_manufacturers_delete", + "operationId": "dcim_inventory-items_delete", "description": "", "parameters": [], "responses": { @@ -14313,15 +15489,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this manufacturer.", + "description": "A unique integer value identifying this inventory item.", "required": true, "type": "integer" } ] }, - "/dcim/platforms/": { + "/dcim/locations/": { "get": { - "operationId": "dcim_platforms_list", + "operationId": "dcim_locations_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -14346,322 +15522,322 @@ "type": "string" }, { - "name": "napalm_driver", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description", + "name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "tenant", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "contact", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "contact_role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer_id", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__n", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "parent_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "parent", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__n", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ic", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nic", + "name": "name__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__iew", + "name": "name__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__niew", + "name": "name__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__isw", + "name": "name__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nisw", + "name": "name__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ie", + "name": "name__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nie", + "name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__empty", + "name": "name__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__n", + "name": "name__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__ic", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__nic", + "name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__iew", + "name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__niew", + "name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__isw", + "name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__nisw", + "name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__ie", + "name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__nie", + "name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "napalm_driver__empty", + "name": "slug__nie", "in": "query", "description": "", "required": false, @@ -14731,21 +15907,105 @@ "type": "string" }, { - "name": "description__empty", + "name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer_id__n", + "name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "manufacturer__n", + "name": "tenant_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent__n", "in": "query", "description": "", "required": false, @@ -14792,7 +16052,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } } @@ -14804,7 +16064,7 @@ ] }, "post": { - "operationId": "dcim_platforms_create", + "operationId": "dcim_locations_create", "description": "", "parameters": [ { @@ -14812,7 +16072,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableLocation" } } ], @@ -14820,7 +16080,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } }, @@ -14829,7 +16089,7 @@ ] }, "put": { - "operationId": "dcim_platforms_bulk_update", + "operationId": "dcim_locations_bulk_update", "description": "", "parameters": [ { @@ -14837,7 +16097,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableLocation" } } ], @@ -14845,7 +16105,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } }, @@ -14854,7 +16114,7 @@ ] }, "patch": { - "operationId": "dcim_platforms_bulk_partial_update", + "operationId": "dcim_locations_bulk_partial_update", "description": "", "parameters": [ { @@ -14862,7 +16122,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableLocation" } } ], @@ -14870,7 +16130,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } }, @@ -14879,7 +16139,7 @@ ] }, "delete": { - "operationId": "dcim_platforms_bulk_delete", + "operationId": "dcim_locations_bulk_delete", "description": "", "parameters": [], "responses": { @@ -14893,16 +16153,16 @@ }, "parameters": [] }, - "/dcim/platforms/{id}/": { + "/dcim/locations/{id}/": { "get": { - "operationId": "dcim_platforms_read", + "operationId": "dcim_locations_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } }, @@ -14911,7 +16171,7 @@ ] }, "put": { - "operationId": "dcim_platforms_update", + "operationId": "dcim_locations_update", "description": "", "parameters": [ { @@ -14919,7 +16179,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableLocation" } } ], @@ -14927,7 +16187,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } }, @@ -14936,7 +16196,7 @@ ] }, "patch": { - "operationId": "dcim_platforms_partial_update", + "operationId": "dcim_locations_partial_update", "description": "", "parameters": [ { @@ -14944,7 +16204,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePlatform" + "$ref": "#/definitions/WritableLocation" } } ], @@ -14952,7 +16212,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Platform" + "$ref": "#/definitions/Location" } } }, @@ -14961,7 +16221,7 @@ ] }, "delete": { - "operationId": "dcim_platforms_delete", + "operationId": "dcim_locations_delete", "description": "", "parameters": [], "responses": { @@ -14977,15 +16237,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this platform.", + "description": "A unique integer value identifying this location.", "required": true, "type": "integer" } ] }, - "/dcim/power-feeds/": { + "/dcim/manufacturers/": { "get": { - "operationId": "dcim_power-feeds_list", + "operationId": "dcim_manufacturers_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -15003,49 +16263,14 @@ "type": "string" }, { - "name": "status", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "type", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "supply", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "phase", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "voltage", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "amperage", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "max_utilization", + "name": "description", "in": "query", "description": "", "required": false, @@ -15093,20 +16318,6 @@ "required": false, "type": "string" }, - { - "name": "cabled", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "connected", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "q", "in": "query", @@ -15115,63 +16326,21 @@ "type": "string" }, { - "name": "region_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "power_panel_id", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack_id", + "name": "contact", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "contact_role", "in": "query", "description": "", "required": false, @@ -15276,203 +16445,147 @@ "type": "string" }, { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "status__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "type__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "supply__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "phase__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "voltage__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "voltage__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "voltage__lt", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "voltage__gte", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "voltage__gt", + "name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "amperage__n", + "name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "amperage__lte", + "name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "amperage__lt", + "name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "amperage__gte", + "name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "amperage__gt", + "name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "max_utilization__n", + "name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "max_utilization__lte", + "name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "max_utilization__lt", + "name": "description__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "max_utilization__gte", + "name": "description__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "max_utilization__gt", + "name": "description__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "description__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "description__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "description__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group__n", + "name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "description__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "description__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "power_panel_id__n", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack_id__n", + "name": "contact__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "contact_role__n", "in": "query", "description": "", "required": false, @@ -15519,7 +16632,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } } @@ -15531,7 +16644,7 @@ ] }, "post": { - "operationId": "dcim_power-feeds_create", + "operationId": "dcim_manufacturers_create", "description": "", "parameters": [ { @@ -15539,7 +16652,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerFeed" + "$ref": "#/definitions/Manufacturer" } } ], @@ -15547,7 +16660,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } }, @@ -15556,7 +16669,7 @@ ] }, "put": { - "operationId": "dcim_power-feeds_bulk_update", + "operationId": "dcim_manufacturers_bulk_update", "description": "", "parameters": [ { @@ -15564,7 +16677,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerFeed" + "$ref": "#/definitions/Manufacturer" } } ], @@ -15572,7 +16685,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } }, @@ -15581,7 +16694,7 @@ ] }, "patch": { - "operationId": "dcim_power-feeds_bulk_partial_update", + "operationId": "dcim_manufacturers_bulk_partial_update", "description": "", "parameters": [ { @@ -15589,7 +16702,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerFeed" + "$ref": "#/definitions/Manufacturer" } } ], @@ -15597,7 +16710,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } }, @@ -15606,7 +16719,7 @@ ] }, "delete": { - "operationId": "dcim_power-feeds_bulk_delete", + "operationId": "dcim_manufacturers_bulk_delete", "description": "", "parameters": [], "responses": { @@ -15620,16 +16733,16 @@ }, "parameters": [] }, - "/dcim/power-feeds/{id}/": { + "/dcim/manufacturers/{id}/": { "get": { - "operationId": "dcim_power-feeds_read", + "operationId": "dcim_manufacturers_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } }, @@ -15638,7 +16751,7 @@ ] }, "put": { - "operationId": "dcim_power-feeds_update", + "operationId": "dcim_manufacturers_update", "description": "", "parameters": [ { @@ -15646,7 +16759,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerFeed" + "$ref": "#/definitions/Manufacturer" } } ], @@ -15654,7 +16767,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } }, @@ -15663,7 +16776,7 @@ ] }, "patch": { - "operationId": "dcim_power-feeds_partial_update", + "operationId": "dcim_manufacturers_partial_update", "description": "", "parameters": [ { @@ -15671,7 +16784,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerFeed" + "$ref": "#/definitions/Manufacturer" } } ], @@ -15679,7 +16792,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerFeed" + "$ref": "#/definitions/Manufacturer" } } }, @@ -15688,7 +16801,7 @@ ] }, "delete": { - "operationId": "dcim_power-feeds_delete", + "operationId": "dcim_manufacturers_delete", "description": "", "parameters": [], "responses": { @@ -15704,42 +16817,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power feed.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/power-feeds/{id}/trace/": { - "get": { - "operationId": "dcim_power-feeds_trace", - "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/PowerFeed" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this power feed.", + "description": "A unique integer value identifying this manufacturer.", "required": true, "type": "integer" } ] }, - "/dcim/power-outlet-templates/": { + "/dcim/module-bay-templates/": { "get": { - "operationId": "dcim_power-outlet-templates_list", + "operationId": "dcim_module-bay-templates_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -15756,20 +16842,6 @@ "required": false, "type": "string" }, - { - "name": "type", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "feed_leg", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "created", "in": "query", @@ -15812,6 +16884,13 @@ "required": false, "type": "string" }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "devicetype_id", "in": "query", @@ -15917,27 +16996,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "type__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "feed_leg__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "devicetype_id__n", "in": "query", @@ -15986,7 +17044,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } } @@ -15998,7 +17056,7 @@ ] }, "post": { - "operationId": "dcim_power-outlet-templates_create", + "operationId": "dcim_module-bay-templates_create", "description": "", "parameters": [ { @@ -16006,7 +17064,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableModuleBayTemplate" } } ], @@ -16014,7 +17072,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } }, @@ -16023,7 +17081,7 @@ ] }, "put": { - "operationId": "dcim_power-outlet-templates_bulk_update", + "operationId": "dcim_module-bay-templates_bulk_update", "description": "", "parameters": [ { @@ -16031,7 +17089,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableModuleBayTemplate" } } ], @@ -16039,7 +17097,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } }, @@ -16048,7 +17106,7 @@ ] }, "patch": { - "operationId": "dcim_power-outlet-templates_bulk_partial_update", + "operationId": "dcim_module-bay-templates_bulk_partial_update", "description": "", "parameters": [ { @@ -16056,7 +17114,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableModuleBayTemplate" } } ], @@ -16064,7 +17122,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } }, @@ -16073,7 +17131,7 @@ ] }, "delete": { - "operationId": "dcim_power-outlet-templates_bulk_delete", + "operationId": "dcim_module-bay-templates_bulk_delete", "description": "", "parameters": [], "responses": { @@ -16087,16 +17145,16 @@ }, "parameters": [] }, - "/dcim/power-outlet-templates/{id}/": { + "/dcim/module-bay-templates/{id}/": { "get": { - "operationId": "dcim_power-outlet-templates_read", + "operationId": "dcim_module-bay-templates_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } }, @@ -16105,7 +17163,7 @@ ] }, "put": { - "operationId": "dcim_power-outlet-templates_update", + "operationId": "dcim_module-bay-templates_update", "description": "", "parameters": [ { @@ -16113,7 +17171,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableModuleBayTemplate" } } ], @@ -16121,7 +17179,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } }, @@ -16130,7 +17188,7 @@ ] }, "patch": { - "operationId": "dcim_power-outlet-templates_partial_update", + "operationId": "dcim_module-bay-templates_partial_update", "description": "", "parameters": [ { @@ -16138,7 +17196,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutletTemplate" + "$ref": "#/definitions/WritableModuleBayTemplate" } } ], @@ -16146,7 +17204,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutletTemplate" + "$ref": "#/definitions/ModuleBayTemplate" } } }, @@ -16155,7 +17213,7 @@ ] }, "delete": { - "operationId": "dcim_power-outlet-templates_delete", + "operationId": "dcim_module-bay-templates_delete", "description": "", "parameters": [], "responses": { @@ -16171,15 +17229,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power outlet template.", + "description": "A unique integer value identifying this module bay template.", "required": true, "type": "integer" } ] }, - "/dcim/power-outlets/": { + "/dcim/module-bays/": { "get": { - "operationId": "dcim_power-outlets_list", + "operationId": "dcim_module-bays_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -16203,13 +17261,6 @@ "required": false, "type": "string" }, - { - "name": "feed_leg", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "description", "in": "query", @@ -16218,147 +17269,140 @@ "type": "string" }, { - "name": "created", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "created__gte", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id", + "name": "virtual_chassis", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cabled", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "connected", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type", + "name": "tag", "in": "query", "description": "", "required": false, @@ -16462,13 +17506,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "label__n", "in": "query", @@ -16532,20 +17569,6 @@ "required": false, "type": "string" }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "feed_leg__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "description__n", "in": "query", @@ -16609,13 +17632,6 @@ "required": false, "type": "string" }, - { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "region_id__n", "in": "query", @@ -16687,14 +17703,21 @@ "type": "string" }, { - "name": "tag__n", + "name": "virtual_chassis_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", "in": "query", "description": "", "required": false, @@ -16741,7 +17764,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } } @@ -16753,7 +17776,7 @@ ] }, "post": { - "operationId": "dcim_power-outlets_create", + "operationId": "dcim_module-bays_create", "description": "", "parameters": [ { @@ -16761,7 +17784,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableModuleBay" } } ], @@ -16769,7 +17792,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } }, @@ -16778,7 +17801,7 @@ ] }, "put": { - "operationId": "dcim_power-outlets_bulk_update", + "operationId": "dcim_module-bays_bulk_update", "description": "", "parameters": [ { @@ -16786,7 +17809,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableModuleBay" } } ], @@ -16794,7 +17817,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } }, @@ -16803,7 +17826,7 @@ ] }, "patch": { - "operationId": "dcim_power-outlets_bulk_partial_update", + "operationId": "dcim_module-bays_bulk_partial_update", "description": "", "parameters": [ { @@ -16811,7 +17834,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableModuleBay" } } ], @@ -16819,7 +17842,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } }, @@ -16828,7 +17851,7 @@ ] }, "delete": { - "operationId": "dcim_power-outlets_bulk_delete", + "operationId": "dcim_module-bays_bulk_delete", "description": "", "parameters": [], "responses": { @@ -16842,16 +17865,16 @@ }, "parameters": [] }, - "/dcim/power-outlets/{id}/": { + "/dcim/module-bays/{id}/": { "get": { - "operationId": "dcim_power-outlets_read", + "operationId": "dcim_module-bays_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } }, @@ -16860,7 +17883,7 @@ ] }, "put": { - "operationId": "dcim_power-outlets_update", + "operationId": "dcim_module-bays_update", "description": "", "parameters": [ { @@ -16868,7 +17891,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableModuleBay" } } ], @@ -16876,7 +17899,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } }, @@ -16885,7 +17908,7 @@ ] }, "patch": { - "operationId": "dcim_power-outlets_partial_update", + "operationId": "dcim_module-bays_partial_update", "description": "", "parameters": [ { @@ -16893,7 +17916,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerOutlet" + "$ref": "#/definitions/WritableModuleBay" } } ], @@ -16901,7 +17924,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerOutlet" + "$ref": "#/definitions/ModuleBay" } } }, @@ -16910,7 +17933,7 @@ ] }, "delete": { - "operationId": "dcim_power-outlets_delete", + "operationId": "dcim_module-bays_delete", "description": "", "parameters": [], "responses": { @@ -16926,42 +17949,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power outlet.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/power-outlets/{id}/trace/": { - "get": { - "operationId": "dcim_power-outlets_trace", - "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/PowerOutlet" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this power outlet.", + "description": "A unique integer value identifying this module bay.", "required": true, "type": "integer" } ] }, - "/dcim/power-panels/": { + "/dcim/module-types/": { "get": { - "operationId": "dcim_power-panels_list", + "operationId": "dcim_module-types_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -16972,7 +17968,14 @@ "type": "string" }, { - "name": "name", + "name": "model", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "part_number", "in": "query", "description": "", "required": false, @@ -17028,56 +18031,63 @@ "type": "string" }, { - "name": "region_id", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "manufacturer", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "console_ports", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "console_server_ports", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "power_ports", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id", + "name": "power_outlets", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "interfaces", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "pass_through_ports", "in": "query", "description": "", "required": false, @@ -17119,119 +18129,126 @@ "type": "string" }, { - "name": "name__n", + "name": "model__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "model__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "model__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "model__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "model__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "model__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "model__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "model__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "model__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "part_number__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "part_number__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "part_number__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "part_number__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group__n", + "name": "part_number__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "part_number__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "part_number__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id__n", + "name": "part_number__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "part_number__nie", "in": "query", "description": "", "required": false, @@ -17244,6 +18261,20 @@ "required": false, "type": "string" }, + { + "name": "manufacturer_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -17285,7 +18316,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } } @@ -17297,7 +18328,7 @@ ] }, "post": { - "operationId": "dcim_power-panels_create", + "operationId": "dcim_module-types_create", "description": "", "parameters": [ { @@ -17305,7 +18336,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPanel" + "$ref": "#/definitions/WritableModuleType" } } ], @@ -17313,7 +18344,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } }, @@ -17322,7 +18353,7 @@ ] }, "put": { - "operationId": "dcim_power-panels_bulk_update", + "operationId": "dcim_module-types_bulk_update", "description": "", "parameters": [ { @@ -17330,7 +18361,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPanel" + "$ref": "#/definitions/WritableModuleType" } } ], @@ -17338,7 +18369,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } }, @@ -17347,7 +18378,7 @@ ] }, "patch": { - "operationId": "dcim_power-panels_bulk_partial_update", + "operationId": "dcim_module-types_bulk_partial_update", "description": "", "parameters": [ { @@ -17355,7 +18386,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPanel" + "$ref": "#/definitions/WritableModuleType" } } ], @@ -17363,7 +18394,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } }, @@ -17372,7 +18403,7 @@ ] }, "delete": { - "operationId": "dcim_power-panels_bulk_delete", + "operationId": "dcim_module-types_bulk_delete", "description": "", "parameters": [], "responses": { @@ -17386,16 +18417,16 @@ }, "parameters": [] }, - "/dcim/power-panels/{id}/": { + "/dcim/module-types/{id}/": { "get": { - "operationId": "dcim_power-panels_read", + "operationId": "dcim_module-types_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } }, @@ -17404,7 +18435,7 @@ ] }, "put": { - "operationId": "dcim_power-panels_update", + "operationId": "dcim_module-types_update", "description": "", "parameters": [ { @@ -17412,7 +18443,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPanel" + "$ref": "#/definitions/WritableModuleType" } } ], @@ -17420,7 +18451,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } }, @@ -17429,7 +18460,7 @@ ] }, "patch": { - "operationId": "dcim_power-panels_partial_update", + "operationId": "dcim_module-types_partial_update", "description": "", "parameters": [ { @@ -17437,7 +18468,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPanel" + "$ref": "#/definitions/WritableModuleType" } } ], @@ -17445,7 +18476,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPanel" + "$ref": "#/definitions/ModuleType" } } }, @@ -17454,7 +18485,7 @@ ] }, "delete": { - "operationId": "dcim_power-panels_delete", + "operationId": "dcim_module-types_delete", "description": "", "parameters": [], "responses": { @@ -17470,15 +18501,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power panel.", + "description": "A unique integer value identifying this module type.", "required": true, "type": "integer" } ] }, - "/dcim/power-port-templates/": { + "/dcim/modules/": { "get": { - "operationId": "dcim_power-port-templates_list", + "operationId": "dcim_modules_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -17489,77 +18520,105 @@ "type": "string" }, { - "name": "name", + "name": "serial", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type", + "name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id", + "name": "manufacturer_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "manufacturer", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_type_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device_id", "in": "query", "description": "", "required": false, @@ -17601,154 +18660,168 @@ "type": "string" }, { - "name": "name__n", + "name": "serial__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "serial__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "serial__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "serial__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "serial__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "serial__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "serial__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "serial__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "serial__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "asset_tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "asset_tag__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__n", + "name": "asset_tag__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__lte", + "name": "asset_tag__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__lt", + "name": "asset_tag__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__gte", + "name": "asset_tag__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__gt", + "name": "asset_tag__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__n", + "name": "asset_tag__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__lte", + "name": "asset_tag__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__lt", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__gte", + "name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__gt", + "name": "manufacturer__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id__n", + "name": "module_type_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_type__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device_id__n", "in": "query", "description": "", "required": false, @@ -17795,7 +18868,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } } @@ -17807,7 +18880,7 @@ ] }, "post": { - "operationId": "dcim_power-port-templates_create", + "operationId": "dcim_modules_create", "description": "", "parameters": [ { @@ -17815,7 +18888,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPortTemplate" + "$ref": "#/definitions/WritableModule" } } ], @@ -17823,7 +18896,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } }, @@ -17832,7 +18905,7 @@ ] }, "put": { - "operationId": "dcim_power-port-templates_bulk_update", + "operationId": "dcim_modules_bulk_update", "description": "", "parameters": [ { @@ -17840,7 +18913,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPortTemplate" + "$ref": "#/definitions/WritableModule" } } ], @@ -17848,7 +18921,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } }, @@ -17857,7 +18930,7 @@ ] }, "patch": { - "operationId": "dcim_power-port-templates_bulk_partial_update", + "operationId": "dcim_modules_bulk_partial_update", "description": "", "parameters": [ { @@ -17865,7 +18938,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPortTemplate" + "$ref": "#/definitions/WritableModule" } } ], @@ -17873,7 +18946,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } }, @@ -17882,7 +18955,7 @@ ] }, "delete": { - "operationId": "dcim_power-port-templates_bulk_delete", + "operationId": "dcim_modules_bulk_delete", "description": "", "parameters": [], "responses": { @@ -17896,16 +18969,16 @@ }, "parameters": [] }, - "/dcim/power-port-templates/{id}/": { + "/dcim/modules/{id}/": { "get": { - "operationId": "dcim_power-port-templates_read", + "operationId": "dcim_modules_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } }, @@ -17914,7 +18987,7 @@ ] }, "put": { - "operationId": "dcim_power-port-templates_update", + "operationId": "dcim_modules_update", "description": "", "parameters": [ { @@ -17922,7 +18995,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPortTemplate" + "$ref": "#/definitions/WritableModule" } } ], @@ -17930,7 +19003,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } }, @@ -17939,7 +19012,7 @@ ] }, "patch": { - "operationId": "dcim_power-port-templates_partial_update", + "operationId": "dcim_modules_partial_update", "description": "", "parameters": [ { @@ -17947,7 +19020,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPortTemplate" + "$ref": "#/definitions/WritableModule" } } ], @@ -17955,7 +19028,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPortTemplate" + "$ref": "#/definitions/Module" } } }, @@ -17964,7 +19037,7 @@ ] }, "delete": { - "operationId": "dcim_power-port-templates_delete", + "operationId": "dcim_modules_delete", "description": "", "parameters": [], "responses": { @@ -17980,15 +19053,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power port template.", + "description": "A unique integer value identifying this module.", "required": true, "type": "integer" } ] }, - "/dcim/power-ports/": { + "/dcim/platforms/": { "get": { - "operationId": "dcim_power-ports_list", + "operationId": "dcim_platforms_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -18006,21 +19079,14 @@ "type": "string" }, { - "name": "label", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "maximum_draw", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw", + "name": "napalm_driver", "in": "query", "description": "", "required": false, @@ -18082,76 +19148,6 @@ "required": false, "type": "string" }, - { - "name": "region_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "tag", "in": "query", @@ -18160,21 +19156,14 @@ "type": "string" }, { - "name": "cabled", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "connected", + "name": "manufacturer_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type", + "name": "manufacturer", "in": "query", "description": "", "required": false, @@ -18279,147 +19268,126 @@ "type": "string" }, { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nic", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__iew", + "name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__niew", + "name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__isw", + "name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__nisw", + "name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__ie", + "name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__nie", + "name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "label__empty", + "name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__n", + "name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__lte", + "name": "napalm_driver__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__lt", + "name": "napalm_driver__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__gte", + "name": "napalm_driver__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "maximum_draw__gt", + "name": "napalm_driver__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__n", + "name": "napalm_driver__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__lte", + "name": "napalm_driver__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__lt", + "name": "napalm_driver__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__gte", + "name": "napalm_driver__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "allocated_draw__gt", + "name": "napalm_driver__nie", "in": "query", "description": "", "required": false, @@ -18489,91 +19457,21 @@ "type": "string" }, { - "name": "description__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device__n", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "manufacturer_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "manufacturer__n", "in": "query", "description": "", "required": false, @@ -18620,7 +19518,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } } @@ -18632,7 +19530,7 @@ ] }, "post": { - "operationId": "dcim_power-ports_create", + "operationId": "dcim_platforms_create", "description": "", "parameters": [ { @@ -18640,7 +19538,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -18648,7 +19546,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } }, @@ -18657,7 +19555,7 @@ ] }, "put": { - "operationId": "dcim_power-ports_bulk_update", + "operationId": "dcim_platforms_bulk_update", "description": "", "parameters": [ { @@ -18665,7 +19563,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -18673,7 +19571,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } }, @@ -18682,7 +19580,7 @@ ] }, "patch": { - "operationId": "dcim_power-ports_bulk_partial_update", + "operationId": "dcim_platforms_bulk_partial_update", "description": "", "parameters": [ { @@ -18690,7 +19588,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -18698,7 +19596,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } }, @@ -18707,7 +19605,7 @@ ] }, "delete": { - "operationId": "dcim_power-ports_bulk_delete", + "operationId": "dcim_platforms_bulk_delete", "description": "", "parameters": [], "responses": { @@ -18721,16 +19619,16 @@ }, "parameters": [] }, - "/dcim/power-ports/{id}/": { + "/dcim/platforms/{id}/": { "get": { - "operationId": "dcim_power-ports_read", + "operationId": "dcim_platforms_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } }, @@ -18739,7 +19637,7 @@ ] }, "put": { - "operationId": "dcim_power-ports_update", + "operationId": "dcim_platforms_update", "description": "", "parameters": [ { @@ -18747,7 +19645,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -18755,7 +19653,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } }, @@ -18764,7 +19662,7 @@ ] }, "patch": { - "operationId": "dcim_power-ports_partial_update", + "operationId": "dcim_platforms_partial_update", "description": "", "parameters": [ { @@ -18772,7 +19670,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritablePowerPort" + "$ref": "#/definitions/WritablePlatform" } } ], @@ -18780,7 +19678,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/PowerPort" + "$ref": "#/definitions/Platform" } } }, @@ -18789,7 +19687,7 @@ ] }, "delete": { - "operationId": "dcim_power-ports_delete", + "operationId": "dcim_platforms_delete", "description": "", "parameters": [], "responses": { @@ -18805,42 +19703,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this power port.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/power-ports/{id}/trace/": { - "get": { - "operationId": "dcim_power-ports_trace", - "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/PowerPort" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this power port.", + "description": "A unique integer value identifying this platform.", "required": true, "type": "integer" } ] }, - "/dcim/rack-reservations/": { + "/dcim/power-feeds/": { "get": { - "operationId": "dcim_rack-reservations_list", + "operationId": "dcim_power-feeds_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -18850,6 +19721,62 @@ "required": false, "type": "string" }, + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "supply", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "phase", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "voltage", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "amperage", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "max_utilization", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "created", "in": "query", @@ -18893,42 +19820,56 @@ "type": "string" }, { - "name": "tenant_group_id", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "cabled", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "connected", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack_id", + "name": "region", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group", "in": "query", "description": "", "required": false, @@ -18949,147 +19890,245 @@ "type": "string" }, { - "name": "location_id", + "name": "power_panel_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location", + "name": "rack_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_id", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "name__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "name__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "name__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group_id__n", + "name": "name__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group__n", + "name": "name__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id__n", + "name": "name__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant__n", + "name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "rack_id__n", + "name": "name__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "name__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "status__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id__n", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location__n", + "name": "supply__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_id__n", + "name": "phase__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user__n", + "name": "voltage__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "voltage__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "voltage__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "voltage__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "voltage__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "amperage__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "amperage__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "amperage__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "amperage__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "amperage__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "max_utilization__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "max_utilization__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "max_utilization__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "max_utilization__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "max_utilization__gt", "in": "query", "description": "", "required": false, @@ -19102,6 +20141,62 @@ "required": false, "type": "string" }, + { + "name": "region_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "power_panel_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "rack_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -19143,7 +20238,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } } @@ -19155,7 +20250,7 @@ ] }, "post": { - "operationId": "dcim_rack-reservations_create", + "operationId": "dcim_power-feeds_create", "description": "", "parameters": [ { @@ -19163,7 +20258,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -19171,7 +20266,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } }, @@ -19180,7 +20275,7 @@ ] }, "put": { - "operationId": "dcim_rack-reservations_bulk_update", + "operationId": "dcim_power-feeds_bulk_update", "description": "", "parameters": [ { @@ -19188,7 +20283,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -19196,7 +20291,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } }, @@ -19205,7 +20300,7 @@ ] }, "patch": { - "operationId": "dcim_rack-reservations_bulk_partial_update", + "operationId": "dcim_power-feeds_bulk_partial_update", "description": "", "parameters": [ { @@ -19213,7 +20308,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -19221,7 +20316,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } }, @@ -19230,7 +20325,7 @@ ] }, "delete": { - "operationId": "dcim_rack-reservations_bulk_delete", + "operationId": "dcim_power-feeds_bulk_delete", "description": "", "parameters": [], "responses": { @@ -19244,16 +20339,16 @@ }, "parameters": [] }, - "/dcim/rack-reservations/{id}/": { + "/dcim/power-feeds/{id}/": { "get": { - "operationId": "dcim_rack-reservations_read", + "operationId": "dcim_power-feeds_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } }, @@ -19262,7 +20357,7 @@ ] }, "put": { - "operationId": "dcim_rack-reservations_update", + "operationId": "dcim_power-feeds_update", "description": "", "parameters": [ { @@ -19270,7 +20365,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -19278,7 +20373,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } }, @@ -19287,7 +20382,7 @@ ] }, "patch": { - "operationId": "dcim_rack-reservations_partial_update", + "operationId": "dcim_power-feeds_partial_update", "description": "", "parameters": [ { @@ -19295,7 +20390,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRackReservation" + "$ref": "#/definitions/WritablePowerFeed" } } ], @@ -19303,7 +20398,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackReservation" + "$ref": "#/definitions/PowerFeed" } } }, @@ -19312,7 +20407,7 @@ ] }, "delete": { - "operationId": "dcim_rack-reservations_delete", + "operationId": "dcim_power-feeds_delete", "description": "", "parameters": [], "responses": { @@ -19328,15 +20423,42 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack reservation.", + "description": "A unique integer value identifying this power feed.", "required": true, "type": "integer" } ] }, - "/dcim/rack-roles/": { + "/dcim/power-feeds/{id}/trace/": { "get": { - "operationId": "dcim_rack-roles_list", + "operationId": "dcim_power-feeds_trace", + "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/PowerFeed" + } + } + }, + "tags": [ + "dcim" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this power feed.", + "required": true, + "type": "integer" + } + ] + }, + "/dcim/power-outlet-templates/": { + "get": { + "operationId": "dcim_power-outlet-templates_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -19354,14 +20476,14 @@ "type": "string" }, { - "name": "slug", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color", + "name": "feed_leg", "in": "query", "description": "", "required": false, @@ -19416,6 +20538,20 @@ "required": false, "type": "string" }, + { + "name": "devicetype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "moduletype_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "id__n", "in": "query", @@ -19515,147 +20651,28 @@ "type": "string" }, { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__nisw", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__ie", + "name": "feed_leg__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__nie", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__empty", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -19702,7 +20719,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } } @@ -19714,7 +20731,7 @@ ] }, "post": { - "operationId": "dcim_rack-roles_create", + "operationId": "dcim_power-outlet-templates_create", "description": "", "parameters": [ { @@ -19722,7 +20739,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -19730,7 +20747,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -19739,7 +20756,7 @@ ] }, "put": { - "operationId": "dcim_rack-roles_bulk_update", + "operationId": "dcim_power-outlet-templates_bulk_update", "description": "", "parameters": [ { @@ -19747,7 +20764,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -19755,7 +20772,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -19764,7 +20781,7 @@ ] }, "patch": { - "operationId": "dcim_rack-roles_bulk_partial_update", + "operationId": "dcim_power-outlet-templates_bulk_partial_update", "description": "", "parameters": [ { @@ -19772,7 +20789,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -19780,7 +20797,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -19789,7 +20806,7 @@ ] }, "delete": { - "operationId": "dcim_rack-roles_bulk_delete", + "operationId": "dcim_power-outlet-templates_bulk_delete", "description": "", "parameters": [], "responses": { @@ -19803,16 +20820,16 @@ }, "parameters": [] }, - "/dcim/rack-roles/{id}/": { + "/dcim/power-outlet-templates/{id}/": { "get": { - "operationId": "dcim_rack-roles_read", + "operationId": "dcim_power-outlet-templates_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -19821,7 +20838,7 @@ ] }, "put": { - "operationId": "dcim_rack-roles_update", + "operationId": "dcim_power-outlet-templates_update", "description": "", "parameters": [ { @@ -19829,7 +20846,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -19837,7 +20854,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -19846,7 +20863,7 @@ ] }, "patch": { - "operationId": "dcim_rack-roles_partial_update", + "operationId": "dcim_power-outlet-templates_partial_update", "description": "", "parameters": [ { @@ -19854,7 +20871,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/WritablePowerOutletTemplate" } } ], @@ -19862,7 +20879,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RackRole" + "$ref": "#/definitions/PowerOutletTemplate" } } }, @@ -19871,7 +20888,7 @@ ] }, "delete": { - "operationId": "dcim_rack-roles_delete", + "operationId": "dcim_power-outlet-templates_delete", "description": "", "parameters": [], "responses": { @@ -19887,15 +20904,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack role.", + "description": "A unique integer value identifying this power outlet template.", "required": true, "type": "integer" } ] }, - "/dcim/racks/": { + "/dcim/power-outlets/": { "get": { - "operationId": "dcim_racks_list", + "operationId": "dcim_power-outlets_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -19913,189 +20930,182 @@ "type": "string" }, { - "name": "facility_id", + "name": "label", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asset_tag", + "name": "feed_leg", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "u_height", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "desc_units", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_width", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_depth", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_unit", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "tenant_group_id", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "virtual_chassis_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "virtual_chassis", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "module_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location", + "name": "cabled", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status", + "name": "connected", "in": "query", "description": "", "required": false, @@ -20108,41 +21118,6 @@ "required": false, "type": "string" }, - { - "name": "width", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "serial", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "tag", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "id__n", "in": "query", @@ -20242,287 +21217,133 @@ "type": "string" }, { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "facility_id__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "asset_tag__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "u_height__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "u_height__lte", + "name": "label__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "u_height__lt", + "name": "label__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "u_height__gte", + "name": "label__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "u_height__gt", + "name": "label__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_width__n", + "name": "label__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_width__lte", + "name": "label__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_width__lt", + "name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_width__gte", + "name": "label__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_width__gt", + "name": "label__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_depth__n", + "name": "feed_leg__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_depth__lte", + "name": "description__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_depth__lt", + "name": "description__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_depth__gte", + "name": "description__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_depth__gt", + "name": "description__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "outer_unit__n", + "name": "description__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group_id__n", + "name": "description__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group__n", + "name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id__n", + "name": "description__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant__n", + "name": "description__nie", "in": "query", "description": "", "required": false, @@ -20585,35 +21406,35 @@ "type": "string" }, { - "name": "status__n", + "name": "device_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "device__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "width__n", + "name": "virtual_chassis_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role_id__n", + "name": "virtual_chassis__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role__n", + "name": "module_id__n", "in": "query", "description": "", "required": false, @@ -20626,6 +21447,13 @@ "required": false, "type": "string" }, + { + "name": "type__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -20667,7 +21495,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } } @@ -20679,7 +21507,7 @@ ] }, "post": { - "operationId": "dcim_racks_create", + "operationId": "dcim_power-outlets_create", "description": "", "parameters": [ { @@ -20687,7 +21515,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -20695,7 +21523,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20704,7 +21532,7 @@ ] }, "put": { - "operationId": "dcim_racks_bulk_update", + "operationId": "dcim_power-outlets_bulk_update", "description": "", "parameters": [ { @@ -20712,7 +21540,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -20720,7 +21548,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20729,7 +21557,7 @@ ] }, "patch": { - "operationId": "dcim_racks_bulk_partial_update", + "operationId": "dcim_power-outlets_bulk_partial_update", "description": "", "parameters": [ { @@ -20737,7 +21565,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -20745,7 +21573,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20754,7 +21582,7 @@ ] }, "delete": { - "operationId": "dcim_racks_bulk_delete", + "operationId": "dcim_power-outlets_bulk_delete", "description": "", "parameters": [], "responses": { @@ -20768,16 +21596,16 @@ }, "parameters": [] }, - "/dcim/racks/{id}/": { + "/dcim/power-outlets/{id}/": { "get": { - "operationId": "dcim_racks_read", + "operationId": "dcim_power-outlets_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20786,7 +21614,7 @@ ] }, "put": { - "operationId": "dcim_racks_update", + "operationId": "dcim_power-outlets_update", "description": "", "parameters": [ { @@ -20794,7 +21622,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -20802,7 +21630,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20811,7 +21639,7 @@ ] }, "patch": { - "operationId": "dcim_racks_partial_update", + "operationId": "dcim_power-outlets_partial_update", "description": "", "parameters": [ { @@ -20819,7 +21647,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRack" + "$ref": "#/definitions/WritablePowerOutlet" } } ], @@ -20827,7 +21655,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Rack" + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20836,7 +21664,7 @@ ] }, "delete": { - "operationId": "dcim_racks_delete", + "operationId": "dcim_power-outlets_delete", "description": "", "parameters": [], "responses": { @@ -20852,96 +21680,22 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack.", + "description": "A unique integer value identifying this power outlet.", "required": true, "type": "integer" } ] }, - "/dcim/racks/{id}/elevation/": { + "/dcim/power-outlets/{id}/trace/": { "get": { - "operationId": "dcim_racks_elevation", - "description": "Rack elevation representing the list of rack units. Also supports rendering the elevation as an SVG.", - "parameters": [ - { - "name": "q", - "in": "query", - "required": false, - "type": "string", - "minLength": 1 - }, - { - "name": "face", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "front", - "rear" - ], - "default": "front" - }, - { - "name": "render", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "json", - "svg" - ], - "default": "json" - }, - { - "name": "unit_width", - "in": "query", - "required": false, - "type": "integer", - "default": 220 - }, - { - "name": "unit_height", - "in": "query", - "required": false, - "type": "integer", - "default": 22 - }, - { - "name": "legend_width", - "in": "query", - "required": false, - "type": "integer", - "default": 30 - }, - { - "name": "exclude", - "in": "query", - "required": false, - "type": "integer" - }, - { - "name": "expand_devices", - "in": "query", - "required": false, - "type": "boolean", - "default": true - }, - { - "name": "include_images", - "in": "query", - "required": false, - "type": "boolean", - "default": true - } - ], + "operationId": "dcim_power-outlets_trace", + "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", + "parameters": [], "responses": { "200": { "description": "", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RackUnit" - } + "$ref": "#/definitions/PowerOutlet" } } }, @@ -20953,15 +21707,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rack.", + "description": "A unique integer value identifying this power outlet.", "required": true, "type": "integer" } ] }, - "/dcim/rear-port-templates/": { + "/dcim/power-panels/": { "get": { - "operationId": "dcim_rear-port-templates_list", + "operationId": "dcim_power-panels_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -20979,294 +21733,287 @@ "type": "string" }, { - "name": "type", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "positions", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id", + "name": "contact", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "contact_role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__n", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "name__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "name__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "type__n", + "name": "name__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__n", + "name": "name__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__ic", + "name": "name__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__nic", + "name": "name__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__iew", + "name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__niew", + "name": "name__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__isw", + "name": "name__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__nisw", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__ie", + "name": "contact__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__nie", + "name": "contact_role__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "color__empty", + "name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "positions__n", + "name": "region__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "positions__lte", + "name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "positions__lt", + "name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "positions__gte", + "name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "positions__gt", + "name": "site__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "devicetype_id__n", + "name": "location_id__n", "in": "query", "description": "", "required": false, @@ -21313,7 +22060,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } } @@ -21325,7 +22072,7 @@ ] }, "post": { - "operationId": "dcim_rear-port-templates_create", + "operationId": "dcim_power-panels_create", "description": "", "parameters": [ { @@ -21333,7 +22080,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPortTemplate" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -21341,7 +22088,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } }, @@ -21350,7 +22097,7 @@ ] }, "put": { - "operationId": "dcim_rear-port-templates_bulk_update", + "operationId": "dcim_power-panels_bulk_update", "description": "", "parameters": [ { @@ -21358,7 +22105,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPortTemplate" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -21366,7 +22113,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } }, @@ -21375,7 +22122,7 @@ ] }, "patch": { - "operationId": "dcim_rear-port-templates_bulk_partial_update", + "operationId": "dcim_power-panels_bulk_partial_update", "description": "", "parameters": [ { @@ -21383,7 +22130,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPortTemplate" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -21391,7 +22138,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } }, @@ -21400,7 +22147,7 @@ ] }, "delete": { - "operationId": "dcim_rear-port-templates_bulk_delete", + "operationId": "dcim_power-panels_bulk_delete", "description": "", "parameters": [], "responses": { @@ -21414,16 +22161,16 @@ }, "parameters": [] }, - "/dcim/rear-port-templates/{id}/": { + "/dcim/power-panels/{id}/": { "get": { - "operationId": "dcim_rear-port-templates_read", + "operationId": "dcim_power-panels_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } }, @@ -21432,7 +22179,7 @@ ] }, "put": { - "operationId": "dcim_rear-port-templates_update", + "operationId": "dcim_power-panels_update", "description": "", "parameters": [ { @@ -21440,7 +22187,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPortTemplate" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -21448,7 +22195,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } }, @@ -21457,7 +22204,7 @@ ] }, "patch": { - "operationId": "dcim_rear-port-templates_partial_update", + "operationId": "dcim_power-panels_partial_update", "description": "", "parameters": [ { @@ -21465,7 +22212,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPortTemplate" + "$ref": "#/definitions/WritablePowerPanel" } } ], @@ -21473,7 +22220,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPortTemplate" + "$ref": "#/definitions/PowerPanel" } } }, @@ -21482,7 +22229,7 @@ ] }, "delete": { - "operationId": "dcim_rear-port-templates_delete", + "operationId": "dcim_power-panels_delete", "description": "", "parameters": [], "responses": { @@ -21498,15 +22245,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rear port template.", + "description": "A unique integer value identifying this power panel.", "required": true, "type": "integer" } ] }, - "/dcim/rear-ports/": { + "/dcim/power-port-templates/": { "get": { - "operationId": "dcim_rear-ports_list", + "operationId": "dcim_power-port-templates_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -21523,13 +22270,6 @@ "required": false, "type": "string" }, - { - "name": "label", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "type", "in": "query", @@ -21538,21 +22278,14 @@ "type": "string" }, { - "name": "color", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "positions", + "name": "maximum_draw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description", + "name": "allocated_draw", "in": "query", "description": "", "required": false, @@ -21608,84 +22341,14 @@ "type": "string" }, { - "name": "region_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "location", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "tag", + "name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cabled", + "name": "moduletype_id", "in": "query", "description": "", "required": false, @@ -21789,83 +22452,6 @@ "required": false, "type": "string" }, - { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "label__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "type__n", "in": "query", @@ -21874,252 +22460,84 @@ "type": "string" }, { - "name": "color__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "color__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "positions__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "positions__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "positions__lt", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "positions__gte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "positions__gt", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__ic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__nic", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__iew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__niew", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__isw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__nisw", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__ie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__nie", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "description__empty", + "name": "maximum_draw__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "maximum_draw__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "maximum_draw__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "maximum_draw__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group__n", + "name": "maximum_draw__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "allocated_draw__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "allocated_draw__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location_id__n", + "name": "allocated_draw__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "location__n", + "name": "allocated_draw__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_id__n", + "name": "allocated_draw__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device__n", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -22166,7 +22584,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } } @@ -22178,7 +22596,7 @@ ] }, "post": { - "operationId": "dcim_rear-ports_create", + "operationId": "dcim_power-port-templates_create", "description": "", "parameters": [ { @@ -22186,7 +22604,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPort" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -22194,7 +22612,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } }, @@ -22203,7 +22621,7 @@ ] }, "put": { - "operationId": "dcim_rear-ports_bulk_update", + "operationId": "dcim_power-port-templates_bulk_update", "description": "", "parameters": [ { @@ -22211,7 +22629,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPort" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -22219,7 +22637,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } }, @@ -22228,7 +22646,7 @@ ] }, "patch": { - "operationId": "dcim_rear-ports_bulk_partial_update", + "operationId": "dcim_power-port-templates_bulk_partial_update", "description": "", "parameters": [ { @@ -22236,7 +22654,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPort" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -22244,7 +22662,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } }, @@ -22253,7 +22671,7 @@ ] }, "delete": { - "operationId": "dcim_rear-ports_bulk_delete", + "operationId": "dcim_power-port-templates_bulk_delete", "description": "", "parameters": [], "responses": { @@ -22267,16 +22685,16 @@ }, "parameters": [] }, - "/dcim/rear-ports/{id}/": { + "/dcim/power-port-templates/{id}/": { "get": { - "operationId": "dcim_rear-ports_read", + "operationId": "dcim_power-port-templates_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } }, @@ -22285,7 +22703,7 @@ ] }, "put": { - "operationId": "dcim_rear-ports_update", + "operationId": "dcim_power-port-templates_update", "description": "", "parameters": [ { @@ -22293,7 +22711,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPort" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -22301,7 +22719,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } }, @@ -22310,7 +22728,7 @@ ] }, "patch": { - "operationId": "dcim_rear-ports_partial_update", + "operationId": "dcim_power-port-templates_partial_update", "description": "", "parameters": [ { @@ -22318,7 +22736,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRearPort" + "$ref": "#/definitions/WritablePowerPortTemplate" } } ], @@ -22326,7 +22744,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/RearPort" + "$ref": "#/definitions/PowerPortTemplate" } } }, @@ -22335,7 +22753,7 @@ ] }, "delete": { - "operationId": "dcim_rear-ports_delete", + "operationId": "dcim_power-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -22351,42 +22769,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this rear port.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/rear-ports/{id}/paths/": { - "get": { - "operationId": "dcim_rear-ports_paths", - "description": "Return all CablePaths which traverse a given pass-through port.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/RearPort" - } - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this rear port.", + "description": "A unique integer value identifying this power port template.", "required": true, "type": "integer" } ] }, - "/dcim/regions/": { + "/dcim/power-ports/": { "get": { - "operationId": "dcim_regions_list", + "operationId": "dcim_power-ports_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -22404,112 +22795,231 @@ "type": "string" }, { - "name": "slug", + "name": "label", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description", + "name": "maximum_draw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "allocated_draw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "device_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "device", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "virtual_chassis_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "created__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "cabled", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "connected", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "type", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gt", "in": "query", "description": "", "required": false, @@ -22579,77 +23089,133 @@ "type": "string" }, { - "name": "name__empty", + "name": "label__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__n", + "name": "label__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ic", + "name": "label__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nic", + "name": "label__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__iew", + "name": "label__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__niew", + "name": "label__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__isw", + "name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nisw", + "name": "label__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ie", + "name": "label__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nie", + "name": "maximum_draw__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__empty", + "name": "maximum_draw__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "maximum_draw__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "maximum_draw__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "maximum_draw__gt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "allocated_draw__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "allocated_draw__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "allocated_draw__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "allocated_draw__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "allocated_draw__gt", "in": "query", "description": "", "required": false, @@ -22719,21 +23285,105 @@ "type": "string" }, { - "name": "description__empty", + "name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id__n", + "name": "region__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent__n", + "name": "site_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "module_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "type__n", "in": "query", "description": "", "required": false, @@ -22780,7 +23430,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } } @@ -22792,7 +23442,7 @@ ] }, "post": { - "operationId": "dcim_regions_create", + "operationId": "dcim_power-ports_create", "description": "", "parameters": [ { @@ -22800,7 +23450,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -22808,7 +23458,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } }, @@ -22817,7 +23467,7 @@ ] }, "put": { - "operationId": "dcim_regions_bulk_update", + "operationId": "dcim_power-ports_bulk_update", "description": "", "parameters": [ { @@ -22825,7 +23475,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -22833,7 +23483,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } }, @@ -22842,7 +23492,7 @@ ] }, "patch": { - "operationId": "dcim_regions_bulk_partial_update", + "operationId": "dcim_power-ports_bulk_partial_update", "description": "", "parameters": [ { @@ -22850,7 +23500,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -22858,7 +23508,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } }, @@ -22867,7 +23517,7 @@ ] }, "delete": { - "operationId": "dcim_regions_bulk_delete", + "operationId": "dcim_power-ports_bulk_delete", "description": "", "parameters": [], "responses": { @@ -22881,16 +23531,16 @@ }, "parameters": [] }, - "/dcim/regions/{id}/": { + "/dcim/power-ports/{id}/": { "get": { - "operationId": "dcim_regions_read", + "operationId": "dcim_power-ports_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } }, @@ -22899,7 +23549,7 @@ ] }, "put": { - "operationId": "dcim_regions_update", + "operationId": "dcim_power-ports_update", "description": "", "parameters": [ { @@ -22907,7 +23557,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -22915,7 +23565,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } }, @@ -22924,7 +23574,7 @@ ] }, "patch": { - "operationId": "dcim_regions_partial_update", + "operationId": "dcim_power-ports_partial_update", "description": "", "parameters": [ { @@ -22932,7 +23582,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableRegion" + "$ref": "#/definitions/WritablePowerPort" } } ], @@ -22940,7 +23590,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/Region" + "$ref": "#/definitions/PowerPort" } } }, @@ -22949,7 +23599,7 @@ ] }, "delete": { - "operationId": "dcim_regions_delete", + "operationId": "dcim_power-ports_delete", "description": "", "parameters": [], "responses": { @@ -22965,15 +23615,42 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this region.", + "description": "A unique integer value identifying this power port.", "required": true, "type": "integer" } ] }, - "/dcim/site-groups/": { + "/dcim/power-ports/{id}/trace/": { "get": { - "operationId": "dcim_site-groups_list", + "operationId": "dcim_power-ports_trace", + "description": "Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination).", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/PowerPort" + } + } + }, + "tags": [ + "dcim" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this power port.", + "required": true, + "type": "integer" + } + ] + }, + "/dcim/rack-reservations/": { + "get": { + "operationId": "dcim_rack-reservations_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -22984,14 +23661,7 @@ "type": "string" }, { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "slug", + "name": "created", "in": "query", "description": "", "required": false, @@ -23004,13 +23674,6 @@ "required": false, "type": "string" }, - { - "name": "created", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "created__gte", "in": "query", @@ -23054,273 +23717,266 @@ "type": "string" }, { - "name": "parent_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "parent", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "tenant", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "rack_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__n", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "user_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "user", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__n", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ic", + "name": "description__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nic", + "name": "description__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__iew", + "name": "description__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__niew", + "name": "description__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__isw", + "name": "description__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nisw", + "name": "description__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ie", + "name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nie", + "name": "description__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__empty", + "name": "description__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__n", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__ic", + "name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nic", + "name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__iew", + "name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__niew", + "name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__isw", + "name": "rack_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nisw", + "name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__ie", + "name": "site__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__nie", + "name": "location_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "description__empty", + "name": "location__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent_id__n", + "name": "user_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "parent__n", + "name": "user__n", "in": "query", "description": "", "required": false, @@ -23367,7 +24023,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } } @@ -23379,7 +24035,7 @@ ] }, "post": { - "operationId": "dcim_site-groups_create", + "operationId": "dcim_rack-reservations_create", "description": "", "parameters": [ { @@ -23387,7 +24043,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSiteGroup" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -23395,7 +24051,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } }, @@ -23404,7 +24060,7 @@ ] }, "put": { - "operationId": "dcim_site-groups_bulk_update", + "operationId": "dcim_rack-reservations_bulk_update", "description": "", "parameters": [ { @@ -23412,7 +24068,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSiteGroup" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -23420,7 +24076,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } }, @@ -23429,7 +24085,7 @@ ] }, "patch": { - "operationId": "dcim_site-groups_bulk_partial_update", + "operationId": "dcim_rack-reservations_bulk_partial_update", "description": "", "parameters": [ { @@ -23437,7 +24093,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSiteGroup" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -23445,7 +24101,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } }, @@ -23454,7 +24110,7 @@ ] }, "delete": { - "operationId": "dcim_site-groups_bulk_delete", + "operationId": "dcim_rack-reservations_bulk_delete", "description": "", "parameters": [], "responses": { @@ -23468,16 +24124,16 @@ }, "parameters": [] }, - "/dcim/site-groups/{id}/": { + "/dcim/rack-reservations/{id}/": { "get": { - "operationId": "dcim_site-groups_read", + "operationId": "dcim_rack-reservations_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } }, @@ -23486,7 +24142,7 @@ ] }, "put": { - "operationId": "dcim_site-groups_update", + "operationId": "dcim_rack-reservations_update", "description": "", "parameters": [ { @@ -23494,7 +24150,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSiteGroup" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -23502,7 +24158,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } }, @@ -23511,7 +24167,7 @@ ] }, "patch": { - "operationId": "dcim_site-groups_partial_update", + "operationId": "dcim_rack-reservations_partial_update", "description": "", "parameters": [ { @@ -23519,7 +24175,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableSiteGroup" + "$ref": "#/definitions/WritableRackReservation" } } ], @@ -23527,7 +24183,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/SiteGroup" + "$ref": "#/definitions/RackReservation" } } }, @@ -23536,7 +24192,7 @@ ] }, "delete": { - "operationId": "dcim_site-groups_delete", + "operationId": "dcim_rack-reservations_delete", "description": "", "parameters": [], "responses": { @@ -23552,15 +24208,15 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this site group.", + "description": "A unique integer value identifying this rack reservation.", "required": true, "type": "integer" } ] }, - "/dcim/sites/": { + "/dcim/rack-roles/": { "get": { - "operationId": "dcim_sites_list", + "operationId": "dcim_rack-roles_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -23585,1434 +24241,1336 @@ "type": "string" }, { - "name": "facility", + "name": "color", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "latitude", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "longitude", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group_id", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "name__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "name__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "name__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status", + "name": "name__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "name__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "name__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id", + "name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group", + "name": "name__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "name__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "slug__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "slug__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "slug__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "slug__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__n", + "name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "color__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "color__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "color__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "color__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "color__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "color__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__n", + "name": "color__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ic", + "name": "color__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nic", + "name": "color__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__iew", + "name": "description__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__niew", + "name": "description__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__isw", + "name": "description__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nisw", + "name": "description__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__ie", + "name": "description__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__nie", + "name": "description__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "slug__empty", + "name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__n", + "name": "description__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__ic", + "name": "description__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__nic", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__iew", + "name": "limit", + "in": "query", + "description": "Number of results to return per page.", + "required": false, + "type": "integer" + }, + { + "name": "offset", + "in": "query", + "description": "The initial index from which to return the results.", + "required": false, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "required": [ + "count", + "results" + ], + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "format": "uri", + "x-nullable": true + }, + "previous": { + "type": "string", + "format": "uri", + "x-nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/RackRole" + } + } + } + } + } + }, + "tags": [ + "dcim" + ] + }, + "post": { + "operationId": "dcim_rack-roles_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RackRole" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/RackRole" + } + } + }, + "tags": [ + "dcim" + ] + }, + "put": { + "operationId": "dcim_rack-roles_bulk_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RackRole" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RackRole" + } + } + }, + "tags": [ + "dcim" + ] + }, + "patch": { + "operationId": "dcim_rack-roles_bulk_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RackRole" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RackRole" + } + } + }, + "tags": [ + "dcim" + ] + }, + "delete": { + "operationId": "dcim_rack-roles_bulk_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "dcim" + ] + }, + "parameters": [] + }, + "/dcim/rack-roles/{id}/": { + "get": { + "operationId": "dcim_rack-roles_read", + "description": "", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RackRole" + } + } + }, + "tags": [ + "dcim" + ] + }, + "put": { + "operationId": "dcim_rack-roles_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RackRole" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RackRole" + } + } + }, + "tags": [ + "dcim" + ] + }, + "patch": { + "operationId": "dcim_rack-roles_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RackRole" + } + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RackRole" + } + } + }, + "tags": [ + "dcim" + ] + }, + "delete": { + "operationId": "dcim_rack-roles_delete", + "description": "", + "parameters": [], + "responses": { + "204": { + "description": "" + } + }, + "tags": [ + "dcim" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this rack role.", + "required": true, + "type": "integer" + } + ] + }, + "/dcim/racks/": { + "get": { + "operationId": "dcim_racks_list", + "description": "Overrides ListModelMixin to allow processing ExportTemplates.", + "parameters": [ + { + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__niew", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__isw", + "name": "facility_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__nisw", + "name": "asset_tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__ie", + "name": "u_height", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__nie", + "name": "desc_units", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "facility__empty", + "name": "outer_width", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn__n", + "name": "outer_depth", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn__lte", + "name": "outer_unit", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn__lt", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn__gte", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "asn__gt", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "latitude__n", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "latitude__lte", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "latitude__lt", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "latitude__gte", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "latitude__gt", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "longitude__n", + "name": "tenant_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "longitude__lte", + "name": "tenant_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "longitude__lt", + "name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "longitude__gte", + "name": "tenant", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "longitude__gt", + "name": "contact", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__n", + "name": "contact_role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__ic", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__nic", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__iew", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__niew", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__isw", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__nisw", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__ie", + "name": "location_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__nie", + "name": "location", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_name__empty", + "name": "status", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__n", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__ic", + "name": "width", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__nic", + "name": "role_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__iew", + "name": "role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__niew", + "name": "serial", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__isw", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__nisw", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__ie", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__nie", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_phone__empty", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__n", + "name": "name__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__ic", + "name": "name__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__nic", + "name": "name__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__iew", + "name": "name__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__niew", + "name": "name__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__isw", + "name": "name__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__nisw", + "name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__ie", + "name": "name__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__nie", + "name": "name__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "contact_email__empty", + "name": "facility_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group_id__n", + "name": "facility_id__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group__n", + "name": "facility_id__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id__n", + "name": "facility_id__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant__n", + "name": "facility_id__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status__n", + "name": "facility_id__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "facility_id__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "facility_id__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_id__n", + "name": "facility_id__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group__n", + "name": "asset_tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "asset_tag__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "asset_tag__nic", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "asset_tag__iew", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "asset_tag__niew", + "in": "query", "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Site" - } - } - } - } - } - }, - "tags": [ - "dcim" - ] - }, - "post": { - "operationId": "dcim_sites_create", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableSite" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/Site" - } - } - }, - "tags": [ - "dcim" - ] - }, - "put": { - "operationId": "dcim_sites_bulk_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableSite" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Site" - } - } - }, - "tags": [ - "dcim" - ] - }, - "patch": { - "operationId": "dcim_sites_bulk_partial_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableSite" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Site" - } - } - }, - "tags": [ - "dcim" - ] - }, - "delete": { - "operationId": "dcim_sites_bulk_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [] - }, - "/dcim/sites/{id}/": { - "get": { - "operationId": "dcim_sites_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Site" - } - } - }, - "tags": [ - "dcim" - ] - }, - "put": { - "operationId": "dcim_sites_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableSite" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Site" - } - } - }, - "tags": [ - "dcim" - ] - }, - "patch": { - "operationId": "dcim_sites_partial_update", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableSite" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Site" - } - } - }, - "tags": [ - "dcim" - ] - }, - "delete": { - "operationId": "dcim_sites_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "dcim" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this site.", - "required": true, - "type": "integer" - } - ] - }, - "/dcim/virtual-chassis/": { - "get": { - "operationId": "dcim_virtual-chassis_list", - "description": "Overrides ListModelMixin to allow processing ExportTemplates.", - "parameters": [ - { - "name": "id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "domain", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "name", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "created", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "created__gte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "created__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated__gte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "last_updated__lte", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "q", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "master_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "master", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site", - "in": "query", + "name": "asset_tag__isw", + "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "asset_tag__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "asset_tag__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "asset_tag__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "u_height__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "u_height__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "u_height__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "u_height__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "u_height__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__n", + "name": "outer_width__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__ic", + "name": "outer_width__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__nic", + "name": "outer_width__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__iew", + "name": "outer_width__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__niew", + "name": "outer_width__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__isw", + "name": "outer_depth__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__nisw", + "name": "outer_depth__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__ie", + "name": "outer_depth__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__nie", + "name": "outer_depth__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "domain__empty", + "name": "outer_depth__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__n", + "name": "outer_unit__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ic", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nic", + "name": "tenant_group_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__iew", + "name": "tenant_group__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__niew", + "name": "tenant_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__isw", + "name": "tenant__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nisw", + "name": "contact__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__ie", + "name": "contact_role__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__nie", + "name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name__empty", + "name": "region__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "master_id__n", + "name": "site_group_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "master__n", + "name": "site_group__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id__n", + "name": "site_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region__n", + "name": "site__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "location_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group__n", + "name": "location__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "status__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id__n", + "name": "width__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant__n", + "name": "role_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "role__n", "in": "query", "description": "", "required": false, @@ -25059,7 +25617,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } } @@ -25071,7 +25629,7 @@ ] }, "post": { - "operationId": "dcim_virtual-chassis_create", + "operationId": "dcim_racks_create", "description": "", "parameters": [ { @@ -25079,7 +25637,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritableRack" } } ], @@ -25087,7 +25645,7 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } }, @@ -25096,7 +25654,7 @@ ] }, "put": { - "operationId": "dcim_virtual-chassis_bulk_update", + "operationId": "dcim_racks_bulk_update", "description": "", "parameters": [ { @@ -25104,7 +25662,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritableRack" } } ], @@ -25112,7 +25670,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } }, @@ -25121,7 +25679,7 @@ ] }, "patch": { - "operationId": "dcim_virtual-chassis_bulk_partial_update", + "operationId": "dcim_racks_bulk_partial_update", "description": "", "parameters": [ { @@ -25129,7 +25687,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritableRack" } } ], @@ -25137,7 +25695,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } }, @@ -25146,7 +25704,7 @@ ] }, "delete": { - "operationId": "dcim_virtual-chassis_bulk_delete", + "operationId": "dcim_racks_bulk_delete", "description": "", "parameters": [], "responses": { @@ -25160,16 +25718,16 @@ }, "parameters": [] }, - "/dcim/virtual-chassis/{id}/": { + "/dcim/racks/{id}/": { "get": { - "operationId": "dcim_virtual-chassis_read", + "operationId": "dcim_racks_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } }, @@ -25178,7 +25736,7 @@ ] }, "put": { - "operationId": "dcim_virtual-chassis_update", + "operationId": "dcim_racks_update", "description": "", "parameters": [ { @@ -25186,7 +25744,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritableRack" } } ], @@ -25194,7 +25752,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } }, @@ -25203,7 +25761,7 @@ ] }, "patch": { - "operationId": "dcim_virtual-chassis_partial_update", + "operationId": "dcim_racks_partial_update", "description": "", "parameters": [ { @@ -25211,7 +25769,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableVirtualChassis" + "$ref": "#/definitions/WritableRack" } } ], @@ -25219,7 +25777,7 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/VirtualChassis" + "$ref": "#/definitions/Rack" } } }, @@ -25228,7 +25786,7 @@ ] }, "delete": { - "operationId": "dcim_virtual-chassis_delete", + "operationId": "dcim_racks_delete", "description": "", "parameters": [], "responses": { @@ -25244,215 +25802,211 @@ { "name": "id", "in": "path", - "description": "A unique integer value identifying this virtual chassis.", + "description": "A unique integer value identifying this rack.", "required": true, "type": "integer" } ] }, - "/extras/config-contexts/": { + "/dcim/racks/{id}/elevation/": { "get": { - "operationId": "extras_config-contexts_list", - "description": "Overrides ListModelMixin to allow processing ExportTemplates.", + "operationId": "dcim_racks_elevation", + "description": "Rack elevation representing the list of rack units. Also supports rendering the elevation as an SVG.", "parameters": [ { - "name": "id", + "name": "q", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "string", + "minLength": 1 }, { - "name": "name", + "name": "face", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "string", + "enum": [ + "front", + "rear" + ], + "default": "front" }, { - "name": "is_active", + "name": "render", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "string", + "enum": [ + "json", + "svg" + ], + "default": "json" }, { - "name": "created", + "name": "unit_width", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "integer", + "default": 220 }, { - "name": "created__gte", + "name": "unit_height", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "integer", + "default": 22 }, { - "name": "created__lte", + "name": "legend_width", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "integer", + "default": 30 }, { - "name": "last_updated", + "name": "exclude", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "integer" }, { - "name": "last_updated__gte", + "name": "expand_devices", "in": "query", - "description": "", "required": false, - "type": "string" + "type": "boolean", + "default": true }, { - "name": "last_updated__lte", + "name": "include_images", + "in": "query", + "required": false, + "type": "boolean", + "default": true + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RackUnit" + } + } + } + }, + "tags": [ + "dcim" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this rack.", + "required": true, + "type": "integer" + } + ] + }, + "/dcim/rear-port-templates/": { + "get": { + "operationId": "dcim_rear-port-templates_list", + "description": "Overrides ListModelMixin to allow processing ExportTemplates.", + "parameters": [ + { + "name": "id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region_id", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "region", + "name": "color", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group", + "name": "positions", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "device_type_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "role", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "platform_id", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "platform", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "cluster_group_id", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_group", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_id", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group_id", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant", + "name": "devicetype_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag", + "name": "moduletype_id", "in": "query", "description": "", "required": false, @@ -25557,140 +26111,119 @@ "type": "string" }, { - "name": "name__empty", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region_id__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "region__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, - { - "name": "site_group__n", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_group_id__n", + "name": "color__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site_id__n", + "name": "color__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "site__n", + "name": "color__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "device_type_id__n", + "name": "color__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role_id__n", + "name": "color__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "role__n", + "name": "color__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "platform_id__n", + "name": "color__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "platform__n", + "name": "color__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_group_id__n", + "name": "color__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_group__n", + "name": "positions__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "cluster_id__n", + "name": "positions__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group_id__n", + "name": "positions__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_group__n", + "name": "positions__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant_id__n", + "name": "positions__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tenant__n", + "name": "devicetype_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "tag__n", + "name": "moduletype_id__n", "in": "query", "description": "", "required": false, @@ -25737,7 +26270,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } } @@ -25745,11 +26278,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_config-contexts_create", + "operationId": "dcim_rear-port-templates_create", "description": "", "parameters": [ { @@ -25757,7 +26290,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConfigContext" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -25765,16 +26298,16 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_config-contexts_bulk_update", + "operationId": "dcim_rear-port-templates_bulk_update", "description": "", "parameters": [ { @@ -25782,7 +26315,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConfigContext" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -25790,16 +26323,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_config-contexts_bulk_partial_update", + "operationId": "dcim_rear-port-templates_bulk_partial_update", "description": "", "parameters": [ { @@ -25807,7 +26340,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConfigContext" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -25815,16 +26348,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_config-contexts_bulk_delete", + "operationId": "dcim_rear-port-templates_bulk_delete", "description": "", "parameters": [], "responses": { @@ -25833,30 +26366,30 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/config-contexts/{id}/": { + "/dcim/rear-port-templates/{id}/": { "get": { - "operationId": "extras_config-contexts_read", + "operationId": "dcim_rear-port-templates_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_config-contexts_update", + "operationId": "dcim_rear-port-templates_update", "description": "", "parameters": [ { @@ -25864,7 +26397,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConfigContext" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -25872,16 +26405,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_config-contexts_partial_update", + "operationId": "dcim_rear-port-templates_partial_update", "description": "", "parameters": [ { @@ -25889,7 +26422,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableConfigContext" + "$ref": "#/definitions/WritableRearPortTemplate" } } ], @@ -25897,16 +26430,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ConfigContext" + "$ref": "#/definitions/RearPortTemplate" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_config-contexts_delete", + "operationId": "dcim_rear-port-templates_delete", "description": "", "parameters": [], "responses": { @@ -25915,468 +26448,222 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this config context.", + "description": "A unique integer value identifying this rear port template.", "required": true, "type": "integer" } ] }, - "/extras/content-types/": { + "/dcim/rear-ports/": { "get": { - "operationId": "extras_content-types_list", - "description": "Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.", + "operationId": "dcim_rear-ports_list", + "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { "name": "id", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "app_label", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "model", + "name": "label", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "type", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "color", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "positions", "in": "query", - "description": "The initial index from which to return the results.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ContentType" - } - } - } - } - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [] - }, - "/extras/content-types/{id}/": { - "get": { - "operationId": "extras_content-types_read", - "description": "Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "description", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/ContentType" - } - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this content type.", - "required": true, - "type": "integer" - } - ] - }, - "/extras/custom-fields/": { - "get": { - "operationId": "extras_custom-fields_list", - "description": "Overrides ListModelMixin to allow processing ExportTemplates.", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "id", + "name": "q", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "content_types", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "required", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "filter_logic", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight", + "name": "site_id", "in": "query", "description": "", "required": false, - "type": "number" + "type": "string" }, { - "name": "limit", + "name": "site", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "location_id", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "location", + "in": "query", "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/CustomField" - } - } - } - } - } - }, - "tags": [ - "extras" - ] - }, - "post": { - "operationId": "extras_custom-fields_create", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableCustomField" - } - } - ], - "responses": { - "201": { + "name": "device_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/CustomField" - } - } - }, - "tags": [ - "extras" - ] - }, - "put": { - "operationId": "extras_custom-fields_bulk_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableCustomField" - } - } - ], - "responses": { - "200": { + "name": "device", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/CustomField" - } - } - }, - "tags": [ - "extras" - ] - }, - "patch": { - "operationId": "extras_custom-fields_bulk_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableCustomField" - } - } - ], - "responses": { - "200": { + "name": "virtual_chassis_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/CustomField" - } - } - }, - "tags": [ - "extras" - ] - }, - "delete": { - "operationId": "extras_custom-fields_bulk_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [] - }, - "/extras/custom-fields/{id}/": { - "get": { - "operationId": "extras_custom-fields_read", - "description": "", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/CustomField" - } - } - }, - "tags": [ - "extras" - ] - }, - "put": { - "operationId": "extras_custom-fields_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableCustomField" - } - } - ], - "responses": { - "200": { + "name": "module_id", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/CustomField" - } - } - }, - "tags": [ - "extras" - ] - }, - "patch": { - "operationId": "extras_custom-fields_partial_update", - "description": "", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/WritableCustomField" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/CustomField" - } - } - }, - "tags": [ - "extras" - ] - }, - "delete": { - "operationId": "extras_custom-fields_delete", - "description": "", - "parameters": [], - "responses": { - "204": { - "description": "" - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this custom field.", - "required": true, - "type": "integer" - } - ] - }, - "/extras/custom-links/": { - "get": { - "operationId": "extras_custom-links_list", - "description": "Overrides ListModelMixin to allow processing ExportTemplates.", - "parameters": [ - { - "name": "id", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "content_type", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "new_window", + "name": "cabled", "in": "query", "description": "", "required": false, @@ -26417,13 +26704,6 @@ "required": false, "type": "string" }, - { - "name": "content_type__n", - "in": "query", - "description": "", - "required": false, - "type": "string" - }, { "name": "name__n", "in": "query", @@ -26488,252 +26768,329 @@ "type": "string" }, { - "name": "name__empty", + "name": "label__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__n", + "name": "label__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__ic", + "name": "label__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__nic", + "name": "label__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__iew", + "name": "label__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__niew", + "name": "label__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__isw", + "name": "label__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__nisw", + "name": "label__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__ie", + "name": "label__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__nie", + "name": "type__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_text__empty", + "name": "color__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__n", + "name": "color__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__ic", + "name": "color__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__nic", + "name": "color__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__iew", + "name": "color__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__niew", + "name": "color__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__isw", + "name": "color__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__nisw", + "name": "color__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__ie", + "name": "color__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__nie", + "name": "positions__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "link_url__empty", + "name": "positions__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight__n", + "name": "positions__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight__lte", + "name": "positions__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight__lt", + "name": "positions__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight__gte", + "name": "description__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "weight__gt", + "name": "description__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__n", + "name": "description__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__ic", + "name": "description__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__nic", + "name": "description__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__iew", + "name": "description__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__niew", + "name": "description__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__isw", + "name": "description__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__nisw", + "name": "description__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__ie", + "name": "region_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__nie", + "name": "region__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "location__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "device__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "virtual_chassis__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "group_name__empty", + "name": "module_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", "in": "query", "description": "", "required": false, @@ -26780,7 +27137,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } } @@ -26788,11 +27145,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_custom-links_create", + "operationId": "dcim_rear-ports_create", "description": "", "parameters": [ { @@ -26800,7 +27157,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -26808,16 +27165,16 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_custom-links_bulk_update", + "operationId": "dcim_rear-ports_bulk_update", "description": "", "parameters": [ { @@ -26825,7 +27182,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -26833,16 +27190,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_custom-links_bulk_partial_update", + "operationId": "dcim_rear-ports_bulk_partial_update", "description": "", "parameters": [ { @@ -26850,7 +27207,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -26858,16 +27215,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_custom-links_bulk_delete", + "operationId": "dcim_rear-ports_bulk_delete", "description": "", "parameters": [], "responses": { @@ -26876,30 +27233,30 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/custom-links/{id}/": { + "/dcim/rear-ports/{id}/": { "get": { - "operationId": "extras_custom-links_read", + "operationId": "dcim_rear-ports_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_custom-links_update", + "operationId": "dcim_rear-ports_update", "description": "", "parameters": [ { @@ -26907,7 +27264,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -26915,16 +27272,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_custom-links_partial_update", + "operationId": "dcim_rear-ports_partial_update", "description": "", "parameters": [ { @@ -26932,7 +27289,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/WritableRearPort" } } ], @@ -26940,16 +27297,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/CustomLink" + "$ref": "#/definitions/RearPort" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_custom-links_delete", + "operationId": "dcim_rear-ports_delete", "description": "", "parameters": [], "responses": { @@ -26958,22 +27315,49 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this custom link.", + "description": "A unique integer value identifying this rear port.", "required": true, "type": "integer" } ] }, - "/extras/export-templates/": { + "/dcim/rear-ports/{id}/paths/": { "get": { - "operationId": "extras_export-templates_list", + "operationId": "dcim_rear-ports_paths", + "description": "Return all CablePaths which traverse a given pass-through port.", + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RearPort" + } + } + }, + "tags": [ + "dcim" + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "A unique integer value identifying this rear port.", + "required": true, + "type": "integer" + } + ] + }, + "/dcim/regions/": { + "get": { + "operationId": "dcim_regions_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -26984,56 +27368,140 @@ "type": "string" }, { - "name": "content_type", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "content_type__n", + "name": "last_updated__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "last_updated__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "q", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gt", "in": "query", "description": "", "required": false, @@ -27103,7 +27571,161 @@ "type": "string" }, { - "name": "name__empty", + "name": "slug__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent__n", "in": "query", "description": "", "required": false, @@ -27150,7 +27772,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } } @@ -27158,11 +27780,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_export-templates_create", + "operationId": "dcim_regions_create", "description": "", "parameters": [ { @@ -27170,7 +27792,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritableRegion" } } ], @@ -27178,16 +27800,16 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_export-templates_bulk_update", + "operationId": "dcim_regions_bulk_update", "description": "", "parameters": [ { @@ -27195,7 +27817,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritableRegion" } } ], @@ -27203,16 +27825,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_export-templates_bulk_partial_update", + "operationId": "dcim_regions_bulk_partial_update", "description": "", "parameters": [ { @@ -27220,7 +27842,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritableRegion" } } ], @@ -27228,16 +27850,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_export-templates_bulk_delete", + "operationId": "dcim_regions_bulk_delete", "description": "", "parameters": [], "responses": { @@ -27246,30 +27868,30 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/export-templates/{id}/": { + "/dcim/regions/{id}/": { "get": { - "operationId": "extras_export-templates_read", + "operationId": "dcim_regions_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_export-templates_update", + "operationId": "dcim_regions_update", "description": "", "parameters": [ { @@ -27277,7 +27899,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritableRegion" } } ], @@ -27285,16 +27907,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_export-templates_partial_update", + "operationId": "dcim_regions_partial_update", "description": "", "parameters": [ { @@ -27302,7 +27924,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/WritableRegion" } } ], @@ -27310,16 +27932,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ExportTemplate" + "$ref": "#/definitions/Region" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_export-templates_delete", + "operationId": "dcim_regions_delete", "description": "", "parameters": [], "responses": { @@ -27328,22 +27950,22 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this export template.", + "description": "A unique integer value identifying this region.", "required": true, "type": "integer" } ] }, - "/extras/image-attachments/": { + "/dcim/site-groups/": { "get": { - "operationId": "extras_image-attachments_list", + "operationId": "dcim_site-groups_list", "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { @@ -27354,21 +27976,21 @@ "type": "string" }, { - "name": "content_type_id", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_id", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name", + "name": "description", "in": "query", "description": "", "required": false, @@ -27382,84 +28004,112 @@ "type": "string" }, { - "name": "content_type", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "content_type_id__n", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_id__n", + "name": "contact", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_id__lte", + "name": "contact_role", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_id__lt", + "name": "parent_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_id__gte", + "name": "parent", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_id__gt", + "name": "id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gt", "in": "query", "description": "", "required": false, @@ -27529,14 +28179,161 @@ "type": "string" }, { - "name": "name__empty", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "content_type__n", + "name": "slug__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nic", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__iew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__niew", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "parent__n", "in": "query", "description": "", "required": false, @@ -27583,7 +28380,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } } @@ -27591,11 +28388,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_image-attachments_create", + "operationId": "dcim_site-groups_create", "description": "", "parameters": [ { @@ -27603,7 +28400,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/WritableSiteGroup" } } ], @@ -27611,16 +28408,16 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_image-attachments_bulk_update", + "operationId": "dcim_site-groups_bulk_update", "description": "", "parameters": [ { @@ -27628,7 +28425,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/WritableSiteGroup" } } ], @@ -27636,16 +28433,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_image-attachments_bulk_partial_update", + "operationId": "dcim_site-groups_bulk_partial_update", "description": "", "parameters": [ { @@ -27653,7 +28450,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/WritableSiteGroup" } } ], @@ -27661,16 +28458,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_image-attachments_bulk_delete", + "operationId": "dcim_site-groups_bulk_delete", "description": "", "parameters": [], "responses": { @@ -27679,30 +28476,30 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/image-attachments/{id}/": { + "/dcim/site-groups/{id}/": { "get": { - "operationId": "extras_image-attachments_read", + "operationId": "dcim_site-groups_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_image-attachments_update", + "operationId": "dcim_site-groups_update", "description": "", "parameters": [ { @@ -27710,7 +28507,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/WritableSiteGroup" } } ], @@ -27718,16 +28515,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_image-attachments_partial_update", + "operationId": "dcim_site-groups_partial_update", "description": "", "parameters": [ { @@ -27735,7 +28532,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/WritableSiteGroup" } } ], @@ -27743,16 +28540,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/ImageAttachment" + "$ref": "#/definitions/SiteGroup" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_image-attachments_delete", + "operationId": "dcim_site-groups_delete", "description": "", "parameters": [], "responses": { @@ -27761,23 +28558,23 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this image attachment.", + "description": "A unique integer value identifying this site group.", "required": true, "type": "integer" } ] }, - "/extras/job-results/": { + "/dcim/sites/": { "get": { - "operationId": "extras_job-results_list", - "description": "Retrieve a list of job results", + "operationId": "dcim_sites_list", + "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { "name": "id", @@ -27787,105 +28584,224 @@ "type": "string" }, { - "name": "created", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "completed", + "name": "slug", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status", + "name": "facility", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user", + "name": "latitude", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "obj_type", + "name": "longitude", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "name", + "name": "description", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "status__n", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user__n", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "obj_type__n", + "name": "tenant_group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asn", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asn_id", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__lt", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gte", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "id__gt", "in": "query", "description": "", "required": false, @@ -27955,296 +28871,357 @@ "type": "string" }, { - "name": "name__empty", + "name": "slug__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "limit", + "name": "slug__ic", "in": "query", - "description": "Number of results to return per page.", + "description": "", "required": false, - "type": "integer" + "type": "string" }, { - "name": "offset", + "name": "slug__nic", "in": "query", - "description": "The initial index from which to return the results.", + "description": "", "required": false, - "type": "integer" - } - ], - "responses": { - "200": { + "type": "string" + }, + { + "name": "slug__iew", + "in": "query", "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/JobResult" - } - } - } - } - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [] - }, - "/extras/job-results/{id}/": { - "get": { - "operationId": "extras_job-results_read", - "description": "Retrieve a list of job results", - "parameters": [], - "responses": { - "200": { + "required": false, + "type": "string" + }, + { + "name": "slug__niew", + "in": "query", "description": "", - "schema": { - "$ref": "#/definitions/JobResult" - } - } - }, - "tags": [ - "extras" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this job result.", - "required": true, - "type": "integer" - } - ] - }, - "/extras/journal-entries/": { - "get": { - "operationId": "extras_journal-entries_list", - "description": "Overrides ListModelMixin to allow processing ExportTemplates.", - "parameters": [ + "required": false, + "type": "string" + }, { - "name": "id", + "name": "slug__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_type_id", + "name": "slug__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_id", + "name": "slug__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created", + "name": "slug__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "kind", + "name": "facility__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__gte", + "name": "facility__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created__lte", + "name": "facility__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated", + "name": "facility__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__gte", + "name": "facility__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "last_updated__lte", + "name": "facility__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "facility__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_type", + "name": "facility__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created_by_id", + "name": "facility__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created_by", + "name": "latitude__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "latitude__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "latitude__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "latitude__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "latitude__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "longitude__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_type_id__n", + "name": "longitude__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_id__n", + "name": "longitude__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_id__lte", + "name": "longitude__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_id__lt", + "name": "longitude__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_id__gte", + "name": "description__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_id__gt", + "name": "description__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "kind__n", + "name": "description__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "assigned_object_type__n", + "name": "description__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created_by_id__n", + "name": "description__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "created_by__n", + "name": "description__isw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nisw", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__ie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "description__nie", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tag__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "contact_role__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "status__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asn__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "asn_id__n", "in": "query", "description": "", "required": false, @@ -28291,7 +29268,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } } @@ -28299,11 +29276,11 @@ } }, "tags": [ - "extras" + "dcim" ] }, "post": { - "operationId": "extras_journal-entries_create", + "operationId": "dcim_sites_create", "description": "", "parameters": [ { @@ -28311,7 +29288,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableJournalEntry" + "$ref": "#/definitions/WritableSite" } } ], @@ -28319,16 +29296,16 @@ "201": { "description": "", "schema": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_journal-entries_bulk_update", + "operationId": "dcim_sites_bulk_update", "description": "", "parameters": [ { @@ -28336,7 +29313,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableJournalEntry" + "$ref": "#/definitions/WritableSite" } } ], @@ -28344,16 +29321,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_journal-entries_bulk_partial_update", + "operationId": "dcim_sites_bulk_partial_update", "description": "", "parameters": [ { @@ -28361,7 +29338,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableJournalEntry" + "$ref": "#/definitions/WritableSite" } } ], @@ -28369,16 +29346,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_journal-entries_bulk_delete", + "operationId": "dcim_sites_bulk_delete", "description": "", "parameters": [], "responses": { @@ -28387,30 +29364,30 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/journal-entries/{id}/": { + "/dcim/sites/{id}/": { "get": { - "operationId": "extras_journal-entries_read", + "operationId": "dcim_sites_read", "description": "", "parameters": [], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } }, "tags": [ - "extras" + "dcim" ] }, "put": { - "operationId": "extras_journal-entries_update", + "operationId": "dcim_sites_update", "description": "", "parameters": [ { @@ -28418,7 +29395,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableJournalEntry" + "$ref": "#/definitions/WritableSite" } } ], @@ -28426,16 +29403,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } }, "tags": [ - "extras" + "dcim" ] }, "patch": { - "operationId": "extras_journal-entries_partial_update", + "operationId": "dcim_sites_partial_update", "description": "", "parameters": [ { @@ -28443,7 +29420,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WritableJournalEntry" + "$ref": "#/definitions/WritableSite" } } ], @@ -28451,16 +29428,16 @@ "200": { "description": "", "schema": { - "$ref": "#/definitions/JournalEntry" + "$ref": "#/definitions/Site" } } }, "tags": [ - "extras" + "dcim" ] }, "delete": { - "operationId": "extras_journal-entries_delete", + "operationId": "dcim_sites_delete", "description": "", "parameters": [], "responses": { @@ -28469,23 +29446,23 @@ } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [ { "name": "id", "in": "path", - "description": "A unique integer value identifying this journal entry.", + "description": "A unique integer value identifying this site.", "required": true, "type": "integer" } ] }, - "/extras/object-changes/": { + "/dcim/virtual-chassis/": { "get": { - "operationId": "extras_object-changes_list", - "description": "Retrieve a list of recent changes.", + "operationId": "dcim_virtual-chassis_list", + "description": "Overrides ListModelMixin to allow processing ExportTemplates.", "parameters": [ { "name": "id", @@ -28495,322 +29472,378 @@ "type": "string" }, { - "name": "user", + "name": "domain", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name", + "name": "name", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "request_id", + "name": "created", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "action", + "name": "created__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_type_id", + "name": "created__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_id", + "name": "last_updated", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr", + "name": "last_updated__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "q", + "name": "last_updated__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "time", + "name": "q", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_type", + "name": "tag", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_id", + "name": "master_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__n", + "name": "master", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lte", + "name": "region_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__lt", + "name": "region", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gte", + "name": "site_group_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "id__gt", + "name": "site_group", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user__n", + "name": "site_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__n", + "name": "site", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__ic", + "name": "tenant_id", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__nic", + "name": "tenant", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__iew", + "name": "id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__niew", + "name": "id__lte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__isw", + "name": "id__lt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__nisw", + "name": "id__gte", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__ie", + "name": "id__gt", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__nie", + "name": "domain__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_name__empty", + "name": "domain__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "action__n", + "name": "domain__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_type_id__n", + "name": "domain__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_id__n", + "name": "domain__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_id__lte", + "name": "domain__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_id__lt", + "name": "domain__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_id__gte", + "name": "domain__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_id__gt", + "name": "domain__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__n", + "name": "name__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__ic", + "name": "name__ic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__nic", + "name": "name__nic", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__iew", + "name": "name__iew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__niew", + "name": "name__niew", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__isw", + "name": "name__isw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__nisw", + "name": "name__nisw", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__ie", + "name": "name__ie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__nie", + "name": "name__nie", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "object_repr__empty", + "name": "tag__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "changed_object_type__n", + "name": "master_id__n", "in": "query", "description": "", "required": false, "type": "string" }, { - "name": "user_id__n", + "name": "master__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "region__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_group__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "site__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant_id__n", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "tenant__n", "in": "query", "description": "", "required": false, @@ -28857,7 +29890,7 @@ "results": { "type": "array", "items": { - "$ref": "#/definitions/ObjectChange" + "$ref": "#/definitions/VirtualChassis" } } } @@ -28865,142 +29898,192 @@ } }, "tags": [ - "extras" + "dcim" ] }, - "parameters": [] - }, - "/extras/object-changes/{id}/": { - "get": { - "operationId": "extras_object-changes_read", - "description": "Retrieve a list of recent changes.", - "parameters": [], + "post": { + "operationId": "dcim_virtual-chassis_create", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualChassis" + } + } + ], + "responses": { + "201": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualChassis" + } + } + }, + "tags": [ + "dcim" + ] + }, + "put": { + "operationId": "dcim_virtual-chassis_bulk_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualChassis" + } + } + ], "responses": { "200": { "description": "", "schema": { - "$ref": "#/definitions/ObjectChange" + "$ref": "#/definitions/VirtualChassis" } } }, "tags": [ - "extras" + "dcim" ] }, - "parameters": [ - { - "name": "id", - "in": "path", - "description": "A unique integer value identifying this object change.", - "required": true, - "type": "integer" - } - ] - }, - "/extras/reports/": { - "get": { - "operationId": "extras_reports_list", - "description": "Compile all reports and their related results (if any). Result data is deferred in the list view.", - "parameters": [], + "patch": { + "operationId": "dcim_virtual-chassis_bulk_partial_update", + "description": "", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WritableVirtualChassis" + } + } + ], "responses": { "200": { + "description": "", + "schema": { + "$ref": "#/definitions/VirtualChassis" + } + } + }, + "tags": [ + "dcim" + ] + }, + "delete": { + "operationId": "dcim_virtual-chassis_bulk_delete", + "description": "", + "parameters": [], + "responses": { + "204": { "description": "" } }, "tags": [ - "extras" + "dcim" ] }, "parameters": [] }, - "/extras/reports/{id}/": { + "/dcim/virtual-chassis/{id}/": { "get": { - "operationId": "extras_reports_read", - "description": "Retrieve a single Report identified as \".\".", + "operationId": "dcim_virtual-chassis_read", + "description": "", "parameters": [], "responses": { "200": { - "description": "" + "description": "", + "schema": { + "$ref": "#/definitions/VirtualChassis" + } } }, "tags": [ - "extras" + "dcim" ] }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, - "/extras/reports/{id}/run/": { - "post": { - "operationId": "extras_reports_run", - "description": "Run a Report identified as \".